NSClient++ Help (#1) - CheckProcState - unable to search for process based on command line parameter...? (#891) - Message List

CheckProcState - unable to search for process based on command line parameter...?

Hi all!

New to Nagios and NSClient here so I am hoping someone can lead me in the right direction.

I am trying to use the CheckProcState to look for the status of specific processes with specific command line parameters... however I found a bug here that appears to have come up about 3 months ago where it appears that searching either by a regular expression or by substring fails...

I have version 0.3.9.330 released on 2011-09-02 of NSClient... does anyone know if it has been fixed? If so - can someone please provide a command example?

For what it's worth, I've tried one based on the tutorial:

check_nrpe -H IP -p 5666 -c CheckProcState -a match=regexp cmdLine ShowAll .*cmd.*javaw.*=started

Basically looking for the cmd.exe process with javaw in the command line parameter (...\JRE\bin\javaw...), but all I get is CRITICAL: .*cmd.*.*javaw.*: stopped (critical)|'.*cmd.*.*javaw.*'=0;0;0

Any ideas of what I may be doing wrong, or is it still an issue?

Also - is there anyway to also report the actual memory utilization of a process by searching for the command line parameter? A little background: I have, on average, 10-12 java.exe processes, each running with a different command line parameter, and I'd love to be able to check each one via Nagios AND also see how much RAM (and CPU utilization... but beggars cannot be choosers) it eats...

Thanks!!

  • Message #2381

    Anyone....?

  • Message #2392

    Unfonrtunetly there is no way to get the command line arguments.

    There are some hacks (which I use) but I noticed my hack was not working on my x64 machine (which makes sense since address sizes are not the same) so I have updated this and the next beta of 0.4.0 will feature a x64 compatible command line thingy...

    Michael Medin

    • Message #2394

      Could you share your h@x, if you do not mind?

      Thanks!

      • Message #2395

        It will be in the next beta of 0.4.0 (later tonight I think).

        Michael Medin

        • Message #2400

          It will be in the next beta of 0.4.0 (later tonight I think).

          Michael Medin

          I shall anxiously wait!

          • Message #2401

            Build 118 of 0.4.0 is avalible now... (Which should fix this issue, notice there are a lot of changes in 0.4.0 as well as it is "unstable" (beta) so use with care...)

            • Message #2407

              Howdy - I just installed the latest 0.4.0 build 118 on one of my development boxes; the install was a clean one (not that it appears to matter) - uninstall old client, install new client.

              Now, however, it appears that the box is refusing all connections from my Nagios host... I checked the INI file and I have everything configured properly except one thing that caught my eye:

              ;# USE THIS FILE ; Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1 ; the registry will be used instead. use_file=0 allowed_hosts=xxx.xxx.xxx.xxx

              I believe that the client may be reading settings from the registry as opposed to the INI file; I can't find where the use_reg key is so I think that may be messing things up...

              Thoughts?

              Thanks :)

              • Message #2409

                Noop, that is no londer used...

                If you want to check which files is used either start it in test mode nscp test (or open boot.ini and check).

                Michael Medin

                • Message #2412

                  Noop, that is no londer used...

                  If you want to check which files is used either start it in test mode nscp test (or open boot.ini and check).

                  Michael Medin

                  I'll give the RC1 a try and see how it behaves... also for whatever reason my account here got wiped :x but it's back up now :)

                  • Message #2413

                    Noop, that is no londer used...

                    If you want to check which files is used either start it in test mode nscp test (or open boot.ini and check).

                    Michael Medin

                    I'll give the RC1 a try and see how it behaves... also for whatever reason my account here got wiped :x but it's back up now :)

                    So I tried getting the latest version (121) a try but I am still getting the same problem. I've confirmed via the test command that I am indeed using the .ini file; I went as far as copying the contents of my old ini file and using that, restart the service but still - I try to monitor a machine via a check_nt command on the NAGIOS host and it still responds with 'connection refused.'

                    Went back to 0.3.9 - and boom, works like a charm....

                    Any ideas?

            • Message #2408

              oops - double post

Subscriptions