Marc it makes perfect sense now, thanks for the detailed explanation. Thanks again!
Martyn -----Original Message----- From: Marc Powell [mailto:m...@ena.com] Sent: 05 March 2009 16:29 To: Nagios Users Subject: Re: [Nagios-users] Nagios/NRPE relationship On Mar 4, 2009, at 5:26 PM, Martyn wrote: > Hi all, hope you do no think this is a stupid question; however I have > to ask it anyway for a better understanding > > Command[check_smtp]=/usr/local/nagios/libexec/check_smtp -H localhost > > Do they have to use the -H localhost directive or is there something > different they can use, the localhost just does not seem right > looking at the other examples above. > Yes, check_smtp connects to a 'remote' smtp server and verifies that it answers so it needs to know what IP to connect to. It doesn't need NRPE to do that. If this remote server answers on port 25 on an IP reachable from your nagios host, you could just as easily run it from your nagios host and probably have more reliable results. The only scenario where the check above makes sense is if the SMTP server only accepts connections from the local machine. You can always run 'check_<plugin> --help' to see what parameters are required and available. NRPE is only needed for checking things that don't expose external services. Things like disk space, cpu utilization, memory use, etc.. Any network aware daemons like sendmail, postfix, apache, sshd, etc can generally be checked without using NRPE. > Then on my Nagios Server, under the .cfg box I want to monitor I > define the command: > > define service{ > use generic-service > host_name linux-server > service_description SSH > check_command check_nrpe!check_ssh > } > This is another one that doesn't really make sense to run through NRPE. check_ssh tries to connect to port 22 on a specified host (-H) to see if sshd is listening. You'd want to perform that test from a different box than sshd is running on to make sure it's listening publicly. Running directly from nagios is better. define service{ use generic-service host_name linux-server service_description SSH check_command check_ssh } Assuming your check_ssh command definition looks something like -- define command { command_name check_ssh command_line $USER1$/check_ssh -t 30 -H $HOSTADDRESS$ } -- Marc ---------------------------------------------------------------------------- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null