nagios check_sip plugin
Robert McNaught
asteriskator at gmail.com
Wed Sep 10 21:20:17 CEST 2008
Just thought I would add this response for a solution, incase anyone
else ever looks to this thread.
check_sip contains the following line, which must be the directory of
your nagios plugins, or the SIP plugin will not work from nagios (it
will work from the command line regardless)
use lib "/usr/local/nagios/libexec";
This is set in check_sip to be
use lib "/usr/lib/nagios/plugins"; and will not work when called from
nagios if that is not the plugin directory.
Thanks
Robert
On Mon, Sep 8, 2008 at 3:43 PM, Robert McNaught <asteriskator at gmail.com> wrote:
> Hi, I am using Nagios 3 on CentOS 5.
>
> I am not understanding how to set up a service check for SIP (Session
> Initiation Protocol).
>
> I can run the check_sip perl script from the command line and get a
> valid response, but cannot get it to work under nagios.
>
> [root at lab01 libexec]# /usr/local/nagios/libexec/check_sip -u
> sip:username at server.hostname.com -f sip:username at server.hostname.com
> -H server.hostname.com
> SIP/2.0 200 OK, 0.017372 seconds response
> time|rtt=0.017372s;0.5s;1s;0:10; code=200
>
>
> I have added in a command definition in commands.cfg:
>
> #'check_sip' command definition added by RJM
> define command{
> command_name check_sip
> command_line check_sip -u sip:username at server.hostname.com
> -f sip:username at server.hostname.com -H server.hostname.com
>
> }
>
> I have a host and service definition also of:
>
>
> define host{
> use generic-switch ; Inherit default
> values from a template
> host_name server.hostname.com ; The name
> we're giving to this switch
> alias server ; A longer name associated with the wtch
> address XXX.XXX.XXX.XXX ; IP address of the switch
> hostgroups core ; Host groups this switch
> is associated with
> }
>
>
> define service{
> use core-template
> host_name server.hostname.com
> service_description SIP test
> check_command check_sip
> # contact_groups voip-admins
> max_check_attempts 4
> normal_check_interval 5
> retry_check_interval 1
> notification_interval 240
> check_period 24x7
> notification_period 24x7
> notification_options c,r
> }
>
>
> I run the configuration check utility and it returns no errors, I
> restart nagios, and the host always appears down.
>
> I see some of the other command definitions have something like
>
> command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
>
> but I have no idea what the variables are in this line and what
> relevance they have....
>
> Can someone explain if I need to have these variables and what they
> actually mean? I believed that if I can run it from the command line,
> then I should just be able to use the same command in the command
> definition, or does it not work like that?
>
> Thanks in advance
>
> Robert
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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