Centralize Command Definitions?

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
Virgnarus
Posts: 2
Joined: Fri Oct 14, 2011 9:38 am

Centralize Command Definitions?

Post by Virgnarus »

Hi,

Getting acquainted with Nagios. Have NagiosQL and NRPE installed. Everything works fine, except one condition that has been a bit irritating. If I needed to change what constitutes a 'warning' or 'critical' state for a check on a remote system, I would have to remote into that system and change the command definition in nrpe.cfg. An example being check_mem with -w 25 -c 15 arguments so it'll warn at 25% free mem usage and 15% usage, respectively. Obviously this can get rather tedious.

So, is there a way to change this behavior to become more centralized through the Nagios server so I can change it through something like NagiosQL, that way I don't have to remote into every system I want to change commands on and just have the Nagios server react differently to the information it receives? Such as the command just sending the data through NRPE to Nagios server and the Nagios server just takes that and determines the appropriate state? Thanks a mil.
Last edited by Virgnarus on Thu Oct 04, 2012 11:27 am, edited 1 time in total.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Centralize Command Definitions?

Post by yancy »

Virgnarus,

You can define warning and critical levels when using check_nrpe, for example:

OK CPU Load ok.|'5m'=0%;80;90 '1m'=0%;80;90 '30s'=0%;80;90

Code: Select all

./check_nrpe -H 192.168.5.166 -c checkCPU -a warn=80 crit=90 time=5m time=1m time=30s
You can also create a hostgroup and use object inheritance so you can define arguments only once on the Nagios side:
http://nagios.sourceforge.net/docs/3_0/ ... tance.html

Regards,

-Yancy
Virgnarus
Posts: 2
Joined: Fri Oct 14, 2011 9:38 am

Re: Centralize Command Definitions?

Post by Virgnarus »

Doh, I should've known! Thanks!
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Centralize Command Definitions?

Post by yancy »

Virgnarus,

No problem, Glad I could help.

Regards,

-Yancy
Locked