Page 1 of 1
Nagios Alerts in DBCS
Posted: Fri Dec 11, 2015 6:48 am
by dhineshkumar
Hi,
I have installed Nagios core 4.x. Now i have a requirement to send alerts in DBCS format to alert integrator.
Is it possible to send the alerts in DBCS.
Thanks.
Re: Nagios Alerts in DBCS
Posted: Fri Dec 11, 2015 10:34 am
by hsmith
Can I please get some clarification on what DBCS is supposed to do? I'm not familiar with it. You can change your
/usr/local/nagios/etc/objects/commands.cfg to whatever you like.
By default, core uses these commands to send out alerts:
Code: Select all
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Changing those to whatever you need in your situation seems like it would be the easiest fix.
Re: Nagios Alerts in DBCS
Posted: Mon Dec 14, 2015 2:23 am
by dhineshkumar
DBCS format is send out to alert integrator, so it can be converted in to Japanese or Chinese.
I have gone through these, but could not find a way to send the alert in DBCS or Japanese format.
Re: Nagios Alerts in DBCS
Posted: Mon Dec 14, 2015 10:30 am
by hsmith
Unfortunately, it is something you are most likely going to have to script.