Traceroute not included in E-Mail Alert

./validate.php is clear.
No problem with traceroute operation (manual confirmation)

I configure the alert-template as below, but it doesn’t work.

[Alert-Rule]
SELECT * FROM devices WHERE (devices.device_id = ?) AND (devices.status = 0 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND devices.status_reason = “icmp”

[Alert-Teampltes]

  1. First Try : status 0

{{$alert->debug[‘traceroute’]}}
@if ($alert->status == 0)
@if ($alert->status_reason == ‘icmp’)
{{ $alert->debug[‘traceroute’] }}
{{ $alert->debug[‘output’] }}
@endif
@endif

  1. First Try : status 1

{{$alert->debug[‘traceroute’]}}
@if ($alert->status == 0)
@if ($alert->status_reason == ‘icmp’)
{{ $alert->debug[‘traceroute’] }}
{{ $alert->debug[‘output’] }}
@endif
@endif

Is there anyone who can help?

Thank you for time

Do you have debug.run_trace set to true?

$config[‘debug’]['run_trace] = true;

yes.

  • config.php

$config[‘debug’][‘run_trace’] = true;
$config[‘traceroute’] = ‘/usr/bin/traceroute’;
$config[‘show_services’][‘traceroute’] = true;

  • ./test-template.php

Even if you execute it, it comes out blank.

Hmmm…
All I had to do was set this in my global config:

  • debug.run_trace true

Then added this to the bottom of my alert template:

@if ($alert->debug['traceroute'])
   <pre>{{ $alert->debug['traceroute'] }}</pre> <br>
@endif

When a device is down, does a Traceroute widget appear on the device’s overview page?
If no - then doublecheck your global config setting.
If yes - then it’s likely an alert template issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.