From 5f604ea94057589df1c8cd2d685550dc20206541 Mon Sep 17 00:00:00 2001 From: Skibbi Date: Wed, 29 Jan 2014 11:54:35 +0100 Subject: [PATCH 1/4] Configurable time for email reports Add two new config options for defining email reports time. --- monitorix.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitorix.conf b/monitorix.conf index 1c5f4fd..a0dd4c0 100644 --- a/monitorix.conf +++ b/monitorix.conf @@ -15,6 +15,8 @@ temperature_scale = c show_gaps = n global_zoom = 1 max_historic_years = 1 +email_report_hour = 0 +email_report_minute = 0 base_dir = /usr/share/monitorix/ base_lib = /var/lib/monitorix/ From 0512602940cc565894e8a23f99372c0289c175b2 Mon Sep 17 00:00:00 2001 From: Skibbi Date: Wed, 29 Jan 2014 12:01:38 +0100 Subject: [PATCH 2/4] Configurable time for email reports --- monitorix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitorix b/monitorix index 7daec13..6453281 100755 --- a/monitorix +++ b/monitorix @@ -561,11 +561,12 @@ while(1) { # Email Reports if(lc($config{emailreports}->{enabled}) eq "y") { my $emailreports = $config{emailreports}; + my $email_m = $config{email_report_minute}; + my $email_h = $config{email_report_hour}; my $d = "emailreports"; undef($d) if(!grep {trim($_) eq $d} (@{$config{debug}})); - # at 00:00h - if($min == 0 && $hour == 0) { + if($min == $email_m && $hour == $email_h) { eval "use emailreports qw(emailreports_send)"; if($@) { From f857e80ce4493c635d4b1d7570617dde4e31dcbf Mon Sep 17 00:00:00 2001 From: Skibbi Date: Wed, 29 Jan 2014 13:25:37 +0100 Subject: [PATCH 3/4] move settings to emailreports section --- monitorix.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitorix.conf b/monitorix.conf index a0dd4c0..66bdb55 100644 --- a/monitorix.conf +++ b/monitorix.conf @@ -15,8 +15,6 @@ temperature_scale = c show_gaps = n global_zoom = 1 max_historic_years = 1 -email_report_hour = 0 -email_report_minute = 0 base_dir = /usr/share/monitorix/ base_lib = /var/lib/monitorix/ @@ -544,6 +542,8 @@ secure_log_date_format = %b %e url_prefix = http://localhost:8080 smtp_hostname = localhost from_address = noreply@example.com + hour = 0 + minute = 0 enabled = n graphs = system, fs From a8cb8ebf4d3df34bfb2827f927fa1dab1a5e1e41 Mon Sep 17 00:00:00 2001 From: Skibbi Date: Wed, 29 Jan 2014 13:26:59 +0100 Subject: [PATCH 4/4] move settings to emailreports section --- monitorix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitorix b/monitorix index 6453281..d9aff8b 100755 --- a/monitorix +++ b/monitorix @@ -561,8 +561,8 @@ while(1) { # Email Reports if(lc($config{emailreports}->{enabled}) eq "y") { my $emailreports = $config{emailreports}; - my $email_m = $config{email_report_minute}; - my $email_h = $config{email_report_hour}; + my $email_m = $emailreports->{minute}; + my $email_h = $emailreports->{hour}; my $d = "emailreports"; undef($d) if(!grep {trim($_) eq $d} (@{$config{debug}}));