Page 1 of 1

Cannot see complete output of check_mem in the web interface

Posted: Tue Jul 07, 2015 8:46 am
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

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

Posted: Tue Jul 07, 2015 8:56 am
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.

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

Posted: Tue Jul 07, 2015 9:46 am
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

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

Posted: Tue Jul 07, 2015 10:04 am
by jdalrymple
Find hacked script attached.

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

Posted: Wed Jul 08, 2015 3:22 am
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

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

Posted: Wed Jul 08, 2015 9:34 am
by jdalrymple
More barbaric hacking - no guarantees whatsoever:

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

Posted: Thu Jul 09, 2015 2:04 am
by muammer
Greatly appreciate all your efforts jdalrymple.
Both script are working very well:) Now I am more comfortable with these outputs.

Kind regards

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

Posted: Thu Jul 09, 2015 9:22 am
by tmcdonald
Are we all set to close this thread?

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

Posted: Tue Oct 20, 2015 3:59 am
by muammer
tmcdonald wrote:Are we all set to close this thread?
Yes, please.