Configuration problem

Dear Experts,

    I am new to Nagios :lol: , I was able to setup Nagios server and few clients, when I launch nagios application using browser, I can see all those clients, but I have configured not properly, so that Clients" Root Partition" service is giving value of Nagiossv.
    I tried all I can, couldn't rectify in configuration.
    Need help , Appreciate if anyone can help me. Thanking in advance.
    I have attached few screen shots for your reference.

KP :roll:

easy… check_disk works on the LOCAL disks.

you may want to have a look at SNMP for monitoring disk usage.

or nsclient++ or nrpe daemon depending on client OS?

check_by_ssh? :slight_smile:

Hi All,

    Can any one share document to follow to configure correctly ( in my case).

thanks in advance.

With Regards,
KP

Hi Luca,

        This is how my configuration is.

Main Configuration File:
/usr/local/nagios/etc/nagios.cfg

#Definitions for Monitoring the Mailsrv ( Linux) host
cfg_file=/usr/local/nagios/etc/objects/Mailsrv/Mailsrv.cfg

Object Configuration file:
/usr/local/nagios/etc/objects/Mailsrv/Mailsrv.cgf

define service{
host_name Mailsrv
service_description Root Partation
check_command check_local_disk!30%!20%!/
max_check_attempts 5
check_interval 60 ; 60minutes
check_period 24x7
notification_interval 60
notification_period 24x7
notification_options w,c,r
contact_groups admins
}

Please let me know what is going worng here.

Thanks\Regards,
KP :wink:

I already said in my first answer what th eproblem is.

check_local_disk

LOCAL being the important part. You can NOT use check_disk on your server to check some oter machines disk status.

Hi Luca,

      Thanks again for your reply, I am not clear with your reply, you mean to say Nagios won't monitor disk usage of  clients,

or I need to integrate SNMP with Nagios.

Thanks\Regards,
KP

You need to execute something locally on the target machine, in this case the mail server. This makes a lot of sense?
You can use snmp or any other agent that supports disk check and communicates with Nagios. A starting point would be to read the replies in the forum again.

Hi All,

    If I execute check_disk command in mailsrv, its giving desired output

====================================================================
ns@root: /usr/local/nagios/libexec/$> ./check_disk -w 10% -c 5% -p /
DISK OK - free space: / 1273 MB (66% inode=85%);| /=639MB;1813;1914;0;2015
ns@root: /usr/local/nagios/libexec/$>

So I did modification in my configuration 

====================================================================
#/usr/local/nagios/etc/objects/Mailsrv/Mailsrv.cfg

define service{
host_name Mailsrv
service_description Root Partation
check_command check_disk!30%!20%!/
max_check_attempts 5
check_interval 60 ; 60minutes
check_period 24x7
notification_interval 60
notification_period 24x7
notification_options w,c,r
contact_groups admins
}

#/usr/local/nagios/etc/objects/command.cfg
#For testing of Mailsrv Root partation service checks
define command{
command_name check_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}

Again same problem, displaying root_partition value of nagios server.

My doubt is , NRPE installed on Nagios client ( remote machine “Mailsrv”) won’t send this value to Nagios server.

Thanks\Regards,
KP

Hi All,

    Today I tried to check manually, whether check_nrpe command executed on monitoring host, will get correct results from remote host, but getting this error,

=============================================================================================================
[root@BANWOR011vm libexec]# ./check_nrpe -H mailsrv -n -c "/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /"
CHECK_NRPE: Error receiving data from daemon.
[root@BANWOR011vm libexec]# ./check_nrpe -H namesrv -n -c "/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /"
Connection refused by host
[root@BANWOR011vm libexec]#[root@BANWOR011vm libexec]# ./check_nrpe -H enetwk -n -c command[check_users]
CHECK_NRPE: Error receiving data from daemon.
[root@BANWOR011vm libexec]#

Any one help me in this.

Thanks\Regards,
KP