Page 1 of 1
need to custom message when receiving warning and critical
Posted: Wed Sep 04, 2019 8:46 am
by manimurugesan
Hello Team,
We need to custom message when receiving warning alert and critical alert This is for windows drives .
We are monitoring using check_nt only .
is there any way to add this message ?
Re: need to custom message when receiving warning and critic
Posted: Wed Sep 04, 2019 2:39 pm
by benjaminsmith
Hello
@manimurugesan,
There are a few ways to achieve this, and one option would be to create a new notification command (based using existing commands as a template) and assign it to the contacts associated with services for windows drives.
For example, below is the default notification command for hosts ( user accounts):
Code: Select all
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=host --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --datetime="$LONGDATETIME$"
You can alter the command string by adding or removing system/user macros to customize the message. Below are links to documentation and guides to help get you started.
How to Configure Email And Text Notifications
Understanding The User Macros Component
Standard Macros in Nagios
Re: need to custom message when receiving warning and critic
Posted: Thu Sep 05, 2019 3:23 am
by manimurugesan
Hello ,
i mean the custom message should come to status information i don't want any message to my mail or mobile.
Like "critical drive,storage need to extend" this line need to show in status information when warning and critical coming
Re: need to custom message when receiving warning and critic
Posted: Thu Sep 05, 2019 3:23 pm
by benjaminsmith
Hi
@manimurugesan,
i mean the custom message should come to status information i don't want any message to my mail or mobile.
Ok, got it now. The status information is created by the plugin output. You would have to modify the plugin scripts to change the Status Information messages - so it is not easily customized.