Page 1 of 1

Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 8:19 am
by zaji_nms
Dear Expert

Its okay when I tested HOST Notification with hostdisplayname , but when I tried servicedisplayname , not giving any result.

We know our Host, Service (device port info) but via email cannot judge link detail. How possible to achieve this.

There is document to add external variable and give value (our customer link info) but its lengthy and possible cannot be done by all staff (extra skill needed to configure it).

How to fetch SERVICE_DISPLAY_NAME (some similar variable) value in Email Notification Message when some link (SERVICE) goes down?

Regards

Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 11:23 am
by zaji_nms
Further to above, I tried with hostalias and great, its working as expected (we will use as customer CPE detail) , however me still stuck on using

Service Desc : %servicedesc%
nagios disp servicedesc : %NAGIOS_DISP_SERVICEDESC%
using small letters : %nagios_disp_servicedesc% (but no use)
display name : %display_name%

Regards

Re: Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 11:40 am
by cmerchant
The document you are referring to is: http://assets.nagios.com/downloads/nagi ... iables.pdf

%service% should give you service name.

Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 12:12 pm
by zaji_nms
Dear cmerchant

I have used all below but my purpose not solving

FYI, HOST = Router ID (KGX-PRD-2006)
SERVICE = Port Name (ifName) = FastEthernet 0/5
DISPLAY NAME = "Net Backup for XYZ Co. for their Email Server"
This display-name or servicealias I wan to use.

Is there any way to $ARG8$ , as we user upto two or three arguments...simply I tried but no use.

Below variables used, but my purpose not solving....me doing trial and error...but no success

contactemail : %contactemail%
type : %type%
escalated : %escalated%
author : %author%
comments : %comments%
host : %host%
hostaddress : %hostaddress%
hostalias : %hostalias%
hostdisplayname : %hostdisplayname%
servicedisplayname : %servicedisplayname%
service : %service%
hoststate : %hoststate%
hoststateid : %hoststateid%
servicestate : %servicestate%
servicestateid : %servicestateid%
servicestatetype : %servicestatetype%
serviceoutput : %serviceoutput%
longserviceoutput : %longserviceoutput%

Regards

Re: Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 2:40 pm
by lmiltchev
Have you added the following line to the notification command that you are using?

Code: Select all

--servicedisplayname="$SERVICEDISPLAYNAME$"
Can you show us the command that you are using to send service notifications? For the xi users, who are also contacts this is "xi_service_notification_handler".

Re: Notification Message with servicedisplayname

Posted: Thu Dec 04, 2014 3:00 pm
by cmerchant
Servicedisplayname is not passed by default in the stock xi notification command. You need to add the following string to the xi_service_notification_handler:
Go to CCM --> Commands --> tab to search field and type notif and click Search button, click on the xi_service_notification_handler object. Within Command Management, position to the Command Line field and find the string --service="$SERVICEDESC$" and insert the following after that:

Code: Select all

--servicedisplayname="$SERVICEDISPLAYNAME$" 
click save, and Apply Configuration.

Then you should be able to use %servicedisplayname% within your notiication.

Notification Message with servicedisplayname

Posted: Fri Dec 05, 2014 10:38 am
by zaji_nms
Great Great

Thanks cmerchant , god bless you.

Its done.

Please close the case............Please tell your developer team to add such things by default.

Regards

Re: Notification Message with servicedisplayname

Posted: Fri Dec 05, 2014 10:43 am
by tmcdonald
We can certainly make the request, however there are a lot of macros and if they were all included the mailer script would run much slower. Though I do agree that service description should be one of the defaults.

Re: Notification Message with servicedisplayname

Posted: Sat Dec 06, 2014 3:53 am
by zaji_nms
Dear Expert

You can close this case however can you review my closed case : "how to add DISPLAY_NAME in MRTG graph Title"

As you solved my Notification issue to incorporate DISPLAY_NAME , same way I want to add on MRTG Title.

FYI, Service Description is our Router or Switch Interface, which do not want to disclose to our customer.

in the MRTG title, there is Host and Service_Description
HOST is our Router or Switch
Service Description is Interface of our HOST (i.e Router/Switch)

We don't want to disclose HOST/Service (Router\Switch / Interface) to our customer...which appear as a Title on MRTG graph

Regards

Re: Notification Message with servicedisplayname

Posted: Mon Dec 08, 2014 1:02 pm
by tmcdonald
I will be closing this topic, but I have re-opened your MRTG issue: http://support.nagios.com/forum/viewtop ... 8&start=10

Please post your question there so we can keep the threads organized.