AW: not able to get the status of some services fr om the remote machine even with net-snmp running

Thomas.Zimmer at oppenheim.de Thomas.Zimmer at oppenheim.de
Wed Dec 7 09:19:30 CET 2005


as the check-name "check_LOCAL_disk_mail" says, these two are local check.
Many checks are not able to check a host resp. a service remote via a
tcp-connection o.sim.
 
To execute such services on a remote machine, you´ll have to use nrpe, nsca
or ssh (maybe there are more possib.). The service checks you want to exec.
hav to reside on the remote machine. 
 
Assuming  you have running ssh-services (configuring nrpe is a bit more
complicated):
 
# command for executing checks via ssh
define command {
                command_name                   check_by_ssh
                command_line                   $USER1$/check_by_ssh -H
$HOSTADDRESS$ -C "./<plugins-dir>/$ARG1$ $ARG2$"
                }

# the remotecheck
define service {
                host_name                      mail
                service_description            check_swap_on_mail
                check_command
check_by_ssh!check_local_disk_mail!<optional additional params>
                max_check_attempts    5
                normal_check_interval    5
                retry_check_interval    3
                check_period        nonworkhours
                notification_interval    30
                notification_period    nonworkhours
                notification_options    w,c,r
                contact_groups        linux-admins
                }
 
This should work. NRPE function in a similar way; but on the remote host a
daemon is running, and the checks that may be executed on the remote host
are configured on the remote host.
 
NSCA inverts the direction of getting check results; you´ll have to compile
a "small nagios", configure all checks for the machine locally, and then you
can pass all results as "passive chak results" via the "send_nsca" plugin to
your central nagios-server.
 
I think the nrpe alternative has greater performance as executing checks via
ssh, but you lose the ability of fully central configuration. i never used
nsca myself.
 
Greetz,

Thomas Zimmer 
Produktservice & Betrieb 
Betrieb & Support 
Sal. Oppenheim jr. & Cie., Frankfurt a. Main 

Internet: http://www.oppenheim.de <http://www.oppenheim.de/>  
E-Mail: thomas.zimmer at oppenheim.de 

-----Ursprüngliche Nachricht-----
Von: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] Im Auftrag von ankush
grover
Gesendet: Mittwoch, 7. Dezember 2005 08:56
An: nagios-users at lists.sourceforge.net
Betreff: [Nagios-users] not able to get the status of some services from the
remote machine even with net-snmp running


hey friends,

I am not an expert in Nagios.I have configured Nagios to monitor few hosts
in my Network.

There is one FC3 server on which few services like
(mysql,dns,apache,postfix) etc  are running on that server.But through
nagios I am not able to get the information about the disk & swap status
from the remote machine even though snmp & snmptrapd services are running on
this server.

services.cfg
define service{
    host_name        mail
    service_description    swapspacechecking
    check_command        check_swap
    max_check_attempts    5
    normal_check_interval    5
    retry_check_interval    3
    check_period        nonworkhours
    notification_interval    30
    notification_period    nonworkhours
    notification_options    w,c,r
    contact_groups        linux-admins
    }

define service{
    host_name        mail
    service_description    disk_checking_mail
    check_command        check_local_disk_mail
    max_check_attempts    5
    normal_check_interval    5
    retry_check_interval    3
    check_period        nonworkhours
    notification_interval    30
    notification_period    nonworkhours
    notification_options    w,c,r
    contact_groups        linux-admins
    }

checkcommands.cfg file
define command{
    command_name    check_local_disk_mail
        command_line    $USER1$/check_disk -w 10% -c 5% -p /var  -p /usr  -p
/home -p / -p /opt
    }

define command{
    command_name    check_swap
    command_line    $USER1$/check_swap -w 35% -c 15%
    }

In both the above cases the nagios is showing the status for the local
machine on which the nagios is running not for the remote machine.

But plugins for apache ,local load ,mysql on mail machine are working fine.

Does local_disk and check_swap plugins  requires some special configuration.

Moreover I would like to monitor postfix(mailq) running on the machine.What
I have to do to the get status of mailq ?

The name of the machine which I am monitoring is mail and the machine name
on which nagios is running is cluster1.

Please guide me.

Thanks & Regards

Ankush Grover




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051207/71ee0ef4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Zimmer, Thomas (Produktservices und Betrieb).vcf
Type: application/octet-stream
Size: 254 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051207/71ee0ef4/attachment.obj>


More information about the Users mailing list