Insert log content to the email body

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
lukedevon
Posts: 143
Joined: Sat Mar 24, 2018 9:15 am

Insert log content to the email body

Post by lukedevon »

Hi

I want to insert some lines in the logs to the alert body.
I have not found the macros that have defined in the Nagios email format, which we are able to use for integrate such content to the email body.
Can somebody help me to get this done?

Br
Luke.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Insert log content to the email body

Post by mcapra »

Relevant documentation:
https://assets.nagios.com/downloads/nag ... Server.pdf

ElasticSearch documents don't really have a concept of "lines" though. You can't simple say "grab line 3 of the message" unless you've broken out each message line into a specific field (which you can totally do).

And if you have broken out each message line into a specific field, you're still a bit out of luck. There was a feature request I put in quite some time ago to allow for stripping specific fields out of documents and dumping them into email templates, though I'm not sure what ever came of it.

I would love to be proven wrong about any of the above.
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Insert log content to the email body

Post by scottwilkerson »

From the document @mcapra posted on page 13 you can see you can use the Email templates to create your onw output.

Also, at the top of the page you can see the available macros.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked