Logsource within email.

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
nagios.edp
Posts: 1
Joined: Fri Sep 08, 2017 3:56 am

Logsource within email.

Post by nagios.edp »

Hi
I've created template for my alerts that contains %alertname% and %state% in the email subject /title. However I can'f find a way to include hostname/logsource within email's body. For example.
Subject: SSH login is CRITICAL

hostname - 10.1.1.1
logsource - server1

I tried to use %logsource% and %hostname% within email template but no luck. Any suggestions ?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Logsource within email.

Post by mcapra »

I don't recall if that's an available macro, but this article may be of use:
https://support.nagios.com/kb/article.php?id=413

While on the Email Templates screen, click the View Macros button to view a list of available macros. If what you want isn't listed there, you're out of luck I'm afraid.

I recall filing a feature request to give email alerts full access to matching events' fields (you'd have logsource, hostname, pri, any field parsed/stored from your logs), though I'm not sure what came of that.
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Logsource within email.

Post by dwhitfield »

Are you using the Nagios Log Server (NLS) integration in XI or just NLS by itself? This will help me find the status of the feature request and potentially point you in the right direction with the tools currently available.

These are the official logserver feature requests @mcapra filed. None of these looks like exactly what you are looking for, but maybe one of them is it. I can tell you that these are all currently pending approval.

Code: Select all

	9350 	1	Nagios Log Server Feature Request: Nagios Log Server - Visual paging/compressing the list of snapshots			

	9387	1	Nagios Log Server Feature Request: Nagios Log Server - Alert intervals		

	9839	1	Nagios Log Server Feature Request: Alert on certain number of distinct field values			

	9905	1	Nagios Log Server Feature Request: Use > < <= >= operators for alerting thresholds 			

	10193	1	Nagios Log Server Feature Request: Give the command subsys jobs proper error outputs		

	11540	1	Nagios Log Server Feature Request: Recovering past dashboards
We do have a separate feature request staging ground. Perhaps @mcapra could give some details on how this was filed.
Locked