Page 1 of 2
Monitoring MAC OS
Posted: Fri Feb 19, 2016 2:52 pm
by paulol
Im monitoring some MAC machines with NRPE. I created the host and services with the wizard "MAC OS X" but the memory usage doesnt show anything, only swap.
Follows the image.
Re: Monitoring MAC OS
Posted: Fri Feb 19, 2016 3:07 pm
by hsmith
What version of NRPE / Nagios Plugins are you using?
Re: Monitoring MAC OS
Posted: Fri Feb 19, 2016 3:48 pm
by paulol
Re: Monitoring MAC OS
Posted: Mon Feb 22, 2016 10:34 am
by hsmith
Can you run this from the command line?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H IPADDRESSOFYOUROSXMACHINE -c check_mem -a '-w 10 -c 5'
Re: Monitoring MAC OS
Posted: Mon Feb 22, 2016 4:23 pm
by paulol
[root@DOUAI libexec]# ./check_nrpe -H 192.168.0.71 -c check_mem -a '-w 10 -c 5'
OK: Memory Usage - % RAM, 19.82% Swap | phyUsed=%;10;5;0;100 swpUsed=19.82%;;;0;100
Re: Monitoring MAC OS
Posted: Mon Feb 22, 2016 4:37 pm
by lmiltchev
The "check_mem" uses the "check_osx_mem.sh" plugin. As far as I remember, this used to work. I am not sure what changed, i.e. a new version of "top" or "bc"... Log into the OSX box, run the following command, and show us the output:
Code: Select all
/usr/local/nagios/libexec/check_osx_mem.sh -v
Re: Monitoring MAC OS
Posted: Tue Feb 23, 2016 8:36 am
by paulol
Following the result.
Re: Monitoring MAC OS
Posted: Tue Feb 23, 2016 12:03 pm
by lmiltchev
I was able to recreate the issue:
Code: Select all
sh-3.2# ./check_osx_mem.sh -v
expr: syntax error
(standard_in) 1: parse error
pctPhyUsed=
(standard_in) 1: parse error
pctPhyAllUsed=
pctSwpUsed=60.05
rawOutput=0
pctWarning=
pctCritical=
pctSwpWarning=
pctSwpCritical=
OK: Memory Usage - % RAM, 60.05% Swap | phyUsed=%;;;0;100 swpUsed=60.05%;;;0;100
I spoke to one of our developers, and I was told that the plugin no longer shows the correct output, because of some changes made by apple. It will take some time before the plugin is fixed/patched.
I noticed that in addition to the issues I see (in my output), you also have an "illegal character: M" error. Did you try to modify this plugin in a text editor?
Re: Monitoring MAC OS
Posted: Tue Feb 23, 2016 12:28 pm
by paulol
No, i didnt make any change in this files. I just downloaded and installed.
Re: Monitoring MAC OS
Posted: Tue Feb 23, 2016 12:41 pm
by lmiltchev
I see. I filed an internal bug report to our system (TASK ID 7839). It is up to our developers now to fix/patch the plugin. Thank you!