Include query content in Email template

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
jose.loera
Posts: 1
Joined: Thu Feb 11, 2016 4:04 pm

Include query content in Email template

Post by jose.loera »

Is it possible to include the content of a query or result in an email? For example I have a VPN log, I would like the users to get the result of the query in the body of the email. I have tried doing the following....

Below is the default.. I have added %message% in the body as well and it did not work. In this case message is a column.

<p>%alertname% came back with a <b>%state%</b> state at <b>%time%</b></p>

<p>The alert was processed with the following thresholds:<br>
<ul>
<li>Lookback period: %lookback%</li>
<li>Warning: %warning%</li>
<li>Critical: %critical%</li>
</ul>
</p>

<p>
Here is the full alert output:
<div style="padding: 10px; background-color: #F9F9F9;">%output%</div>
</p>

<p>See the last %lookback% in the <a href="%url%">Nagios Log Server dashboard</a>.</p>

<p>Nagios Log Server</p>
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Include query content in Email template

Post by rkennedy »

See this doc - https://support.nagios.com/kb/article.php?id=413

Clicking view macros will show you all of the ones available.
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Include query content in Email template

Post by tmcdonald »

Thanks @rkennedy!
Former Nagios employee
Locked