matteocorti / nagios_plugins

18 stars 7 forks source link

No output returned from plugin #110

Closed matteocorti closed 8 years ago

matteocorti commented 8 years ago

Original reporter: anonymous

Hi,

when i use manualy this plugin on my Centos 5/6 Servers it is working [root@ns2 plugins]# ./check_updates --no-boot-check -t 200 -c 2 CHECK_UPDATES OK - no updates available | total_updates=0;0;2 security_updates=0;0;2

When i use this plugin in Nagios then the following problem occurred (No output returned from plugin):

Service: check updates Host: DNS Server Address: 192.168.20.3 State: UNKNOWN

Date/Time: Fri Jan 18 08:50:50 CET 2013

Additional Info:

(No output returned from plugin)

commands.cfg define command{ command_name check_updates command_line /usr/lib64/nagios/plugins/check_updates --no-boot-check -t 200 -c 2 }

Host File define service{ use generic-service ; Name of service template to use host_name ns2.example.com service_description check updates check_command check_updates }

Best regards Wolfgang

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

You should try to run the plugin as the user under which Nagios run (usually nagios).

In any case run it with the -verbose option to have more information:

$ /usr/lib64/nagios/plugins/check_updates -vvv --no-boot-check -t 200 -c 2

and post the output

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

From #125

    [root@ns2 plugins]# su - nagios

   -bash-3.2$ cd /usr/lib64/nagios/plugins

   -bash-3.2$ ./check_updates -vvv --no-boot-check -t 200 -c 2

   [extra-opts] check_updates -vvv --no-boot-check -t 200 -c 2

   Checking a linux system

   Running on CentOS release 5.9 (Final)

   Using yum

   Loaded plugins: fastestmirror, priorities, security

   Security plugin installed

   271 packages excluded due to repository priority protections

   Skipping security plugin, no data

   CHECK_UPDATES OK - no updates available | total_updates=0;0;2

   security_updates=0;0;2

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

Strange could you please tell me if you are really using version 1.3.4 as reported? In this case you should definitely update.

Otherwise can you please post the output of

    $ yum check-updates

    $ yum --security check-updates

matteocorti commented 8 years ago

Original reporter: anonymous

Hello I have the same issue with check_updates in centos 5.6

[root@pc plugins]# /usr/lib64/nagios/plugins/check_updates -V
check_updates 1.6.3 [https://trac.id.ethz.ch/projects/nagios_plugins]

When I type in cmd:

[root@pc plugins]# /usr/lib64/nagios/plugins/check_updates --no-boot-check -t 200 -c 2
CHECK_UPDATES OK - no updates available | total_updates=0;0;2 security_updates=0;0;2

I get reply from script as shown above. I have declared new command in command.cfg:

define command{
        command_name    check_updates
        command_line    $USER1$/check_updates --no-boot-check -t 200 -c 2
        }

and i call check_update in localhost.cfg:

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             System updates via yum
        check_command                   check_updates
        }

In nagios.debug i see that function check_update is beeing called properly:

Processing: '$USER1$/check_updates --no-boot-check -t 200 -c 2'
 Done.  Final output: '/usr/lib64/nagios/plugins/check_updates  --no-boot-check -t 200 -c 2'

I don`t know what else can be wrong, could You Help Me please ?

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

Issue was fixed in 1.6.5. Please upgrade and check if the problem is still present.