Hi Zachary,

May I ask you to explain with a little more details? I'm interested.
Did you change things in Icinga2 or did you modify the check itself (or a 
wrapper)?

Thanks,
Samuel Bancal

On 17. 11. 15 20:41, Zachary McGibbon wrote:
I think I found an easier way.. I got rid of using units and just added my 
value into the label instead, now it's all good :)

On Tue, Nov 17, 2015 at 1:20 PM, LaJoie, Chris <ch...@etriptrader.com 
<mailto:ch...@etriptrader.com>> wrote:

    I've had the same issue with some check plugins that are apparently 
designed to work with other systems.

    What I did was write a wrapper script that uses sed to remove the unit 
indicator. Then I point the CheckCommand to that script instead. Here's one 
example:

    #!/bin/bash

    /etc/icinga2/myscripts/check_openmanage $@ | sed -E 's/RPM;/;/g'

    exit ${PIPESTATUS[0]}

    The ${PIPESTATUS[0]} gets the exit code of the first command in the 
pipeline.

    Hope that helps. Cheers.

    Chris

    *From:*icinga-users [mailto:icinga-users-boun...@lists.icinga.org 
<mailto:icinga-users-boun...@lists.icinga.org>] *On Behalf Of *Zachary McGibbon
    *Sent:* Tuesday, November 17, 2015 9:53 AM
    *To:* Icinga User's Corner <icinga-users@lists.icinga.org 
<mailto:icinga-users@lists.icinga.org>>
    *Subject:* [icinga-users] Graphite writer and perf data

    Is something wrong in my config?  Graphite seems to be refusing a lot of my 
performance data.  Is there a space missing after the number and the unit?

    Here is a snippet:

    [2015-11-17 11:49:06 -0500] warning/GraphiteWriter: Ignoring invalid 
perfdata value: iso.3.6.1.2.1.105.1.3.1.1.4.1=77Watts;180;190;

    Context:

            (0) Processing check result for 'leacock-poe-b2!POE - Load'

    [2015-11-17 11:49:06 -0500] warning/GraphiteWriter: Ignoring invalid 
perfdata value: iso.3.6.1.4.1.7428.1.2.2.1.1.2.1=49Volts;;55;

    Context:

            (0) Processing check result for 'mni-poe-1b!POE - Volts'

    [2015-11-17 11:49:06 -0500] warning/GraphiteWriter: Ignoring invalid 
perfdata value: iso.3.6.1.4.1.3375.2.1.3.6.2.1.3.0.1=9375RPM;10000;11000;

    Context:

            (0) Processing check result for 'datacentre-dev-slb2!F5 - CPU Fan 
Speed'

    example of the poe volts:

    template Service "generic-service-mcgill" {

            import "generic-service"

    max_check_attempts              = 3

            check_interval                  = 5m

            retry_interval                  = 30s

            check_period                  = "24x7"

    enable_notifications            = true

            enable_flapping                 = true

            enable_perfdata                 = true

    }

    template Service "poe-snmp" {

            import "generic-service-mcgill"

            check_command = "snmp"

            check_interval = 5m

            retry_interval = 30s

    vars.snmp_community = snmp_poe

    vars.snmp_version = "2c"

    }

    apply Service "POE - Volts" {

            import "poe-snmp"

            vars.snmp_oid = "1.3.6.1.4.1.7428.1.2.2.1.1.2.1"

            vars.snmp_crit = "46:55"

            vars.snmp_units = "Volts"

            assign where "POE" in host.groups

    }


    _______________________________________________
    icinga-users mailing list
    icinga-users@lists.icinga.org <mailto:icinga-users@lists.icinga.org>
    https://lists.icinga.org/mailman/listinfo/icinga-users




_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

--
Samuel Bancal
ENAC-IT
EPFL

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to