Page 1 of 1

Include query content in Email template

Posted: Tue Feb 28, 2017 1:35 pm
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>

Re: Include query content in Email template

Posted: Tue Feb 28, 2017 4:25 pm
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.

Re: Include query content in Email template

Posted: Wed Mar 01, 2017 2:39 pm
by tmcdonald
Thanks @rkennedy!