e-mail notifications
Moderator: Moderators
e-mail notifications
Hello everybody,
would be nice to have optional everyday scheduled e-mail notifications to admins email with log-file, bandwidth distribution, connected hosts, etc.
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
It would be good features. I am for the request.SergeS wrote:...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
wouldn't this just be a cron job you could configure?
Re: e-mail notifications
and how can it be configured?bjm wrote:wouldn't this just be a cron job you could configure?
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
Use this code to gather data and save it into a file:
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.
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
I can develop a plugin if enough people want this function.
Re: e-mail notifications
I really want to thank you!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.

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
I think it would be nice to have (mean as plugin)
Re: e-mail notifications
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.
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
Yes I would like to have this email sending info (Bandwidth usage, search, etc) in a scheduler as a Plug-in.n0pin wrote:Use this code to gather data and save it into a file:
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.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
I can develop a plugin if enough people want this function.