Cannot see complete output of check_mem in the web interface

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
muammer
Posts: 13
Joined: Tue Jul 07, 2015 7:55 am

Cannot see complete output of check_mem in the web interface

Post by muammer »

Hello,
I have just installed Nagios Version 4.0.8 on Ubuntu 14 in order to monitor Windows 8 R2, Linux servers, routers etc. in our network. I have created a test environment which includes couple of Windows OS, and Ubuntu machines. I have installed Nsclient++ on windows and Nrpe on linux machines. Both system works well for the default command configuration of Nagios except "physical memory usage" of both Windows and Linux machines. Then, for the linux box, I installed perl script https://raw.githubusercontent.com/justi ... eck_mem.pl, configured Nrpe and outputs of the check_nrpe comands seems good;

From Nagios server:
root@ido-n:/usr/local/nagios/libexec# ./check_nrpe -H 172.x.x.x -c check_mem
OK - 55.4% (1067436 kB) free.|TOTAL=1925352KB;;;; USED=857916KB;1540281;1732816;; FREE=1067436KB;;;; CACHES=393112KB;;;;

From Ubuntu client:
root@lion:/etc/nagios# /usr/lib/nagios/plugins/check_mem -f -w 20 -c 10
OK - 58.1% (1119556 kB) free.|TOTAL=1925352KB;;;; USED=805796KB;1540281;1732816;; FREE=1119556KB;;;; CACHES=385324KB;;;;

However, when I check the interface of nagios I see just a part of the check_mem output as in this screenshot:

"Check RAM OK 07-07-2015 16:18:56 0d 2h 19m 49s 1/4 OK - 55.4% (1066580 kB) free."

Is there any idea on how I can see all outputs like total, used, caches etc on the screen? I would appreciate any assistance on this issue.

Regards
Attachments
ubuntu1.png
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Cannot see complete output of check_mem in the web inter

Post by jdalrymple »

If you click on the service and "drill down" to it you will see the additional data. The reason you're not seeing it in the view you've posted is because it's only available as performance data which isn't actually part of the status output. If you want it to show up in that abbreviated view the plugin will have to be modified.
muammer
Posts: 13
Joined: Tue Jul 07, 2015 7:55 am

Re: Cannot see complete output of check_mem in the web inter

Post by muammer »

Thanks for your feedback jdalrymple.
I can see it in the detail page attached. I want to see it in the main page and I dont know how I can modify it. Any offer how I can do that or any other "free" script to get this?

Regards
Attachments
ubuntu2.png
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Cannot see complete output of check_mem in the web inter

Post by jdalrymple »

Find hacked script attached.
Attachments
check_mem.pl
(12.63 KiB) Downloaded 227 times
muammer
Posts: 13
Joined: Tue Jul 07, 2015 7:55 am

Re: Cannot see complete output of check_mem in the web inter

Post by muammer »

Thank you so much jdalrymple. That is what I wanted:)
One more question, Is there a chance to show up these numeric values in MB or GB not in KB?

Kind regards
Attachments
ubuntu3.png
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Cannot see complete output of check_mem in the web inter

Post by jdalrymple »

More barbaric hacking - no guarantees whatsoever:
Attachments
check_mem_GB.pl
(12.85 KiB) Downloaded 218 times
check_mem_MB.pl
(12.82 KiB) Downloaded 216 times
muammer
Posts: 13
Joined: Tue Jul 07, 2015 7:55 am

Re: Cannot see complete output of check_mem in the web inter

Post by muammer »

Greatly appreciate all your efforts jdalrymple.
Both script are working very well:) Now I am more comfortable with these outputs.

Kind regards
Attachments
ubuntu4.png
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Cannot see complete output of check_mem in the web inter

Post by tmcdonald »

Are we all set to close this thread?
Former Nagios employee
muammer
Posts: 13
Joined: Tue Jul 07, 2015 7:55 am

Re: Cannot see complete output of check_mem in the web inter

Post by muammer »

tmcdonald wrote:Are we all set to close this thread?
Yes, please.
Locked