NSCP CPU Check gets wrong values

Hi,

I´ve configured icinga2 director and added a windows host + 3 services:

  • memory
  • cpu
  • disk

All services are using nscp-local-* check commands and I get the right values from disk and memory. CPU shows me 3 cores (although there are 4 cores) and 0% usage, while the usage is about 50%. I can see the correct values at the nscp web ui at the client and the connection between icinga2 and the client icinga2 agent seems fine, when other values are received.

Is there any parameter which I need to set to get the correct cpu values? Or could a prior service config being cached at icinga director? I´ve tried different command / service combinations, but deleted my old configs and deployed it before I recreated the service command at icinga director.

Is there any way to debug this check?

Hi,

that’s a known problem with nscp-local-cpu which only takes a live snapshot, but actually such a check relies on a running service which collects the performance counters and presents an average. For this reason, we’ve created the nscp_api check command and plugin which allows to query the NSClient++ service for these metrics.

Christian will show another approach in his OSMC talk in case you are able to attend :slight_smile:

Cheers,
Michael

Ok, thanks - so I need to create data fields for the arguments and query vars first at icinga director? Is there a full list of arguments and query vars?

You’ll need to look into NSClient’s REST API docs for available queries and parameters. You can also test-drive them on the Windows agent via access to the node in your browser. In terms of execution, please use the command endpoint agent for Icinga to call check_nscp_api on the Windows agent then. That’s safe and secure.

Cheers,
Michael