Macro SERVICEGROUPALIAS

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
romeor
Posts: 25
Joined: Mon Aug 30, 2010 1:16 am

Macro SERVICEGROUPALIAS

Post by romeor »

Hi,

is there any macro, which allows to send multiple servicegroup aliases by mail?

at this moment from the SERVICEGROUPALIAS macro description:

The long name / alias of either 1) the servicegroup name passed as an on-demand macro argument or 2) the primary servicegroup associated with the current service (if not used in the context of an on-demand macro). This value is taken from the alias directive in the servicegroup definition.

We would like nagios to send multiple servicegroup aliases if one service belongs to multiple servicegroups if this service is being affected. At this moment it seems, that we're getting only first servicegroup, when mail is sent.

At this moment the only available macro for this is SERVICEGROUPNAMES which is not exactly we would like to use.

or is there any way to create such an alias?

Nagios® Core™ 3.2.3
Last edited by romeor on Mon Jul 11, 2016 3:22 pm, edited 2 times in total.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Macro SERVICEGROUPALIAS

Post by rkennedy »

For reference, can you show us your host, service, and servicegroup definitions? Also please post any other ones that are related.

Nagios does not send to service groups by default, it sends to contacts or contact groups. That's why I believe looking at your definitions will provide some clarification.
Former Nagios Employee
romeor
Posts: 25
Joined: Mon Aug 30, 2010 1:16 am

Re: Macro SERVICEGROUPALIAS

Post by romeor »

Well, may be I've described my issue incorrectly. What I'm trying to achieve is to make nagios send by mail multiple service group descriptions (which is internal nagios macro: $SERVICEGROUPALIAS$). At this moment nagios sends only primary service group description if service is defined in multiple service groups. There is a way to send multiple service group names with macro $SERVICEGROUPNAMES$, but it is not I'd like to do.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Macro SERVICEGROUPALIAS

Post by lmiltchev »

This type of macro is not available in Nagios Core yet. You are welcome to post a feature request for adding this macro to Nagios Core:
https://github.com/NagiosEnterprises/nagioscore/issues?

Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
romeor
Posts: 25
Joined: Mon Aug 30, 2010 1:16 am

Re: Macro SERVICEGROUPALIAS

Post by romeor »

Thanks for an answer
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Macro SERVICEGROUPALIAS

Post by mcapra »

Github is definitely the best place to go for things you would like to see implemented in Nagios Core.

Is it alright if we lock this thread?
Former Nagios employee
https://www.mcapra.com/
romeor
Posts: 25
Joined: Mon Aug 30, 2010 1:16 am

Re: Macro SERVICEGROUPALIAS

Post by romeor »

Yes, lock this one.
Locked