Page 1 of 1

Including Nagios Log Server messages in Nagios XI alerts

Posted: Mon Apr 15, 2019 4:46 pm
by mbeebe
Hello,

Perhaps my Google-fu is weak, but I can't seem to find a way to perform what I believe to be a simple operation: include a Nagios Log Server message in a Nagios XI alert.

I am using check_xi_service_nagioslogserver to run a query against our Nagios Log Server. The query is simple: find a string of text in the Message field. If that string exists, fire the alert. The alert then sends an email out to the on-call person.

What I'd like to do is include the entire message in the email alert as the message contains the steps to fix the issue. Potentially compounding this task is the fact that the message will be multi-line.

Is there a way to do this?


-- Mike Beebe

Re: Including Nagios Log Server messages in Nagios XI alerts

Posted: Tue Apr 16, 2019 10:51 am
by cdienger
The check will only return the count and not the actual messages. If a sample of the log is desired then you'll need to setup an email alert on the NLS machine. The %last10alertlogs% and %last1alertlog% macros can be used in emails to include a sample.

Re: Including Nagios Log Server messages in Nagios XI alerts

Posted: Thu Apr 18, 2019 4:15 pm
by mbeebe
Hello,

Thanks -- that was the answer I needed! Please feel free to close.

-- Mike Beebe

Re: Including Nagios Log Server messages in Nagios XI alerts

Posted: Thu Apr 18, 2019 4:39 pm
by scottwilkerson
mbeebe wrote:Hello,

Thanks -- that was the answer I needed! Please feel free to close.

-- Mike Beebe
great!

Locking thread