NRPE and NSClient allow you to remotely execute either pre-configured tasks or custome scripts to trigger alerts or as the result of an event (eg. an EventHandler).
NRPE Plugin
http://sourceforge.net/project/showfiles.php?group_id=26589
NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well. A windows utility called NSClient is also available to accomplish the same thing on Windows hosts.
NSClient Plugin
http://trac.nakednuns.org/nscp/downloads
NSClient++, aka NSCP, aims to be a simple yet powerful and secure monitoring daemon for Windows operating systems. It is built for Nagios, but nothing in the daemon is actually Nagios specific and could probably, with little or no change, be integrated into any monitoring software that supports running user tools for polling.
Several conditions can trigger this error with your Nagios checks. Many of them are obvious, but this one had me stumped for awhile.
All my nagios checks with NRPE to a given host were failing with the "CHECK_NRPE: Socket timeout after 10 seconds." message. I logged into the host and made sure NRPE was running, even restarted it. Double checked the firewall rules to make sure the port was open. I went to my nagios server, did an NSLOOKUP, PING and TELNET to the port to ensure I was resolving the correct IP address and could connect. The machine in question was a Virtual Private Server (VPS) so it does sometimes become sluggish and non-responsive, but poking around it all seemed fine. I tested from the command line of my Nagios server and got the same results.
What got me looking in the right direction was when I pinged my Nagios server from my host. It worked fine, but I noticed it took a few seconds to resolve the host. So then I checked the DNS servers of my Linux VPS. The first server listed was not pingable. I quickly flip-flopped the servers in my resolv.conf and VOILA! My command-line check from my Nagios server fixed it.
While setting up several new servers and installing NSCLIENT, I ran into the following error message:
could not fetch information from server
The most logical first step is to re-verify the Nagios server config file. Check to make sure DNS resolution is correct. Second, take a look at the NSC.log on the client system. In my case, I saw:
2009-03-30 10:52:23: error:.\NSClientListener.cpp:307: Unauthorized access from: 172.20.16.182
Well, that could definitely be a problem. My fault this time was in editing the NSC.ini after installation. The allowed_hosts line of:
allowed_hosts=172.20.16/23
needed to be like:
allowed_hosts=172.20.16.0/23