Cacti / plugin_webseer

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

Notification email not sent #28

Closed ferchimi closed 1 year ago

ferchimi commented 6 years ago

Hi! thanks in advance I'm using webseer plugin just to monitor url availability, and it works fine mostly, detects http response patterns and reports wether the page responds as spected or even if it's down, no complaints here Thing is that the plugin does not even attempt to send an email, not even to Extra Alert Emails list: cacti's email debug mode do not log any sent mails, at OS level i have no queued mail, nor it it logged in /var/log/maillog, while thold alerts run just fine Cacti version: 1.1.10 - from cacti.noarch 1.1.10-1.el7 EPEL package mail config: sendmail, works every day webseer version: 1.1 master branch OS: RHEL 7.2

Please help! regards, Fernando

netniV commented 6 years ago

If cacti can't send email, then no plugins will either. You need to fix your email settings so that they work with the debug mode. I would suggest that you update from 1.1.10 though as that is quiet old.

ferchimi commented 6 years ago

Everything can send email from cacti, i have lots of them coming, webseer plugin not even try to do it, generates no log for attempting to send, no mail logs and, at OS level, there's no trace of an attempt to send any email

netniV commented 6 years ago

I thought you said the test emails were not coming through?

ferchimi commented 6 years ago

test emails: OK and cacti log line is generated thold plugin alert notification emails: OK and cacti log line is generated webseer plugin alert notification emails: do not log anywhere in cacti or maillog, does nothing

A thing I can say about this installation, is that webseer develop branch plugin installed but hung whenever you added an URL and poller ran, and cacti automatically disabled it, so I moved to master branch plugin. I blame cacti old version for this, but i have no chance of moving this installation to 1.1.38 in the near future

mays1509 commented 6 years ago

Good afternoon, I also have the same problem, I imagine that the emails are sent when the status changes to "Down"? since I have done tests, placing erroneous data to test the scenario and this status does not change, just change the value in "HTTP Code"

ferchimi commented 6 years ago

Yes, I did force the error time and again to see this

naterg commented 5 years ago

I'm having the same issue, plugin appears to be checking URL and reporting status correctly but no emails are being sent (no logs in cacti or apache error_log). Also no events in the site/url history even though its down...Did this ever get resolved? I'm on Cacti 1.1.30

netniV commented 5 years ago

Try downloading the latest develop version of the plugin, then use the selective device debug to enable debug mode and see what the logs show.

naterg commented 5 years ago

Will do, thanks!

netniV commented 5 years ago

Any response @naterg ?

naterg commented 5 years ago

Thanks for checking, sorry I didn't get back. I tracked my problem to the logic in line ~188 of webseer_process.php and changed it to this which seems to be working for me (I'm running default 5min polling):

if ($url['failures'] >= ($url['downtrigger'] * 60)/$poller_interval && $url['triggered'] == 0) {

Am I missing something, or have something misconfigured that the vanilla logic doesn't like?

netniV commented 5 years ago

Is that with the latest version of the plugin?

naterg commented 5 years ago

Yes, I pulled a copy of dev on 2/15 and made two other changes which I see you have since fixed.

netniV commented 5 years ago

Can you make a pull request with your proposed fix?

naterg commented 5 years ago

Submitted