Announcement

Collapse
No announcement yet.

"No output returned from plugin" but plugin is working in command line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "No output returned from plugin" but plugin is working in command line

    Good Morning,

    I am trying to use the plugin check_centreon_snmp_cpu for CPU check:

    https://nagios.fandom.com/wiki/Plugi...treon_snmp_cpu

    The plugin is working from CLI but not from the Centreon Web Interface, which returns the error "No output returned from plugin". From the CLI I have the following output:

    [[email protected] plugins]# /usr/lib/centreon/plugins/check_centreon_snmp_cpu -H <server ip> -v 2c -C public -c 80 -w 90
    CPU utilization percentage : 2.54166666666667%|avg=2.54166666666667%;90;80;0;10 0 cpu0=2% cpu1=16% cpu2=5% cpu3=12% cpu4=4% cpu5=0% cpu6=3% cpu7=4% cpu8=1% cpu9=1% cpu10=1% cpu11=0% cpu12=1% cpu13=0% cpu14=1% cpu15=0% cpu16=2% cpu17=1% cpu18=1% cpu19=0% cpu20=0% cpu21=4% cpu22=1% cpu23=1%

    Chmod of the plugin file is 755, owner is root:root like the other plugins in the same folder /usr/lib/centreon/plugins

    Can anyone suggest a checklist of possible failures?

    Thanks in advance
    #! /usr/bin/perl -w ################################################################################ # Copyright 2004-2013 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # # This program is free software; you can redistribute it and/or modify...

  • #2
    Hi!
    Never, repeat, never test plugin as root.

    My engine run as user 'centreon-engine' so the first test should be:
    Code:
    # sudo -i -u centreon-engine
    $ ls -l /usr/lib/centreon/plugins/check_centreon_snmp_cpu
    $ /usr/lib/centreon/plugins/check_centreon_snmp_cpu -H <server ip> -v 2c -C public -c 80 -w 90
    Tell us if, with the right user, it works from CLI

    Ciao,


    P.S. to find the user of process centengine
    Code:
    pgrep -x centengine | xargs ps -o pid,user -p

    Comment

    Working...
    X