Monitoring only localhost

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
cavaughan
Posts: 2
Joined: Thu Nov 17, 2011 2:02 pm

Monitoring only localhost

Post by cavaughan »

So, I've set up Nagios on a Debian server. It is to monitor 4 other Debian servers and 2 Window servers. I have set up the cfg files for all the servers, and installed the appropriate apps on each server to be monitored. All checks seem to work. But when I go to look at the service status details in the web gui, several of the service results are more or less the same. I believe s they are being taken from the localhost. Could someone maybe help shed some light on how I can get this working correctly?
Thanks!!!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring only localhost

Post by jsmurphy »

Are you able to post some examples of the service and command definitions that you are seeing this problem with?
cavaughan
Posts: 2
Joined: Thu Nov 17, 2011 2:02 pm

Re: Monitoring only localhost

Post by cavaughan »

I'm not sure what you want me to post. But here's an example: the web interface shows basically the same information for every server. However, if I do a command line like:

/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_nrpe -H 10.0.1.15 -c check_users

It'll give a different answer than what is being shown in the web interface. This would seem to imply that something is wrong with my config files.
Here's the config file for the same server:


define host{
use generic-host ; Name of host template to use
host_name Polaris
alias Polaris
address 10.0.1.15
}

# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
use generic-service ; Name of service template to use
host_name Polaris
service_description Disk Space
check_command check_all_disks!20%!10%
}



# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.

define service{
use generic-service ; Name of service template to use
host_name Polaris
service_description Current Users
check_command check_users!20!50
}


# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 processes.

define service{
use generic-service ; Name of service template to use
host_name Polaris
service_description Total Processes
check_command check_procs!250!400
}



# Define a service to check the load on the local machine.

define service{
use generic-service ; Name of service template to use
host_name Polaris
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
carles
Posts: 2
Joined: Fri Nov 18, 2011 3:07 am

Re: Monitoring only localhost

Post by carles »

Same issue here, i'm monitoring from one Ubuntu Server 10.04 a few other 10.04 ubuntu servers, but for example the procs counter shows right now 75 processes for all the machines, but for example if I execute this from the server:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 192.168.0.11 -c check_procs
I receive the correct answer that actually is :

Code: Select all

PROCS WARNING: 161 processes
I don't see any problem in the logs and I don't think there is any misconfiguration, anyway this is my first time configuring NAGIOS. Can someone show me some light on this?
Thanks in advance.

Carles
carles
Posts: 2
Joined: Fri Nov 18, 2011 3:07 am

Re: Monitoring only localhost

Post by carles »

Same issue here,

I have one nagios server (ubuntu server 10.04) monitoring a few other ubuntu servers, from the nagios webinterface a lot of values are extrangely the same (and incorrect), for example right now the number of process is 75 in all my servers but if execute this from the server:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 192.168.0.11
I receive the correct answer:

Code: Select all

PROCS WARNING: 161 processes
This is my first time configuring nagios, i'm reading the documentation and looking in the logs but I don't find what's the problem. Please I need your experience guy's.

Thank you in advance

Carles Cortés
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring only localhost

Post by jsmurphy »

The configuration looks fine as far as I can see... and I've never really experimented with the particular check(s) you are both experiencing issues with so I'm afraid I don't know the answer. Hopefully some one else around here does!
Locked