Page 1 of 1

Contact information in email notification

Posted: Wed Nov 06, 2019 9:15 am
by junkertf
Hello,

We have a working service check for some directory size checks on our few servers, actually a size-quota check. The count of these services is a bit more than 200.
The service works with nrpe (a shell script on the destination machines), nagiosxi passed the criteria with custom variables (directory and size) to the servers. Every check has its configured Contact for the team who operates that service what is linked to that diretory, to maintain the directory size.

We configured an escalation to the service check to hold the sizes arround the qoutas.
The problem, that how i can configure the notification-email content so way that the letter includes also the in-the-service defined "Contact", what is neccessary for Escalation (upper) level staff?

I tought i use also for a Custom variable for that, but not found any information about Bulk modification for Custom Variables (feature request 1175). Also noted that the necessary information is already inside the configuration and a new Custom Variable is a duplication of that.

Is there a good simple way for that or must i configure the longer / duplicate way for the necessary email-notification variable?

Thank you, best regards,

Ferenc

Re: Contact information in email notification

Posted: Thu Nov 07, 2019 11:43 am
by cdienger
Is the issue that you want to include custom variables in notification and escalation emails? https://assets.nagios.com/downloads/nag ... iables.pdf covers how you can modify notification messages and how to use custom variables.

Re: Contact information in email notification

Posted: Fri Nov 08, 2019 3:18 am
by junkertf
Hello cdienger!

Actually i know the documentation you've wroted. I use 2 cutom variables now at the mentioned services, and know the way how to use the third and pass it for the notificaion email with modifing the appropiate command. (so these is now done, 1 from the 213 service is working well so way)

My problem is that how to populate these third variable at more than 200 service? i found the following Feature request, but not found its result... :(

https://support.nagios.com/forum/viewto ... 5&start=10

The second question is, that these third variable will contain the mentioned service "Contact /Contact Name/" parameter.
As i know unfortunatelly these parameter can't be used at email notification variables, but so way, i think, i must duplacate the existing information in the system...

I had searching the forum and found a not supported sql way for that, what is insert the neccessary lines to nagiosql database tables, but hoped, that is there a more better or supported way...

Thank you, best regards,

Ferenc

Re: Contact information in email notification

Posted: Fri Nov 08, 2019 1:12 pm
by cdienger
The API can be used to modify existing services, but while looking into this we discovered a bug. This is likely to get fixed much sooner than the feature request is to be implemented.

Details on the API can be found under Help > API Docs. And despite the current bug, I'd recommend updating to the lastest XI to get the latest API updates as well. Once this bug is resolved I think you'll find it useful for what you're trying to do.