centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

Icingaweb2: No Perfdata Values present #430

Closed benhartwich closed 8 years ago

benhartwich commented 8 years ago

Hi,

I use your great plugin suite at icinga2. I´ve defined a command at icinga2 as follows:

object CheckCommand "centreon-snmp-load" { import "plugin-check-command"

command = [ "/usr/lib/nagios/custom/centreon-plugins/centreon_plugins.pl"] arguments = { "--plugin" = "os::linux::snmp::plugin" "--mode" = "load" "--hostname" = "$address$" "--snmp-version" = "2c" "--snmp-community" = "public" "--warning" = "$snmp_warn$" "--critical" = "$snmp_crit$" } }

But at Icingaweb2 there isn´t displayed any perfdata value for critical and warning. The values are recognized by icinga2, but the output seems broken: it´s displayed a 0. zwischenablage01

garnier-quentin commented 8 years ago

Thanks for using the plugins. Maybe icinga2 doesn't manage range threshold. But i have a solution :), try to add following option: --range-perfdata=1 (or --range-perfdata=2)

benhartwich commented 8 years ago

Thanks, this works!

garnier-quentin commented 8 years ago

Thanks for the feedback!

benhartwich commented 8 years ago

There´s just another problem. The values are translated wrong: If I set vars.snmp_warn = "700" vars.snmp_crit = "800" at snmp-memory I get 54,58 GiB for warning and 62,38 GiB for critical.

garnier-quentin commented 8 years ago

Could you give me the command line used ? I don't understand the 700 for the load :)

benhartwich commented 8 years ago

Command:

object CheckCommand "centreon-snmp-memory" {
   import "plugin-check-command"

   command = [ "/usr/lib/nagios/custom/centreon-plugins/centreon_plugins.pl"]
   arguments = {
        "--plugin" = "os::linux::snmp::plugin"
        "--mode" = "memory"
        "--hostname" = "$address$"
        "--snmp-version" = "2c"
        "--snmp-community" = "public"
        "--warning" = "$snmp_warn$"
        "--critical" = "$snmp_crit$"
        "--range-perfdata" = "1"
   }
}

Service:

object Service "snmp-memory" {
    host_name      = "CMS Test"
    vars.snmp_warn = "700"
    vars.snmp_crit = "800"
    check_command  = "centreon-snmp-memory"
}

Or do you need anything else?

garnier-quentin commented 8 years ago

The threshold is in '%'. So you want 700%.

benhartwich commented 8 years ago

Ah, thanks!