Page 1 of 2
Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 2:29 pm
by itIsMrKevin
Hi,
We are running Nagios Core 3.2.3 on a machine running CentOS 5.9. Nagios is currently monitoring about 15 systmes. I am not sure which method Nagios is using to monitor the remote system (i.e. nrpe, check_by_ssh, etc..)
Can someone please tell me how I can find out which method Nagios is using? Either by checking on the host machine with Nagios Core installed on it or on any of the remote machines.
Thanks.
Re: Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 2:36 pm
by sreinhardt
You can just look at the configuration files on the nagios server. Depending on how your configs are setup you may be able to look at /usr/local/nagios/etc/services/[hostname].cfg or it may be in just a hosts.cfg or services.cfg file. The most simple route might be to run a command like below:
Code: Select all
grep -iR '[hostname]' /usr/local/nagios/etc
Re: Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 2:40 pm
by abrist
Check the config files for the service checks. They should have a directive named "check_command". This command should dictate the method of monitoring.
Re: Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 3:02 pm
by itIsMrKevin
Hi sreinhardt,
for running "grep -iR '[hostname]' /usr/local/nagios/etc", would I use the hostname of the Nagios Core server or the hostname of each of the remote servers?
Re: Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 3:06 pm
by itIsMrKevin
Hi abrist,
What are the name(s) of the config file(s) for the service checks and where would I find them?
Thanks.
Re: Methods for monitoring remote systems with Nagios
Posted: Wed Sep 11, 2013 3:38 pm
by abrist
itIsMrKevin wrote:Hi abrist,
What are the name(s) of the config file(s) for the service checks and where would I find them?
This is actually completely up to admin implementing nagios core. Some will put them right in the host config files, while other will separate them by hostname but place them in a different directory. Start by searching the directories:
Code: Select all
/usr/local/nagios/etc
/usr/local/nagios/etc/objects
/usr/local/nagios/etc/hosts
/usr/local/nagios/etc/services
This is about all we can do as there is no "standard", universally accepted organizational scheme for the object files.
Re: Methods for monitoring remote systems with Nagios
Posted: Mon Sep 16, 2013 3:06 pm
by itIsMrKevin
Hi arbist,
I have been looking at the config file. I don't see where it actually names if we are using the nrpe plugin or the check_by_ssh plugin.
For example it has the following entry below:
# HTTP Services #####
define service {
use generic-service
host_name !localhost
hostgroup group1,group2
service_description HTTP Test
check_command check_http
}
When I logged into the Nagios GUI, I confirmed that all of the machines in group1 and group2 are being monitored by our the HTTP test. However, this definition does not tell me how Nagios is reaching all of the machines in group1 and group2. I still don't know if it is reaching them by using nrpe plugin, check_by_ssh plugin, or any other plugin to reach those machines.
I was hoping someone could answer the questions I have below:
1) Is there anywhere in this configuration file or any other configuration file where we would tell it to
(a) maybe use the check_by_ssh plugin to remotely monitor all machines
or
(b) possibly use the check_by_ssh plugin to remotely monitor machine1 and machine2 while using the nrpe plugin to remotely monitor machine3 and machine4.
2) Are there any other plugins besides check_by_ssh and nrpe that can be used on Nagios Core 3.X to monitor remote machines
Thanks again for any help you can give me.
Re: Methods for monitoring remote systems with Nagios
Posted: Mon Sep 16, 2013 4:18 pm
by sreinhardt
1) You can use any configuration of the plugins that you mentioned or many others. Nagios core will not restrict what you use, and you can do this as many different ways as you would like.
2) There are many, nrds, nrdp, nsca, nsclient\check_nt, wmi, snmp, etc. Virtually every plugin is used within nagios is to monitor machines other than the nagios server. It is simply a question of how you would like to monitor.
As for determining how you are monitoring things. Presently you are just creating an http connection from the nagios server to the remote machine. The command portion using check_http says that you are doing this locally on your nagios machine and not using check_by_ssh or nrpe.
Re: Methods for monitoring remote systems with Nagios
Posted: Tue Sep 17, 2013 3:25 pm
by itIsMrKevin
sreinhardt,
Thanks for that useful information
Re: Methods for monitoring remote systems with Nagios
Posted: Tue Sep 17, 2013 3:27 pm
by slansing
Can we help you with anything else on this topic?