Hi ,
Currently when an alert related to CPU load is generated in Nagios its being shown as below :
CPU Load 98% (5 min average) 5 min avg Load = 98%;80;90;0;100
I want to modify the alert to be shown as below :
CPU global use threshold exceeded (at least 92%)
Can anyone please guide me with the process to modify the alert . It would be of great help if the steps to do modification are shared.
Many thanks,
Regards,
Ranjit W
Alert Message
Re: Alert Message
It may be possible to modify the plugin and change the output. What is the plugin that you are using to check the CPU load?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Alert Message
Hi lmiltchev,
I am using check_nt and check_nrpe plugins .
Regards,
Ranjit W
I am using check_nt and check_nrpe plugins .
Regards,
Ranjit W
Regards,
Ranjit W
Ranjit W
Re: Alert Message
Where are you getting the "at least 92%" part? I see in your example that the usage is 98% and is set to warn at 80% and go critical at 90%. I do not see how 92% is being calculated, so it will be hard to guess what value to use.
Former Nagios employee
Re: Alert Message
Hi tmcdonald,
The value would remain the same I want to modify the alarm message to be like CPU global use threshold exceeded (at least xx%) instead of
CPU Load xx% (5 min average) 5 min avg Load = 98%;80;90;0;100.
Is there a way to modify this ?
Regards,
Ranjit W
The value would remain the same I want to modify the alarm message to be like CPU global use threshold exceeded (at least xx%) instead of
CPU Load xx% (5 min average) 5 min avg Load = 98%;80;90;0;100.
Is there a way to modify this ?
Regards,
Ranjit W
Regards,
Ranjit W
Ranjit W
Re: Alert Message
Have you looked on Nagios Exchange for plugins that may better accomplish what you're looking to do here? It's probably easier than modifying an existing plugin. It sounds like you're looking to change the way the function works completely instead of just modifying the output, if I am understanding you correctly.
Former Nagios Employee.
me.
me.
Re: Alert Message
Orrr....you could write a simple shell script that is your new plugin (maybe call it check_cpu_with_bonus_action), have it call the appropriate "real" plugin, then use awk and/or sed to pull the field(s) you want and rewrite the output to pass it up the chain. Awkward, but brute-force efficient (and faster) than writing your own plugin.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Alert Message
@ranjitw - Do either of these solutions work for you?
Re: Alert Message
Hi ,
Please see the image I want the alarm to be modified can this is done at UI level ?
Regards,
Ranjit W
Please see the image I want the alarm to be modified can this is done at UI level ?
Regards,
Ranjit W
You do not have the required permissions to view the files attached to this post.
Regards,
Ranjit W
Ranjit W
Re: Alert Message
Do you just want the words to be different? I am a little confused by what you're trying to ask for in that screenshot.
Former Nagios Employee.
me.
me.