check_ide_smart & commands.cfg

Patrick Morris patrick.morris at hp.com
Thu Oct 16 22:29:14 CEST 2008


On Thu, 16 Oct 2008, ibloodyhatespam at gmail.com wrote:

> Hi, I seem to have run into a bit of a problem with Nagios 3.0.3, nagiosplug 1.4.13 and check_ide_smart.
> 
> I've added the suid bit to the script file and it's running just fine for the nagios user on its own ("./check_ide_smart -n -d /dev/sda" results in "OK - Operational (15/15 tests passed)"). When I try to incorporate it into commands.cfg and add it to the localhost checks however, nagios refuses to load the updated scripts.
> 
> 
> commands.cfg:
> # 'check_ide_smart' command definition
> define command{
>         command_name    check_ide_smart
>         command_line    $USER1$/check_ide_smart -n -d $ARG1$
>         }
> 
> localhost.cfg:
> #define service{
>         use                             local-service
>         host_name                       localhost
>         service_description             SMART sda
>         check_command                   check_ide_smart!/dev/sda
>         notifications_enabled           0
>         }
> 
> 
> No useful output either (nor in the logs)...  Commenting both means everything loads fine again though, so the problem has to be in here.
> What exactly am I doing wrong?

What do you mean by "nagios refuses to load the updated scripts?"  Do
you mean the configs?  If so, a "nagios -v /etc/nagios/nagios.cfg" (or
wherever your nagios.cfg lives) should ihelp point you to the issue.

One thing that's definitely not right as you posted it here is the
"define service" being commented out in your service config, since that
will make the rest of the uncommented lines under it generate an error
when loading.

-------------------------------------------------------------------------
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