[Enhancement] Alert update #4323

Closed
gcoeugnet opened this Issue Sep 2, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@gcoeugnet
Contributor

gcoeugnet commented Sep 2, 2016

Hi,

As already refered here there is maybe a lake of details update when an alert, port down for instance, has another port becoming down. The alert detail (which list port down) isn't updated with the news port down id.

sans titre

As far as I can see in the code, it works as designed. In /opt/librenms/includes/alerts.inc.php, there is no dbUpdate with detail if $doalert = 1 and chk['state']=1 (line 190, function RunRules). Only "NOCHG" is echoed. Would it be possible to add a dbUpdate here to update fault details ?

I tried a little by adding this two lines under the echo "NOCHG" but without success :

$extra = gzcompress(json_encode(array('contacts' => GetContacts($qry), 'rule'=>$qry)), 9);
dbUpdate(array('details' => $extra), 'alerts', 'device_id = ? && rule_id = ?', array($device,$rule['id']));

Datas seem to contain images (maybe the one displayed when mouse get over the port name/id) and I didn't succeed in getting the fault ports list to update it. What's your point about detail update and do you have any tips to help me update the fault port list ?

Regards,
Guillaume.

@f0o

This comment has been minimized.

Show comment
Hide comment
@f0o

f0o Sep 21, 2016

Member

That should be handled by the follow-up routines. I'll check it over weekend

Member

f0o commented Sep 21, 2016

That should be handled by the follow-up routines. I'll check it over weekend

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@librenms librenms locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.