LogViewPlus Support

Email/SNTP notification on event

https://www.logviewplus.com/forum/Topic666.aspx

By MB-Broadcast - 17 Jul 2020

Hi all
i think this is supposed to be possible to get an email on a filter of a log file. I did see the video 
https://www.logviewplus.com/docs/event_notifications.html
but i cannot really see how do you monitor a real time log (continuously chaging) . I set directly monitor,

but on the upper part, when i set a filter, it put it on a specific file.
Any help will be much appreciated
By LogViewPlus Support - 17 Jul 2020

Hi Micha,

Thanks for taking the time to evaluate LogViewPlus.

First, I would recommend changing your username as it is publicly visible.  Unfortunately, bots may find it and use it in a way that is outside of our control.  You can change this by going into your profile settings and selecting one of the available "Edit" buttons.  Once in edit mode, you will see a menu of icons on the left.  One of these options is "Edit Account".  Here you will find a form which allows you to change your username.

From your screenshot above, it looks like you have already setup a notification on a filter.  This means you will have already configured a provider and set a notification.  I can't see any data in the filter, so I am thinking the problem is that the event you are monitoring just hasn't occurred yet?  Note that notifications are triggered only when new data is written to the file.

What I would recommend is to experiment with Popup notifications first.  These are simple - low impact - notifications that will give you a sense of how the application works.  I would recommend configuring the popup to notify you with an event that happens frequently.  For example, writing a 'Info' event to a log file.  Once this is working, I would try setting a popup notification on your 'real world' problem.  Finally, once this is working, I would change the popup provider to SMTP.

Hope that helps,

Toby 
By MB-Broadcast - 17 Jul 2020

Thank U Toby for your fast answer and hints.
The even didn't happened, but i try another one. Maybe i set the other "under" the first and not below and then it act as "AND" and not "OR" ?
I tried now and the popup worked (i first try with the popup, exactly as u suggested, and test it already before and it works)

SO the popup works but now here are the questions:
1. The email works with TLS ? i cannot see this option, i have a account i open in gmail to send alarms, and Gmail need TLS as soon as i know
2. in a previous post 2 years ago, i found that you talk about a service instead the app. is that alive ?
3. the way i did will always refresh the log in real time ?
4. in case you close the sw and reopens (or reboot the pc), is there a way to open the workspace automatically ?

The main goal (i test for me but then wish to propose to my customers), is to send email on event in the log (error messages)



By LogViewPlus Support - 17 Jul 2020

Hi Micha,

Glad to hear you got the popup working - that's a good start.  I believe the remaining problem is likely with your SMTP configuration.

> The email works with TLS ?

Yes.  Select the "Secure Connection with SSL" option when configuring the provider.  TLS is the default options if a secure connection is requested.  

> talk about a service instead the app. is that alive

One item on our todo list is to allow LogViewPlus to run in the background - as a service, or possibly in the notification area.  However, this work is unlikely to be complete in the next 6 months.  Sorry.

> the way i did will always refresh the log in real time ?

For the notification to fire, the log file will always need to receive a 'new' event.  This means the log file will need to be in tail mode.  Does that answer the question?

> is there a way to open the workspace automatically ?

Sort of.  The problem here is that you are using a directory monitor.  A directory monitor doesn't actually know what it is going to open - it depends on what is found in the directory.  Because of this, you cannot save filters (or notifications) as part of the workspace.

So, to restore the notifications you will need to follow a two step process.
1.  Save / Restore the workspace.
https://www.logviewplus.com/docs/save_a_workspace.html

2.  Save / Restore a template which contains your filter and notification.
https://www.logviewplus.com/docs/save_and_share_filters.html

Hope that helps,

Toby
By MB-Broadcast - 19 Jul 2020

Hi Toby 
thank U for your anwer
i can see my reply wasn't posted - i will then reply again Smile

> This is how i configured the email

but when i test i have this:


> The system do generate a file per day (sometimes more than 1 per day if this exceed 10MB)
the file name is for example DHD2020-07-19_19-26-20
then DHDYYY-MM-DD_HH-mm-ss
can i make the system monitor the" current file"/latest ?





By LogViewPlus Support - 19 Jul 2020

Hi Micha,

I think the problem here is likely to be with your gmail account.  Are you sure that the account is setup correctly to send email given the details provided?  Do you use two factor authentication with your gmail account?  Can you verify the settings in another application?  If I search for "gmail 5.7.0 authentication required", it seems a number of people have experienced this issue.

You can apply the notification on the 'current' file by using a Directory Monitor + a Merge File.   Then you can place the notification on the merge file.  This will ensure you are always monitoring the latest data.  Please see:
https://www.logviewplus.com/docs/monitor_a_directory.html
https://www.logviewplus.com/docs/merge_log_files.html

Hope that helps,

Toby
By MB-Broadcast - 21 Jul 2020

Hi again
with 465 port which seems to be for SSL i get


any hint ?
By LogViewPlus Support - 22 Jul 2020

Hi Micha,

Again - I believe the problems you are having are with your Gmail account settings.  For example, it could be due to the authentication method used or the age of the account.  Is there another provider you could try - for example SendGrid?  

The "Secure Connection with SSL" flag is used to set the "EnableSSL" field on the .Net SmtpClient.  The documentation for this property states that only SSL over TLS is supported.  Direct SSL connections are not supported.  I can see where this is confusing and I will rename this field "Secure Connection with TLS" in the next release.  Apologies for the confusion this has caused.

It may also be worth testing with an insecure connection.  This may help to narrow down any problems with your configuration.

Hope that helps,

Toby

By LogViewPlus Support - 22 Jul 2020

A few more ideas from Google which might help.  Please review:
https://myaccount.google.com/u/0/security-checkup/4
https://myaccount.google.com/lesssecureapps

In reviewing these settings, is there anything you believe might be blocking your connection?

Also, it appears that Gmail does not support insecure connections - so please ignore that suggestion I made above.

Second, it may be worth upgrading to the latest LogViewPlus BETA release v2.4.41 available here:
https://www.logviewplus.com/download.html

This release upgrades LogViewPlus to use .Net 4.7.2.  The current version is 4.5.2.  There are a lot of "behind the scenes" security enhancements in this release and it is possible that the upgrade may help.

Hope that helps,

Toby
By MB-Broadcast - 23 Jul 2020

Hi Again
we try with sendgrid, no success same error message (btw, after the error message there is another message to check your emaio, but there is no mail in)
did anyone use gmail/sendgrid/any other email service to send emails and can share which/settings ?
By LogViewPlus Support - 23 Jul 2020

Hi Micha,

I have had a chance to do some testing with SendGrid.  I am using the configuration "smtp.sendgrid.net" on port 25 with TLS enabled.



Everything works as expected.  However, I did notice that when I send an email to Hotmail - the mail does not get through (even as junk).  Mails get through fine on the other accounts I tested (although Gmail did flag the email as potentially dangerous).

The issues with sending mail to these accounts is with the SMTP provider and not LogViewPlus.  The mail accounts have built in spam filters that make deliver-ability an issue.  The email recipient must trust the email sender.

Hope that helps,

Toby
By MB-Broadcast - 23 Jul 2020

Hi Toby
This is very strange
we try as well
we got the same error mesage with sendgrid than we got with gmail.
port 25 figures as not SSL, but we try all options
25 with and without
465 with and without
587 with and without
noone works. some get another error message (directly, nit after a few seconds)

By LogViewPlus Support - 24 Jul 2020

Hi Micha,

When you test your SMTP connection you should get a message back saying "A test notification email has been sent."  There is currently a bug in LogViewPlus where an error message may be displayed before this message.  

If you see an error message - the message was NOT sent and we need to address the error message.  If you do NOT see an error message, then LogViewPlus successfully sent the message.  From there, it is your provider's responsibility to deliver it.  

We have fixed this bug for the next release.  In the next release, if an error message is shown then the "success" message will not be shown.

As to why your provider is not delivering messages, it is difficult to say.  What I do know is that sending email is surprisingly "fuzzy" these days.  Spam has become such a problem that a lot of services actively try to stop receiving email from free accounts.  It might be worth contracting SendGrid or subscribing to a paid account.

Hope that helps,

Toby
By MB-Broadcast - 24 Jul 2020

Hi Toby
Hmm. One sec. We do have the 'amail have been sent' but we have the error before, so thats ok ?
By LogViewPlus Support - 24 Jul 2020

The error message means the mail was not sent.

What settings are you using to connect to SendGrid?  What is the error message?
By MB-Broadcast - 23 Aug 2020

LogViewPlus Support - 24 Jul 2020
>> Hi
In fact we try all options (like shown below)
SSL checked
smtp.gmail.com
WITH ports 465 - error - then email was sent - but no mail
but.. hurray - now with 587 port it works !

sage?


By LogViewPlus Support - 23 Aug 2020

Glad to hear you got it working.  :-)  Not sure why the port change was necessary - must have something to do with your service provider.

Thanks for letting me know,

Toby