Cacti / plugin_webseer

Cacti Web Services Monitoring Plugin
GNU General Public License v2.0
8 stars 9 forks source link

Notification email sent twice with different info #27

Closed KnoAll closed 5 years ago

KnoAll commented 6 years ago

When i have a WSC in alarm, I get two emails with the same subject, but different body text...

Site Recovering: X URL: http://x.x.x.x:x/ Error: Total Time: 0.046805

and

URL: http://x.x.x.x:x/
Status: Recovering
Date: August 23, 2018 - 02:20:55
HTTP Code: OK
This is both for UP and DOWN messages. Site Down: X URL: http://x.x.x.x:x/ Error: Search string not found Total Time: 0.037277 and URL: http://x.x.x.x:x/
Status: Down
Date: August 23, 2018 - 02:28:05
HTTP Code: OK
Error: Search string not found
KnoAll commented 5 years ago

Still seeing this. Is there any hope?

netniV commented 5 years ago

By the looks of it, that was by design. Check out lines 33 - 34 in webseer_process.php

KnoAll commented 5 years ago

I'm not a developer so I'll have to take your word for it! I can't imagine what the idea was there? the duplication is messy in an inbox with essentially the same info. one or the other, but not both!

netniV commented 5 years ago

For now, take out the one you don’t want in your version and I’ll add an option for which to send at a later point.

KnoAll commented 5 years ago

So I should be able to comment/remove one or the other of these?

$dir = dirname(FILE); chdir($dir);

netniV commented 5 years ago

Err, they aren't the lines i should have referred to. I meant, 235 - 236

plugin_webseer_get_users($results, $url, '');
plugin_webseer_get_users($results, $url, 'text');
KnoAll commented 5 years ago

Ah, that one I can follow! I commented and tested and all is well. This will do for now, but I look forward to a setting toggle one day! Thanks!

netniV commented 5 years ago

This is now in the main development code, please check and close if issue is resolved.

KnoAll commented 5 years ago

I see the new selection! Thanks so much! Have not had a fired alert yet though.