Custom NRPE Configuration File/ Changing output of alarm

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Custom NRPE Configuration File/ Changing output of alarm

Post by Technology_Vacation »

Hi,

I have been trying to research if there is a sample custom NRPE configuration file that would allow to change the outputs of alerts.

Example:

command[check_disk1]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -p /dev/sda1

If you were to get a warning from this check_disk1, it would send the output of df -h, showing the complete output of df -h. This would allow the administrator to quickly identify and t-shoot because it provided a snapshot of df -h and provided this details of the triggered alarm with in the email alert.

Let me know if more details are required..
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Custom NRPE Configuration File/ Changing output of alarm

Post by abrist »

The output of check_disk is formatted by the plugin code itself. check_disk is a binary, so unless you want to edit the source code, you are best off writing your own script to run df -h.
See the Plugin Developement Guidelines
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Custom NRPE Configuration File/ Changing output of alarm

Post by Technology_Vacation »

Thank you...
Locked