Alerts.php not working

Hi Community,

I am having this problem with my alerts.php for a couple of days and couldn’t find a solution for the same kind of problem here.

On the Web -> Alerts I am getting the message “No Results found!” and if I execute the alerts.php I get this error:
ClearStaleAlerts():
RunFollowUp():
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 158
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32768 bytes) in /opt/librenms/vendor/symfony/debug/Exception/FatalErrorException.php on line 1

./validate.php -> all OK
./daily.sh -> all OK

I have changed the php memory limit but no success…
I have tried the run the tests: test-alert.php and test-template.php and they run all ok

Mail transport -> OK

Any help please?

I have seen this before. They created an alert rule that included all of a log (such as syslog) and it stores those results for every alert, eventually blowing things up. Rules should include syslog.timestamp >= `macros.past_5m` for example

Hi @murrant,

Thank you very much for your advice.

I was actually creating a rule for traps a couple of days ago and I didn’t realize that could be the issue because I have restricted the rule to just one device and actually I don’t have much logs from this device.
But, disabling the rule made things work again.

Kind regards,

yep, you’ll need ot use the past_5m macro.

Thank you for the help @murrant.!