NSClient++ Help (#1) - send some performance data (#424) - Message List

send some performance data

I need to send some performance data back to the nagios.

Currently im monitoring a system using those External Scripts, but what i only get is status and some other details

Can you please give me a sample of a .bat file which sends back performance data as well.

And i need to know the format of performance data. (If there is any specific way)

BR,

Tree View Flat View (newer first) Flat View (older first)
  • Message #1318

    Can fix that later on, but in essence, the preformance data is passed "as is" so check how it looks for another command.

    In short though:

    echo <string>|<performance data>
    exit <code>
    

    <performance data> is along the following lines (dont recall from the top of my head so this is "aproximation"): <key>=<value>;<warn>;<crit;<max>;<min>;

    so:

    echo OK We are all good|perfdata=34;10;12;100;0
    exit 0
    

    But again, I dont recall the exact syntax so check the nagios docs or a command...

    Michael Medin

  • Message #1320

    I tried in the same way. And i checked it in the nagios plugins as well.

    But when ever i add the grep symbol to that line it starts giving this error in the nagios. And the status of it changers to UNKNOWN as well. Status Information:'perfdata' is not recognized as an internal or external command, operable program or batch file.

    Can you please give a try on this and check an possible way to do this.

    Thank you

  • Message #1321

    The error code inside the NSClient++ is

    error:modules\CheckExternalScripts\CheckExternalScripts.cpp:141: The command (scripts\fi.oulu.ubilife.rm.core.NFCReader.bat) returned an invalid return code: 255

  • Message #1322

    ohh...

    The | char is a command so you need to escape it like so:

    C:\>echo foo|bar
    bar är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    C:\>echo "foo|bar"
    "foo|bar"
    

    MickeM

  • Message #1323

    That will give you "":s though which you probably dont want and on NT based windows there are ways around it: http://ss64.com/nt/echo.html

    Like so:

    C:\>echo foo^|bar
    foo|bar
    

    MickeM

  • Message #1324

    Thank you MickeM

    now it works fine

Tree View Flat View (newer first) Flat View (older first)

Subscriptions