Monitoring MAC OS
Monitoring MAC OS
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.
Follows the image.
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MAC OS
What version of NRPE / Nagios Plugins are you using?
Former Nagios Employee.
me.
me.
Re: Monitoring MAC OS
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'Former Nagios Employee.
me.
me.
Re: Monitoring MAC OS
[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
OK: Memory Usage - % RAM, 19.82% Swap | phyUsed=%;10;5;0;100 swpUsed=19.82%;;;0;100
Re: Monitoring MAC OS
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 -vBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring MAC OS
Following the result.
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MAC OS
I was able to recreate the issue:
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?
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;100I 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring MAC OS
No, i didnt make any change in this files. I just downloaded and installed.
Re: Monitoring MAC OS
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!