Page 1 of 1
how to set warning and critical thresholds for CPU VMWare?
Posted: Wed May 31, 2017 2:32 pm
by gornm565
I started monitoring VMware ESX 6.0 host and it's now working successfully. However, I am not sure how to set the threshold for warning and critical alerts in the GUI in Core Config Manager. Let's say I wanted to alert warning at 85% CPU and to alert critical at 90%.
cpu1.JPG
cpu2.JPG
How would I do it?
Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 3:11 pm
by avandemore
If you run:
Code: Select all
# /usr/local/nagios/libexec/check_esx3.pl -h
You will see the built-in help for the plugin. You will notice it supports
-w and
-c arguments with thresholds described at
http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT
So you would need to add that in as needed to your plugin or service definition.
Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 3:23 pm
by gornm565
So to warn above 85% and for critical above 90%, would this be correct?
cpu3.JPG

Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 3:26 pm
by gornm565
Doesn't look like that works. I did -w 4 -c 5, so it should alert if it's above 5%. But it's not alerting:
cpu4.JPG
Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 3:48 pm
by tgriep
It could be that is you do not specify a sub command, it ignores the threshold settings.
If you want to generate an alert if the CPU usage if too high, add the following to $ARG3$
To specify usage as the subcommand and the thresholds will be used.
Code: Select all
* cpu - shows cpu info
+ usage - CPU usage in percentage
o quickstats - switch for query either PerfCounter values or Runtime info
+ usagemhz - CPU usage in MHz
o quickstats - switch for query either PerfCounter values or Runtime info
^ all cpu info
o quickstats - switch for query either PerfCounter values or Runtime info
Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 3:51 pm
by gornm565
Yes, that was it. Now it works.
Re: how to set warning and critical thresholds for CPU VMWar
Posted: Wed May 31, 2017 4:04 pm
by tgriep
That is good news. If you don't have any questions, shall I close and lock the post for you?