Page 1 of 1
Server Statistics dashlet not showing CPU Stats
Posted: Thu Dec 24, 2020 10:54 am
by J.A.K
For some reason my Server Statistics dashlet won't display CPU information on my XI server
Capture.PNG
Everything else displays fine and I can still pull CPU load with service checks without issue. Any idea what may be wrong?
Re: Server Statistics dashlet not showing CPU Stats
Posted: Mon Dec 28, 2020 2:25 pm
by dchurch
What distro are you running?
If you PM me a system profile I can diagnose further. Get one by going to Admin (top menu) => System Profile (in the left menu), then clicking the blue button.
Edit: Profile received. Not adding this to a reply below because it would bump it from the queue.
Re: Server Statistics dashlet not showing CPU Stats
Posted: Mon Dec 28, 2020 4:42 pm
by J.A.K
Ty. Sent that over your way.
Re: Server Statistics dashlet not showing CPU Stats
Posted: Tue Dec 29, 2020 4:45 pm
by dchurch
Profile received. Looks like the process that inserts system stat info into the database is coming up empty when it asks the system for it.
What output does the following command produce?
And this one?
Re: Server Statistics dashlet not showing CPU Stats
Posted: Tue Dec 29, 2020 10:02 pm
by J.A.K
capture2.PNG
First one looks fine to me I also tried it as the Nagios account to make sure. Second one says disabled.
Re: Server Statistics dashlet not showing CPU Stats
Posted: Wed Dec 30, 2020 12:36 pm
by dchurch
It appears the piece of code that munges the output from the iostat program isn't compatible with both the new (Ubuntu 18+, RHEL 8+) and older (Cent7) versions.
I submitted a bug report to fix this. With any luck, it'll get included in the next release cycle of Nagios XI 5.7.6.
In the mean time, here are steps you can follow as a temporary workaround:
- Edit /usr/local/nagiosxi/cron/sysstat.php
- On line 268, where it says:
Code: Select all
$cmdline = sprintf("/usr/bin/iostat -c 5 2 | tail --lines=2 | head --lines=1 | awk '{ print $1,$2,$3,$4,$5,$6 }'");
Replace this with:
Code: Select all
$cmdline = '/usr/bin/iostat -c 5 2 | grep -v \'^ *$\' | tail -1 | awk \'{ print $1,$2,$3,$4,$5,$6 }\'';
Re: Server Statistics dashlet not showing CPU Stats
Posted: Wed Dec 30, 2020 12:59 pm
by J.A.K
Yep changed that and restarted the monitoring engine and they immediately appeared. Thank you!