• Sponsorship

  • Problems

    1. I am having problems where do I start?

    NSCP has a built-in "test and debug" mode that you can activate with the following command

    nsclient++ /test
    

    What this does is two things.

    1. it starts the deamon as "usual" with the same configuration and such.
    2. it enables debug logging and logs to the console.

    This makes it quite easy to see what is going on and why things go wrong. .

    2. Failed to open performance counters

    • The first thing to check is the version if you are using an old version (pre 0.3.x) upgrade!
    • Second thing to check are your performance counters working? Sometimes the performance counters end up broken end need to be rebuilt See forum post: here for details

    3. Bind failed

    • Usually this is due to running more then once instance of NSClient++ or possibly running another program that uses the same port.
      • Make sure you don't have any other instance NSCLient++ started.
      • Check if the port is in use (netstat -a look for LISTENING)

    4. "EvenlogBuffer?? is too small

    • This is because you have one or more entries in your eventlog which are larger then the "default buffer size of 64k". The best way to fix this is to increase the buffer used.
      [EventLog]
      buffer_size=128000
      

    5. How do I properly escape spaces in strings

    When you need to put spaces in a string you do the following:

    • nagios:
      • As usual you can do it anyway you like but I prefer: check_nrpe ... 'this is a string'
    • NSClient++ (inject, alias, external, etc...)
      • The parser is badly written so the only option is:
        CHeckSomething "this is a string"
        CheckEventLog "filter-message=substr:Hello World"
        
      • Not for instance:
        filter-message="substr:Hello World"
        filter-message=substr:"Hello World"
        

    6. How do I properly escape $ in strings

    From:

    • nagios:
      • $$ (you use two $ signs)
    • from NSClient++
      • $ (you do not need to escape them at all)