In some cases we need to push checks from client to server, for example dynamic ip, behind firewall, etc. NSCA service of Nagios Addon is useful for such case, which can be turned on via 'omd config'. However, if you have many such push hosts, using Zabbix with its native passive poller via agent may be a better choice.
freshness can also be checked via WATO->Host & Service Parameters->Active Checks-> Classical...
freshness can also be checked via WATO->Host & Service Parameters->Active Checks-> Classical...
REF: http://users.telenet.be/mydotcom/howto/nagios/nscaclient.html
Test and tweak
On a linux system, you can test your send_nsca by running something like this (where
nagiosserver
is the FQDN of your nagios server) :echo -e "localhost \ttestservice \t0 \tTEST " | send_nsca nagiosserver
On the Nagios server, look in syslog or
/var/log/nagios/nagios.log
: you should see a mention that nagios received your message, and a complaint that it can't process the service check result because the service doesn't exist. That's because you did not define service "testservice". But it confirms that your nsca setup works.
REF: http://lists.mathias-kettner.de/pipermail/checkmk-en/2013-March/008780.html
CHECKMK MULTISITE CONFIGURATION 1) In WATO go to "Host & Service Parameters" >> "Active Checks" >> "Classical active and passive Nagios checks" 2) Create a new rule in which the "Service description" is the same name that is going to receive the NSCA information. (This name would also be configured on your NSCA agent on the client being monitored.) 3) Make sure the new rule only applies to the hosts that will be receiving the NSCA information. This can be done via tags or by explicitly specifying host names. I prefer tags as that way I can just set up a new host with the correct tags and it will automatically get the new NSCA Service added to it's checks. 4) In the "Command line" checkbox of the new service, I put something like this 'echo "ERROR - you did an active check on this service - please do not do that on this service" && exit 1'. (This is similar to what MK is doing with CheckMK passive checks in the CheckMK template file.) 5) Go back to the Main Menu for "Host & Service Parameters" (The Rule Editor) 6) Go to "Monitoring Configuration" 7) Create a new rule under the section "Service Checks" in the category "Enable/disable active checks for services" 8) Make sure this rule specifies the Service name that you created back in step 2 and set it to "Disable active checks". 9) Apply the changes in WATO It is important to note that at this point, you have now created a Service for a host (or hosts) that is not actively being checked and is just sitting as a passive check. This is good because it will allow NSCA to pass status information for the Service back to Nagios.
沒有留言:
張貼留言