Page 1 of 1

e-mail notifications

Posted: Sun Nov 03, 2013 6:07 pm
by SergeS
Hello everybody,

would be nice to have optional everyday scheduled e-mail notifications to admins email with log-file, bandwidth distribution, connected hosts, etc.

Re: e-mail notifications

Posted: Thu Jan 30, 2014 6:30 am
by staclos
SergeS wrote:...would be nice to have optional everyday scheduled e-mail notifications to admins email with log-file, bandwidth distribution, connected hosts, etc.
It would be good features. I am for the request.

Re: e-mail notifications

Posted: Mon Feb 24, 2014 2:39 am
by bjm
wouldn't this just be a cron job you could configure?

Re: e-mail notifications

Posted: Sat May 10, 2014 11:36 am
by Buck
bjm wrote:wouldn't this just be a cron job you could configure?
and how can it be configured?
Do you have any ressource I can find a How-To or similar?
Would be greatly appreciated :)

This e-mail notification is the only thing I am missing right now with Gargoyle. Everything else is just great!

Re: e-mail notifications

Posted: Sun May 11, 2014 8:16 am
by n0pin
Use this code to gather data and save it into a file:

Code: Select all

#!/bin/sh

rm /tmp/email-log.txt

touch /tmp/email-log.txt

#Web Usage

sh /tmp/do_webmon_backup.sh
echo -e "Recently Visited Sites:\n" >> /tmp/email-log.txt
cat /usr/data/webmon_domains.txt >> /tmp/email-log.txt
echo -e "\nRecent Web Searches:\n" >> /tmp/email-log.txt
cat /usr/data/webmon_searches.txt >> /tmp/email-log.txt

#Logs
echo -e "\nSystem logs:\n" >> /tmp/email-log.txt
logread | grep "" >> /tmp/email-log.txt

#DHCP Leases

echo -e "\nDHCP Leases:\n" >> /tmp/email-log.txt
cat /tmp/dhcp.leases >> /tmp/email-log.txt

#ARP Records

echo -e "\nARP Records:\n" >> /tmp/email-log.txt
cat /proc/net/arp >> /tmp/email-log.txt
It creates file /tmp/email-log.txt in which you can find Web usage history, logs, DHCP leases and ARP records. Now all you have to do is to install some e-mail package like msmtp or mini-sendmail and use it to send this file to your email. Then you can just use cron to repeat this.

I can develop a plugin if enough people want this function.

Re: e-mail notifications

Posted: Mon May 12, 2014 12:49 pm
by Buck
n0pin wrote:
It creates file /tmp/email-log.txt in which you can find Web usage history, logs, DHCP leases and ARP records. Now all you have to do is to install some e-mail package like msmtp or mini-sendmail and use it to send this file to your email. Then you can just use cron to repeat this.

I can develop a plugin if enough people want this function.
I really want to thank you! :)
At the moment I don't know how to set up the rest, but this will definitely help me to read further.
Anyway, a Plugin would be really appreciated! :)

Re: e-mail notifications

Posted: Tue May 13, 2014 12:22 am
by mates
I think it would be nice to have (mean as plugin)

Re: e-mail notifications

Posted: Sat Jun 28, 2014 5:35 pm
by keepsake
I have a Buffalo 600 series dual-band router. Would what you propose here in this posting fit in the memory therein?

I would like to have cron in the router run a regular ping of another site and email/text me if it goes down.

Any help would be greatly appreciated.

Re: e-mail notifications

Posted: Tue Jul 08, 2014 7:20 pm
by n0pin

Re: e-mail notifications

Posted: Wed Apr 15, 2015 11:55 pm
by rcooke
n0pin wrote:Use this code to gather data and save it into a file:

Code: Select all

#!/bin/sh

rm /tmp/email-log.txt

touch /tmp/email-log.txt

#Web Usage

sh /tmp/do_webmon_backup.sh
echo -e "Recently Visited Sites:\n" >> /tmp/email-log.txt
cat /usr/data/webmon_domains.txt >> /tmp/email-log.txt
echo -e "\nRecent Web Searches:\n" >> /tmp/email-log.txt
cat /usr/data/webmon_searches.txt >> /tmp/email-log.txt

#Logs
echo -e "\nSystem logs:\n" >> /tmp/email-log.txt
logread | grep "" >> /tmp/email-log.txt

#DHCP Leases

echo -e "\nDHCP Leases:\n" >> /tmp/email-log.txt
cat /tmp/dhcp.leases >> /tmp/email-log.txt

#ARP Records

echo -e "\nARP Records:\n" >> /tmp/email-log.txt
cat /proc/net/arp >> /tmp/email-log.txt
It creates file /tmp/email-log.txt in which you can find Web usage history, logs, DHCP leases and ARP records. Now all you have to do is to install some e-mail package like msmtp or mini-sendmail and use it to send this file to your email. Then you can just use cron to repeat this.

I can develop a plugin if enough people want this function.
Yes I would like to have this email sending info (Bandwidth usage, search, etc) in a scheduler as a Plug-in.