Page 9 of 11

Re: Email notifications plugin revisited

Posted: Mon Oct 17, 2016 6:29 pm
by rseiler
I was wondering if anyone knows of a hack to only include what's happened today in the system log as opposed to all of it every time.

For busy logs this isn't really an issue since you'll only be getting a portion of today's data anyway, but otherwise the report is highly redundant relative to recent days.

logread itself doesn't support doing this, but maybe passing its output through something clever before it's then output to work.tmp?

Re: Email notifications plugin revisited

Posted: Tue Nov 15, 2016 9:40 am
by dpint
rseiler wrote:I was wondering if anyone knows of a hack to only include what's happened today in the system log as opposed to all of it every time.

For busy logs this isn't really an issue since you'll only be getting a portion of today's data anyway, but otherwise the report is highly redundant relative to recent days.

logread itself doesn't support doing this, but maybe passing its output through something clever before it's then output to work.tmp?
You can use following email.sh script to achieve that:

https://paste.fedoraproject.org/482000/21722514/raw/

Re: Email notifications plugin revisited

Posted: Wed Nov 16, 2016 4:15 am
by rseiler
Thanks, that works.

But I noticed a little twist in the new script, due to changes in the Bandwidth section, too.

That report no longer includes today's bandwidth use, just the previous X days. That works out really well if you have the report set for midnight (that happened to be a previous request of mine), but not so well if it's set to go off earlier.

And, of course, being set to midnight would nullify the new log feature.

Re: Email notifications plugin revisited

Posted: Sat Nov 19, 2016 6:49 pm
by dpint
rseiler wrote:Thanks, that works.

But I noticed a little twist in the new script, due to changes in the Bandwidth section, too.

That report no longer includes today's bandwidth use, just the previous X days. That works out really well if you have the report set for midnight (that happened to be a previous request of mine), but not so well if it's set to go off earlier.

And, of course, being set to midnight would nullify the new log feature.
I think this should fix this issue:
https://paste.fedoraproject.org/485726/79595718/raw/

The main reason for change in bandwidth code is that I noticed that download and upload lines don't always represent identical time intervals... The new code prevents this issue by matching them.

Re: Email notifications plugin revisited

Posted: Sat Dec 03, 2016 3:05 am
by rseiler
Thanks, that works great.

I noticed this month though that the syslog has stopped being included. I think it's because of this change in the log:

Wed Nov 30 21:46:59
Thu Dec 1 01:46:59

Since the day only has one digit now, two spaces are used before it, and I think that throws off this line:

Code: Select all

today=$(date | cut -c 1-10)
Adding this to it makes it work again, but let's see what happens in a week:

Code: Select all

today=$(date | tr -s ' ' | cut -c 1-10)

Re: Email notifications plugin revisited

Posted: Sat Feb 18, 2017 11:01 am
by sefas
dpint

gargoyle firmware 1.9.2 email.ipk update please

error code:

Code: Select all

root@Gargoyle:~# opkg install /tmp/email.ipk
ERROR: Dependency ip of package plugin-gargoyle-email-notifications cannot be found, try updating your package lists

Re: Email notifications plugin revisited

Posted: Wed Feb 22, 2017 5:34 pm
by cerberii
Hi,

Could someone tell me how this looks, does it make a page on the web gui? Any Screenshots? Also what are the options? Thx

Re: Email notifications plugin revisited

Posted: Wed Feb 22, 2017 8:17 pm
by rseiler

Re: Email notifications plugin revisited

Posted: Fri Mar 17, 2017 9:07 pm
by rseiler
Has anyone thought about a way to not only include daily BW totals but the daily breakdown by hosts? Or maybe you have a separate script that does it?

I've looked at the BW section of this script, as well as bandwidth_distribution.sh (which drives the BW Distribution page, the bottom of which is what I'm thinking about), and...well, I'm just hoping that someone's already done it.

Re: Email notifications plugin revisited

Posted: Wed Mar 22, 2017 6:23 pm
by iamlost
Hi
Gargoyle 1.8.1 email 1.0.1

I have changed the permissions on "plugin root usr lib gargoyle email_sh" from 644 to 744 and the email now sends. Previously the test email would send but not the schedule email.

After the permissions change the scheduled emails now send to the correct email address

Replace the with / for the directory in the ""