Alert Message

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Alert Message

Post by ranjitw »

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
Regards,
Ranjit W
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Alert Message

Post by lmiltchev »

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!
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Alert Message

Post by ranjitw »

Hi lmiltchev,

I am using check_nt and check_nrpe plugins .

Regards,
Ranjit W
Regards,
Ranjit W
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Alert Message

Post by tmcdonald »

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
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Alert Message

Post by ranjitw »

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
Regards,
Ranjit W
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Alert Message

Post by hsmith »

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.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Alert Message

Post by eloyd »

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.
Image
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

Post by scottwilkerson »

@ranjitw - Do either of these solutions work for you?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Alert Message

Post by ranjitw »

Hi ,

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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Alert Message

Post by hsmith »

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.
Locked