Nagios CGI modification

aragonx at dcsnow.com aragonx at dcsnow.com
Thu Nov 8 23:08:35 CET 2007


I would like to add a link to the hostgroup commands page that would allow
me to distribute some files to all the hosts in that group.

In extinfo.c I think I found where this page is defined.

So I added the following section (approx line 1632):

printf("<tr CLASS='command'><td><img src='%s%s' border=0 ALT='Distribute
Files to All Hosts In This Hostgroup' TITLE='Distribute Files to All Hosts
In This Hostgroup'></td><td CLASS='command'><a
href='%s?cmd_typ=%d&hostgroup=%s'>Disable active checks of all services in
this
hostgroup</a></td></tr>\n",url_images_path,DISABLED_ICON,COMMAND_CGI,CMD_DISABLE_HOSTGROUP_SVC_CHECKS,url_encode(hostgroup_name));

Which looks great.  Now I think I need to change the <a
href='%s?cmd_typ=%d&hostgroup=%s'> to call my shell script (or I could
write it in C but I have very little experience with that).

Changing the link is no big deal of course.  My big question is, how do I
get a list of all the hosts in that host group passed?




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list