Need help with configuration of NRPE !

jonas kellens jonas.kellens at telenet.be
Fri Nov 6 11:05:36 CET 2009


I'm having a lot of difficulty with a plugin that monitors SIP peers on
my Asterisk-server.
I've been breaking my head for about a week now...

This is the configuration of NRPE :

[nagios at vps ~]$ vi /etc/xinetd.d/nrpe 
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       = 127.0.0.1 ip_nagios
}

These are the rights of the nagios-user on the plugin :

[nagios at vps ~]$ ls -l /usr/local/nagios/libexec/nagisk.pl
-rwxr-x--- 1 nagios nagios 4163 Nov  2
17:12 /usr/local/nagios/libexec/nagisk.pl

This is the sudoers-file :

nagios ALL= (root) NOPASSWD: /usr/local/nagios/libexec/nagisk.pl

This is the nrpe.cfg-file :

command[check_asterisk_peers]=sudo /usr/local/nagios/libexec/nagisk.pl
-c peers

These are the results of my configuration :

[nagios at vps ~]$ /usr/local/nagios/libexec/nagisk.pl -c peers
[nagios at vps ~]$

[nagios at vps ~]$ sudo /usr/local/nagios/libexec/nagisk.pl -c peers
4 sip peers [Monitored: 3 online, 1 offline Unmonitored: 0 online, 0
offline]

[nagios at vps ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.12
[nagios at vps ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost -c
check_asterisk_peers
NRPE: Unable to read output

[nagios at vps ~]$ sudo /usr/local/nagios/libexec/check_nrpe -H localhost
-c check_asterisk_peers
Password: 
Sorry, user nagios is not allowed to execute
'/usr/local/nagios/libexec/check_nrpe -H localhost -c
check_asterisk_peers' as root on vps.domain.tld.

What do I need to do to make the NRPE work ????????

If I can't get it to work on localhost, it will definitely not work on
Nagios checking the remote Asterisk-server.

Please help me with the correct configuration of NRPE and my
nagisk-plugin.

Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091106/0abc278d/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list