Alerts not clearing

Hello,

Im having issues with alerts not clearing. for example some interfaces has been disabled and configs cleared and admin down. but old alerts still showing and not clearing. I did discovery, puller and snmp scans again with no luck. rebooted NMS multiple times also did not solve the issue.
ran daily.sh also did not solve it.

-bash-4.2$ ./daily.sh
Updating SQL-Schema OK
Cleaning up DB OK
-bash-4.2$

-bash-4.2$ ./validate.php

Component Version
LibreNMS 1.59-29-g10b4213
DB Schema 2020_01_09_1300_migrate_devices_attribs_table (153)
PHP 7.2.31
MySQL 5.5.65-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.10.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
  • The output of ./validate.php

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | ./pbin.sh
./poller.php -h HOSTNAME -r -f -d | ./pbin.sh

If you need to post any text longer than a few lines, please use a pastebin service such as https://p.libren.ms using non-expiring pastes.

Hi @famahmou
It depends on how you wrote your alert. If the alerts check only OperStatus is Down, alert will never clear until status goes back up. So write your alert to do what you want and it will.
Alerts are directly bound to database, and the dropdown menu in the alert rule creation page is listing all database columns.

You need to show your alert rule @famahmou It likely has an issue.

Hello,

the issue on alerts related to decommissioned interfaces for example; g2/0/2 has been set back to default config at the switch level but alerts still show in the NMS console.
I guess these alerts got stuck in NMS DB somehow and need to be cleared manually.

I attached the rule configuration just in case I missed something

port_now_down checks the previous state of the port. So if it was ever up, then it will trigger. I guess the way to fix this would be to set admin down or go in the database and set ifOperStatus_prev for the given port.