Notification Message with servicedisplayname

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Notification Message with servicedisplayname

Post 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
Zajil NMS
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Notification Message with servicedisplayname

Post 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
Zajil NMS
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Notification Message with servicedisplayname

Post by cmerchant »

The document you are referring to is: http://assets.nagios.com/downloads/nagi ... iables.pdf

%service% should give you service name.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Notification Message with servicedisplayname

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

Re: Notification Message with servicedisplayname

Post 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".
Be sure to check out our Knowledgebase for helpful articles and solutions!
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Notification Message with servicedisplayname

Post 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.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Notification Message with servicedisplayname

Post 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
Zajil NMS
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification Message with servicedisplayname

Post 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.
Former Nagios employee
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: Notification Message with servicedisplayname

Post 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
Zajil NMS
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification Message with servicedisplayname

Post 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.
Former Nagios employee
Locked