Getting null when checking remote load.

Tõnis Trei tonis.trei at gmail.com
Wed Jun 8 16:27:27 CEST 2011


Hello,

Yeah, i started to look through my explanation and seems i didn't explained
it good enough while misunderstanding few things myself :)
So thanks for pointing it out.

I have one sever with address 192.168.0.5 that runs linux, has installed
munin-node and i want to monitor its load.
Munin-node has the load plugin.

Then i have another server with the ip 192.168.0.1 that has installed both
Nagios and Munin Server.
Now instead of checking the Munin server for graphs, i want Nagios to
trigger a plugin that checks the load on the machine.

I even changed few things in config to test, but no luck.

So Nagios has in command.cfg the following def:
define command{
        command_name    check_remote_load
        command_line    /usr/local/nagios/libexec/check_munin.pl -H
$HOSTADDRESS$ -M $ARG1$ -w $ARG2$ -c $ARG3$
}

And i have specified the following host with the service:
define host {
        use             linux-server
        host_name       Remote_Server
        address         192.168.0.5
        alias           RS
        contacts        admin
}

define service {
        use                             generic-service
        hostgroup_name                  linux-servers
        service_description             load
        check_command                   check_remote_load!load!8!10!
        servicegroups                   +load
        first_notification_delay        10
        contact_groups
}

Munin-node.conf on 192.168.0.5 has the "allow ^192\.168\.0\.1$"

And munin.congf on 192.168.0.1 has the following entry:
[application;Remote_Server]
    address 192.168.0.5
    use_node_name yes

So as i understand nagios should be triggering the check_munin.pl script
towards the host Remote_Server. Munin node there should return the load
parameters and nagios will return warning on 8 and critical on 10.

Please correct me if i got something wrong :)

Best wishes,
Tõnis


2011/6/8 Andreas Ericsson <ae at op5.se>

> On 06/08/2011 03:27 PM, Tõnis Trei wrote:
> > Hello,
> >
> > I have run into a small problem when tried to set up Nagios on a new
> system
> > from scratch and can't figure out whats wrong. Everything looks to be
> kinda
> > ok but maybe im overseeing something :)
> >
> > Nagios is returning NULL when checking load on a remote machine.
> >
> > I defined service:
> > define service {
> >          use                             generic-service
> >          hostgroup_name                  linux-servers
> >          service_description             load
> >          check_command
> > check_remote_load!$_HOSTLOADWARNING$!$_HOSTLOADCRITICAL$
> >          servicegroups                   +load
> >          first_notification_delay        10
> >          contact_groups
> > }
> >
> > and i defined a command in command.cfg
> > define command{
> >          command_name    check_remote_load
> >          command_line    $USER1$/check_munin.pl -H $HOSTADDRESS$ -M load
> -w
> > $ARG1$ -c $ARG2$
> > }
> >
> > Check_munin.pl is added on a remote machine.
> > Munin is installed on the same machine as Nagios and the IP is in ALLOW
> list
> > on munin remote node.
> > Also munin.conf contains the entry for the remote host.
> >
> > But for some reason i still get back null when forcing nagios to check
> the
> > load.
> >
> > Any thoughts on what wrong or how to debug this? :)
> >
>
> Nagios doesn't automagically run some commands from the remote node.
> By your explanation, the check_munin.pl script is installed on the
> remote server and munin is installed on the nagios server. You've
> either explained the situation extremely poorly or completely
> misunderstood how networking machines are allowed to talk to each
> other in the unix world.
>
> Either way, you need to rethink your mail, read it out loud a few
> times and then fix what's broken with the mail or your thinking. If
> that doesn't cause the bulb to go on in your head, I suggest you get
> back here with more details about the setup. Use hostnames for the
> nagios server and the server you're monitoring and explain what's
> installed where when you mail again; Even if they're fake names,
> they'll at least give us something to identify the different nodes
> by so we can be sure what's done where.
>
> --
> Andreas Ericsson                   andreas.ericsson at op5.se
> OP5 AB                             www.op5.se
> Tel: +46 8-230225                  Fax: +46 8-230231
>
> Considering the successes of the wars on alcohol, poverty, drugs and
> terror, I think we should give some serious thought to declaring war
> on peace.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110608/1ab882f6/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
-------------- 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