Page 1 of 1

Quick Actions performed on alerts

Posted: Thu Jul 25, 2019 4:44 am
by IT-OPS-SYS
we can check few things inside the clients using the NRPE , for eg:
/usr/local/nagios/libexec/./check_ssh -H 10.24.15.200 or uptime or disk usage

Would it be possible that we can use the NRPE agent to fire up the command on the client from the nagios server. command like reboot, df -h .

I have created an quick action for the VM as "Reboot" but the command which I gave goes to the Nagios XI instead of the client.

How can I make sure that the command specified in the action should go to client instead of Nagios itself.

Re: Quick Actions performed on alerts

Posted: Thu Jul 25, 2019 1:31 pm
by benjaminsmith
Hello,

This is done by assigning an event handler to the service. The process for nrpe is as follows:

1. Configure nrpe.cfg on the remote host to reboot the server or other custom script.
2. Create an event handler script in the Nagios plugin directory that will call script in step 1 using check_nrpe
3. Setup a new event handler command definition for the script in step 2 in Nagios XI
4. Assign the event handler command to the host or service

The process is outlined in detail with an example in the following guide.

Restarting Services with NRPE

And here is our guide for a general overview of Event Handlers in Nagios XI.

Introduction to Event Handlers

Let me know if that answers your question.