NSClient++ Help (#1) - missing performance data from external script (#958) - Message List

missing performance data from external script

Running version NSCP-0.4.0.160-x64

Running an external .wsf script.

Works just great, except I am not getting my performance data returned.

(This worked fine under ver NSClient++-0.3.7-x64)

checked the setting: performance data = true

But the pipe char and everything afterwards is stripped from my script output:

Replay OK: Target [custhost.mydomain.local] Total used:9.5GB

Any ideas?

  • Message #2596

    +1

    I am attempting to pass performance data from a custom script back to Nagios. When running /usr/lib/nagios/plugins/check_nrpe in SSH on the Nagios server, I do not see any performance data returned.

  • Message #2736

    I'm running version 0.4.0.183-x64 and 0.4.1.35-x64 on windows server 2008, no one returns performace data while the "performance data = 1" directive is set.

    • Message #2737

      Most likely this is due to performance data syntax issues and/or bug in nsclient++. Please provide example of performance data which fails to parse...

      Michael Medin

      • Message #2738

        0.4.x parses performance data internally so parsing issues will cause "missing performance data" problems...

        • Message #2739

          I execute a batch file with the follow line to return performace data:

          echo OK - Pattern-Date: %FormatiertAktPatternDate% - [Erlaubte Differenztage: %MaxPatternUpdate%: %MaxLastUpdate% ] - CheckPatter: v%CheckVersion% ^| PatternStatus=%Differenz%;;%MaxPatternUpdate%;;
          

          With the old nsclient version 3.x, this solution works. In the new version 0.4 everthing follow the pipe character will be missing.

          • Message #2746

            Is this still the escape methode?

            • Message #2747

              Sorry I haven't looked into this I will try to resolve this in the next build of 0.4.1...

              • Message #2756

                With the version NSCP-0.4.1.48-x64 it still doesn't work. :(

                • Message #2759

                  Sorry, ran into some issues with the build environment I had to resolved first.

                  Should be fixed in latest build of 0.4.1. But let me know if this is ok for you, what I did was add the "missing" 0 in the performance data...

                  • Message #2760

                    I run now the version NSCP-0.4.1.50-x64 with the following config:

                    CheckExternalScripts = 1
                    NRPEServer = 1
                    [/settings/NRPE/server]
                    allowed hosts =
                    allow arguments = true
                    allow nasty characters = true
                    port = 5666
                    timeout = 60
                    use ssl = 1
                    performance data = 1
                    [/settings/external scripts]
                    allow arguments = 1
                    allow nasty characters = 1
                    timeout = 60
                    [/settings/external scripts/scripts]
                    check_pattern = "C:/Program Files/NSClient++/scripts/CheckPattern.bat" $ARG1$
                    

                    It still doesn't return performance data. :(

                    • Message #2761

                      Could you run the CheckPattern?.bat script and give me the exact output? Humm, wonder if it actually is the leading space... I think my test might have been with

                      ...^|PatternStatus...
                      

                      not

                      ...^| PatternStatus...
                      

                      Feel free to validate this and I shall try to see if that s it and add support for that as well...

                      • Message #2762

                        Year, great! It works fine with no leading space! Thank you very much!

                        Regards

                        • Message #2763

                          Buuuut :) the performance values will be not processed correct.

                          Value output from the script on cmd:

                          PatternStatus=-2;;-3;;
                          

                          Value output at the Nagios Site with nrpe:

                          'PatternStatus'=2;0;0
                          

                          It seems like negative values where processed wrong!?

                          • Message #2764

                            negative values? Ahh, right... silly me... will fix tomorrow night (am busy tonight)... Will also add support for leading spaces...

                            Michael Medin

                            • Message #2788

                              I have just test the NSCP-0.4.1.58-x64 version. The issue with negative values are still there. It won't work. :(

                              Another abnormality I have seen is:

                              On the windows cmd site, the output shows:

                              OK - Last Pattern Update: 12.09.2012 - Allowed Spread Days: -3: 10.09.2012
                              CheckPatter Version: 2.0 |PatternStatus=-2;;-3;;
                              

                              On the Nagios site:

                              'PatternStatus'=2;0;0
                              

                              It looks like, everything follow the second semicolon will be cut.

                              • Message #2801

                                Hi there!

                                I had also some problems with performance-data in 0.4.0. My WSUS-Script outputs some weird formation - in 0.4.1.58-nighty this is working with some whitespace-corrections.

                                But - two or three times a week my nsclient on this machine got "stuck" with following message by check_nrpe

                                "Exception processing request: Invalid packet length: 1059 != 1036 configured payload is: 1024"

                                After reload of the nsclient service this is working again.

                                How can i help debugging this issue?

                                Thomas

                                • Message #2803

                                  I think this could be a residu of an earlier "invalid read" (it only clears the buffer when it gets a valid packet).

                                  This is a bug which will be fixed in next nighly build of 0.4.1. If you can verify this I can backport it...

                                  Michael Medin

                            • Message #3157

                              Hi!

                              Negative values already fixed? I'm using 0.4.1.90 here, the problem still occures. In which version should it be fixed?

                              • Message #3158

                                If I recall correctly it was after 90 possibly 100, if you check the changlog it should say "it is fixed" somewhere at the top if you have the right version.

                                Michael Medin

                                • Message #3159

                                  Thank you! Yes with the RC (build 99) it works.

                                  Best regards, Guenther

                                  • Message #3161

                                    Thanks for reporting back, and glad it fixed the issue. I have one issue (NSCA hostnmae) to fix and then a new 0.4.1 will be released.

                                    Michael Medin

Subscriptions