New NCPA aggregate=avg function killing graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

New NCPA aggregate=avg function killing graphs

Post by krobertson71 »

We are no longer getting graph data on CPU checks after we added the -q aggregate=avg to it.
Selection_237.png
Is there a way to correct this behaviour? Maybe delete the perf data? Want to get some suggestions on this before I try anything. I have already deleted the CPU check and recreated with the -q aggregate=avg built in fresh, to no avail.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: New NCPA aggregate=avg function killing graphs

Post by tgriep »

Lets see what the perf data is returning now. Go to that service and click on the advanced tab, screen capture it and post it here.
Be sure to check out our Knowledgebase for helpful articles and solutions!
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: New NCPA aggregate=avg function killing graphs

Post by krobertson71 »

Here it is. I think the issue is with performance data being returned. This is a 12 core server. Here is the check command:

check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M cpu/percent -w 90 -c 97 -q 'aggregate=avg'
Selection_238.png
The aggregation works fine, but since we implemented the change to the currently existing checks, the graph now shows no data. We also tried to completely remove the check and redo with the -q aggregate=avg from the beginning. Worked for 1 check then stopped putting anything into the graph.

Again the check itself does work, but not being able to graph the data kills reporting and capacity planning.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: New NCPA aggregate=avg function killing graphs

Post by Box293 »

I think the perfdata logs might shed some light onto this.

Follow the steps here:
http://support.nagios.com/wiki/index.ph ... h_Problems
To increase logging. Then submit another check result and wait about 15 minutes.

After that attach the log files here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: New NCPA aggregate=avg function killing graphs

Post by krobertson71 »

log attached.

Did not see any errors per say, but did see one host that has two cores and shows up like this now in the graph, with no data. Notice the labels at bottom of graph.
Selection_239.png
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: New NCPA aggregate=avg function killing graphs

Post by lmiltchev »

What is the version of the NCPA agent that you are currently running? Did you upgrade to 1.8.1?
Be sure to check out our Knowledgebase for helpful articles and solutions!
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: New NCPA aggregate=avg function killing graphs

Post by krobertson71 »

Sorry yes.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: New NCPA aggregate=avg function killing graphs

Post by lmiltchev »

I was not able to recreate the issue. I am using the same command as you:

Code: Select all

check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M cpu/percent -w 90 -c 97 -q 'aggregate=avg'
Here's a test check from the CLI:

Code: Select all

./check_ncpa.py -H x.x.x.x -t mytoken -P 5693 -M cpu/percent -q 'aggregate=avg' -w 20 -c 40
OK: percent was 2% | 'percent_0'=2%;20;40;
and here is the graph:
example01.PNG
I would recommend deleting the RRD and the XML files, then waiting for 15-20 min. The RRD and the XML files will be recreated and the graph *should* show up.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: New NCPA aggregate=avg function killing graphs

Post by krobertson71 »

Are you testing that on a multi cpu box. That graph looks to be a since cpu.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: New NCPA aggregate=avg function killing graphs

Post by lmiltchev »

Code: Select all

lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 44
Stepping:              2
CPU MHz:               2793.000
BogoMIPS:              5586.00
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
What I see in the API:

Code: Select all

URL=https://192.168.x.x:5693/api/cpu/percent

Code: Select all

{
  "value": {
    "percent": [
      [
        4.0, 
        1.0, 
        4.0, 
        2.0
      ], 
      "%"
    ]
  }
}

Code: Select all

URL=https://192.168.x.x:5693/api/cpu/percent?aggregate=avg

Code: Select all

{
  "value": {
    "percent": [
      [
        0.75
      ], 
      "%"
    ]
  }
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked