From: Jim A. <ji...@ji...> - 2009-03-31 08:11:06
|
2009/3/30 Kumar, Ashish <xml...@gm...>: > Hello, > > I am planning to move application/process monitoring setup from active > to passive monitoring. > > I read http://nagios.sourceforge.net/download/contrib/documentation/misc/NSCA_Setup.pdf > but it doesn't really help on how to setup scripts and how monitoring > is done with NSCA, for example, how to setup scripts, what would be > configuration entry for that. > > I tried searching online and nagios-users archive without luck. I > will appreciate if someone could share their configuration or may be > provide some pointers on how to set it up. Have a look on NagiosExchange http://www.nagiosexchange.org for a script called nsca_wrapper. You might need to edit the script slightly to make it work on AIX. This allows you to run your checks from cron, for example: 05,20,35,50 * * * * /usr/local/nagios/scripts/nsca_wrapper -H thishostsname -S SWAPFREE -C "/usr/local/nagios/libexec/check_swap -w 20 -c 10" > /usr/local/nagios/var/log/check_swap.log 2>&1 You will need to set up passive checks in your Nagios configuration to receive these check results. For example, my template "nsca" looks like this: define service { name nsca check_freshness 1 freshness_threshold 3600 active_checks_enabled 0 max_check_attempts 1 check_command check_nothing register 0 } And my actual service definition looks like this: # Passive checks for AIX servers define service{ use nsca,generic-service host_name thishostsname service_description SWAPFREE check_command check_nothing notes Records total amount of swap free. } The Check Command "check_nothing" simply does nothing. If you have trouble getting nsca_wrapper to work under AIX, give me a shout and I'll send you a copy. hth, Jim |