Page 1 of 1
Logsource within email.
Posted: Fri Sep 08, 2017 4:01 am
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 ?
Re: Logsource within email.
Posted: Fri Sep 08, 2017 9:17 am
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.
Re: Logsource within email.
Posted: Fri Sep 08, 2017 1:17 pm
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.