NSClient++ Help (#1) - Migration from 0.3 to 0.4 (#960) - Message List

Migration from 0.3 to 0.4

Hello,

I'm trying to migrate to 0.3 to 0.4. I have a problem with hostname in nsca.

Version of NSClient : NSClient++ 0,4,0,163 2012-04-14 x64

My nsca hostname is defined like this :

[/settings/NSCA/client]
; HOSTNAME - The host name of this host if set to blank (default) the windows name of the computer will be used.
hostname = vwbWnyFG7cUdsZ138CeBtKuAo

On my nsca server, I received this hostname : vwbwnyfg7cudsz138cebtkuao

The hostname defined and received are different (upper case is not respected). So my nagios server does'nt recognize the host :

[1334914758] Warning:  Passive check result was received for service '6kFiUYHLfPjZoWBaTcnsQ9umN' on host 'vwbwnyfg7cudsz138cebtkuao', but the host could not be found!

Is there a configuration option to set or it is a bug in NSClient ?

Thank you

  • Message #2546

    Sounds like a bug... darnit... And here I was about to release tonight :)

    Just out of curiosity why is "vwbWnyFG7cUdsZ138CeBtKuAo" then eric_the_windows_server?

    Anyways, Ill look into it tonight and get back during the weekend...

    Michael Medin

    • Message #2547

      Our hostname and service name are unique token which are generate by our software.

      Thank you for your feedback.

    • Message #2548

      I have two another problem.

      Here is my configuration :

      [/modules]
      CheckSystem = 1
      CheckExternalScripts = 1
      NSCAClient = 1
      Scheduler = 1
      [/settings/default]
      allowed hosts = 127.0.0.1
      [/settings/NSCA/client]
      hostname = vwbWnyFG7cUdsZ138CeBtKuAo
      [/settings/NSCA/client/targets/default]
      encryption = 3
      host = my_nsca_server
      port = 5667
      password = xxxxx
      [/settings/scheduler/schedules/default]
      channel = NSCA
      interval = 1m
      report = all
      [/settings/external scripts]
      allow arguments = 1
      allow nasty characters = 1
      command timeout = 60
      [/settings/external scripts/alias]
      a-check-win-cpu = checkCPU warn=$ARG1$ crit=$ARG2$ time=20m time=5m time=5s
      a-check-win-ram = CheckMEM MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll type=physical
      [/settings/log]
      date mask = %Y-%m-%d %H:%M:%S
      file name = nsclient.log
      [/settings/scheduler/default]
      interval = 60s
      [/settings/scheduler/schedules]
      1Uz6uNPTXwDM27atSyh45kvq3 = a-check-win-ram "85" "95"
      [/settings/scheduler/schedules/6kFiUYHLfPjZoWBaTcnsQ9umN]
      alias = 6kFiUYHLfPjZoWBaTcnsQ9umN
      command = a-check-win-cpu "85" "95"
      interval=2m
      

      1. Perf data

      I don't have any perfdata for my two services. I don't find any option to force performance data to be send to my nsca server

      2. CheckCPU

      I want to monitor my CPU load at 5s, 5m and 20m. The "time=5s" option generate an output error :

      ERROR: Could not get data for 5s perhaps we don't collect data this far back?
      

      and an error in nsclient.log 2012-04-20 15:24:29:

      e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:232: Failed to get CPU value: \238(_total)\6: No timeframe given on command line (ie. time=0)
      

      I see that there is an CPUBufferSize option but i don't know if it will resolve my problem and I understand how too configure it.

      Thanks for your help

      • Message #2550
        1. lower case host names: Fixed in 164.
        2. perf data: Fixed in 165
        3. CheckCPU might be fixed in 166 but I did not have time to fix this this weekend... Seems I have botched the default values for frequency and buffer size (frequency seems to be missing all together even). So anything below 10s is currently not supported :(

        Michael Medin

        • Message #2551

          Hi,

          Thanks to have fix 1 and 2.

          Oki for 3.

          Another point : I think that performance data of checkMem script should be rounded. Exemple of performance data :

          'physical memory %'=53%;85;95 'physical memory'=2.1000000000000001G;3.34;3.73;0;3.93
          

          Value of 'physical memory' (2.1000000000000001G). is not rounded as its treshold (3.34;3.73)

        • Message #2552

          Is it possible to download version 165 / 166 somewhere?

          • Message #2553

            Yes, Download section => Nightly builds...

            Michael Medin

Subscriptions