Execute program on remote host

Jonas Kellens jonas.kellens at telenet.be
Sat Oct 23 12:03:05 CEST 2010


On 10/23/2010 11:49 AM, Andreas Ericsson wrote:
> On 10/23/2010 11:38 AM, Jonas Kellens wrote:
>> I want Nagios to activate the backup server (host C), when the
>> production server (host B) has problems.
>>
>>      
> Look through the docs for eventhandlers.
>    

The documentation says :

define service{
     host_name            somehost
     service_description        HTTP
     max_check_attempts        4
     event_handler            restart-httpd
     ...other service variables...
     }

define command{
     command_name    restart-httpd
     command_line    
/usr/local/nagios/libexec/eventhandlers/restart-httpd  $SERVICESTATE$ 
$STATETYPE$ $SERVICEATTEMPT$
     }


Can you show me an example of executing a command on a remote host (and 
not executing on localhost) ??


Kind regards,

Jonas.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
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