Page 1 of 2

The Metrics module has issue with Memory/CPU usage for UNIX

Posted: Fri Jul 06, 2012 11:50 am
by rez1sog
I am running version 2011R3.2 of NagiosXI on CentOS 5.6. One of the components that I have installed is called "Metrics". We have both LINUX and Windows servers in the environment.

I can get the Window servers to show Metrics on the Disk, CPU, Memory, Load, and Swap just fine.

I can get the LINUX servers to show Metrics on the Disk, Load, and Swap just fine.

When I try to get the Metrics for the LINUX server on CPU and Memory, it shows up as "No matching data to display".

When I check the LINUX servers by themselves under services, I can seem memory and CPU ok.

I am wondering why it does not show up under Metrics? Thoughts?

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Fri Jul 06, 2012 1:00 pm
by rez1sog
Here is some more info on my setup.


Nagios XI Installation Profile
Download Profile
System:
nagiosxi 2.6.18-308.4.1.el5 x86_64
CentOS release 5.6 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.1.6
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Server Name: nagiosxi
Server Address: 10.20.20.74
Server Port: 80
Date/Time
PHP Timezone: America/New_York
PHP Time: Fri, 06 Jul 2012 13:56:17 -0400
System Time: Fri, 06 Jul 2012 13:56:17 -0400
Nagios XI Data
nagios (pid 18558) is running...
NPCD running (pid 4254).
ndo2db (pid 9105) is running...
CPU Load 15: 1.42
Total Hosts: 232
Total Services: 1987
Function 'get_base_uri' returns: http://nagiosxi/nagiosxi/
Function 'get_base_url' returns: http://nagiosxi/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://nagiosxi/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost
Running:

/bin/ping -c 3 localhost 2>&1

PING nagiosxi (127.0.0.1) 56(84) bytes of data.
64 bytes from nagiosxi (127.0.0.1): icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from nagiosxi (127.0.0.1): icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from nagiosxi (127.0.0.1): icmp_seq=3 ttl=64 time=0.023 ms

--- nagiosxi ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.022/0.026/0.034/0.006 ms
Test wget To locahost
WGET From URL: http://localhost/nagiosql/index.php
Running:

/usr/bin/wget http://localhost/nagiosql/index.php

--2012-07-06 13:56:19-- http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `/tmp/nagiosql_index.tmp'

0K ..... 100% 186M=0s

2012-07-06 13:56:19 (186 MB/s) - `/tmp/nagiosql_index.tmp' saved [5259/5259]

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Fri Jul 06, 2012 4:04 pm
by scottwilkerson
The metrics component is in the process of having additional items added to it.

For the Linux servers, they show under load whereas the Windows are showing under CPU Usage.

Memory as you mentioned is currently only available on Windows systems.

We have added a revision to this component to the roadmap to add additional features to better view infrastructure as a whole.

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Mon Jul 09, 2012 8:18 am
by rez1sog
It was not exactly the answer I was hoping for, but I am glad that it will be rolled out in a future release. Which release is it projected to be rolled out in and when?

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Mon Jul 09, 2012 9:15 am
by scottwilkerson
Unfortunately I don't have a date at this time, as the revisions haven't even been assigned to a developer yet.

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Mon Jul 09, 2012 11:32 am
by rez1sog
Thanks. I am wondering if they are going to fix how the SWAP gets reported. Some of our servers say the "Swap Utilization" is at 534% or 190%. I figure that this is due to the fact that it has more than one CPU. The code needs to be changed so that it divides the results by the number of CPU's or something.

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Mon Jul 09, 2012 12:09 pm
by scottwilkerson
rez1sog wrote:I am wondering if they are going to fix how the SWAP gets reported. Some of our servers say the "Swap Utilization" is at 534% or 190%.
What plugin are you using that is retuning this?

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Tue Jul 10, 2012 9:35 am
by rez1sog
When I look at it under Service Detail, it looks ok.

SWAP OK - 87% free (3498 MB out of 4031 MB)

Under the Metrics it says it is 553%

I got the Metrics plugin from your site at:

http://exchange.nagios.org/directory/Ad ... nt/details

I hope that this helps.

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Tue Jul 10, 2012 1:30 pm
by scottwilkerson
Thanks! I did find a bug in the calculation.

Unzip the attached file and place it in

Code: Select all

usr/local/nagiosxi/includes

Re: The Metrics module has issue with Memory/CPU usage for U

Posted: Tue Jul 10, 2012 1:56 pm
by rez1sog
Thanks. That looks a lot better. Now if someone will just send me a link so I can download this:

http://labs.nagios.com/2011/09/02/sched ... velopment/

I will be in heaven. I have been waiting almost a week now..