[Solved] Alert errors

email alerts are not working and I have the following error in the logs:

[2018-10-08 12:05:01] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected ‘’ (T_ENCAPSED_AND_WHITESPACE), expecting ‘-’ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /opt/librenms/includes/alerts.inc.php(403) : eval()‘d code:8
Stack trace:
#0 /opt/librenms/LibreNMS/Alert/Template.php(174): RunJail(’$ret .= "Device…’, Array)
#1 /opt/librenms/LibreNMS/Alert/Template.php(65): LibreNMS\Alert\Template->legacyBody(Array)
#2 /opt/librenms/includes/alerts.inc.php(870): LibreNMS\Alert\Template->getBody(Array)
#3 /opt/librenms/includes/alerts.inc.php(609): ExtTransports(Array)
#4 /opt/librenms/includes/alerts.inc.php(811): IssueAlert(Array)
#5 /opt/librenms/alerts.php(48): RunAlerts()
#6 {main}

Where do I start on trying to fix this?

This appears to be the rule I created in the GUI, which, as far as I can see is trivial:

macros.component = 1 AND component.type = “f5-ltm-poolmember” AND component.status != 0

although it appears not to be the rule, if I check it in the gui:

Rule name: F5 Pool Member Down
Alert rule: macros.component = 1 AND component.type = “f5-ltm-poolmember” AND component.status != 0
Alert query: SELECT * FROM devices,component WHERE (devices.device_id = ? AND devices.device_id = component.device_id) AND (component.disabled = 0 && component.ignore = 0) = 1 AND component.type = “f5-ltm-poolmember” AND component.status != 0
Rule match: matches

It is the alert template.

Thank-you - obvious, I suppose, when I think about it. I assumed that the default template would work for everything…