Add option to disable 'recovery' message for alert

Tags: #<Tag:0x00007f06421921a8> #<Tag:0x00007f06421920b8>

It would be very useful to be able to disable the recovery message for a given alert, for example the recovery on “Device rebooted”.

5 Likes

If it would be possible to disable all recovery alerts that would be fine to.

or +1 :slight_smile:

Hi, please, what is the status of this request?
Thank you.

Unfortunately, nobody has contributed this.

laf,
Hope all is well. i was looking to contribute here. I am a little rusty in my coding but I am exploring doing this. I have a little free time from CTO role at STEPcg for Christmas break and wanted look into adding this feature. I have contributed by adding Avaya VOSS and some BOSS devices but this will be a little more involved. I want to run a few things past you but before I bite off more than I can chew and/or promise on something I can not deliver.

  1. Looks like this feature would be a part of “Alert Rules”.
  2. I would add ON/OFF button to the edit/create of an Alert->Alert Rules
  3. This option would be stored in table alert_rules and append “recovery”:false in the extra column. Looks like similar things are stored here about each Alert Rule you create. Looks like a good place to me.

Here are my questions for you?
Give me some advice on how I should do this because you will ultimately approve my change. I am looking to append/add the string “recovery”:false to column extra of alert_rules table. Where do you think the best place is to start adding the logic to disable the alert. I looked around but you could advise me best so I am not on a egg hunt.

MariaDB [librenms]> describe alert_rules;
±----------±--------------------------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±----------±--------------------------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| device_id | varchar(255) | NO | MUL | | |
| rule | text | NO | | NULL | |
| severity | enum(‘ok’,‘warning’,‘critical’) | NO | | NULL | |
| extra | varchar(255) | NO | | NULL | |
| disabled | tinyint(1) | NO | | NULL | |
| name | varchar(255) | NO | UNI | NULL | |
| query | text | NO | | NULL | |
| proc | varchar(80) | YES | | NULL | |
±----------±--------------------------------±-----±----±--------±---------------+
9 rows in set (0.00 sec)

MariaDB [librenms]> select extra from alert_rules;
±-----------------------------------------------------------------------+
| extra |
±-----------------------------------------------------------------------+
| {“mute”:false,“count”:“3”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:“1”,“delay”:“60”,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:"-1",“delay”:“300”} |
| {“mute”:false,“count”:“2”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:“2”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:“1”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:“1”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:“1”,“delay”:60,“invert”:false,“interval”:300} |
| {“mute”:false,“count”:"-1",“delay”:“60”,“invert”:false,“interval”:300} |
±-----------------------------------------------------------------------+
9 rows in set (0.00 sec)

@ospfbgp Sorry I didn’t see this response.

I’ve actually now submitted support for this: https://github.com/librenms/librenms/pull/8430

Thanks for this feature. I just enabled it for my Reboot alert.

Hi, how did you enable this? I do not see a radio button for this feature?

run ./daily.sh to update and then the switch shows up below Mute Alerts.