Adding host commands

Andreas Ericsson ae at op5.se
Wed Jul 7 21:42:14 CEST 2004


Marc Powell wrote:
> Per-Henrik Persson <mailto:ph at whatever.nu> wrote:
> 
>>Hi!
>>
>>I want to add some admin commands to the host commands list (like
>>reboot server) for certain hosts. Is there an easy way or do I have
>>to modify the source code? I have searched the list achives without
>>success.   
> 
> 
> You can either modify the source to include them in the built in list
> _or_ you can you the Host/Service extended info feature to create a
> notes_url with any additional information and host/service specific
> commands you feel are lacking. The latter course of action is probably
> easier and more flexible in the long run.
> 

Definitely so, since the first really won't work at all without turning 
Nagios into a network management (as opposed to monitoring) system.

The best way to create a management add-on to Nagios would most likely 
be to host it on a separate site and have the other app hold keys and 
whatever commands you need to issue for maintenance. In Nagios, you 
would put something like this in the notes_url field for the 
(host|service)extinfo object;
notes_url https://mgmt.com/mgmt.(cgi|php)?host=$HOSTNAME$
and then have the other script present the list of actions. That way 
you'd have a separate module that seems (on important levels) to 
integrate with nagios.


> --
> Marc
> 

-- 
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.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