From 98ef89190b2d78d2fe6a0e3ebc2f2b3a0ac9fbab Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 8 May 2019 12:54:03 +0200 Subject: [PATCH] added the new option 'rrdtool_extra_options' to be able to include RRDtool extra options on every graph --- Changes | 2 ++ lib/ambsens.pm | 6 ++++++ lib/apache.pm | 18 +++++++++++++++++- lib/apcupsd.pm | 18 +++++++++++++++++- lib/bind.pm | 20 +++++++++++++++++++- lib/chrony.pm | 18 +++++++++++++++++- lib/disk.pm | 12 +++++++++++- lib/du.pm | 8 +++++++- lib/fail2ban.pm | 8 +++++++- lib/fs.pm | 14 +++++++++++++- lib/ftp.pm | 12 +++++++++++- lib/gensens.pm | 6 ++++++ lib/hptemp.pm | 12 +++++++++++- lib/icecast.pm | 10 +++++++++- lib/int.pm | 12 +++++++++++- lib/ipmi.pm | 6 ++++++ lib/kern.pm | 12 +++++++++++- lib/libvirt.pm | 14 +++++++++++++- lib/lighttpd.pm | 12 +++++++++++- lib/lmsens.pm | 16 +++++++++++++++- lib/mail.pm | 16 ++++++++++++++++ lib/memcached.pm | 20 +++++++++++++++++++- lib/mongodb.pm | 22 +++++++++++++++++++++- lib/mysql.pm | 18 +++++++++++++++++- lib/net.pm | 12 +++++++++++- lib/netstat.pm | 14 ++++++++++++++ lib/nfsc.pm | 18 +++++++++++++++++- lib/nfss.pm | 24 +++++++++++++++++++++++- lib/nginx.pm | 12 +++++++++++- lib/ntp.pm | 12 +++++++++++- lib/nut.pm | 18 +++++++++++++++++- lib/nvidia.pm | 12 +++++++++++- lib/pagespeed.pm | 22 +++++++++++++++++++++- lib/phpapc.pm | 12 +++++++++++- lib/phpfpm.pm | 16 ++++++++++++++++ lib/port.pm | 8 +++++++- lib/proc.pm | 8 +++++++- lib/process.pm | 22 +++++++++++++++++++++- lib/raspberrypi.pm | 12 +++++++++++- lib/serv.pm | 12 +++++++++++- lib/squid.pm | 24 +++++++++++++++++++++++- lib/system.pm | 15 ++++++++++++++- lib/tc.pm | 14 +++++++++++++- lib/traffacct.pm | 10 +++++++++- lib/user.pm | 12 +++++++++++- lib/varnish.pm | 18 +++++++++++++++++- lib/verlihub.pm | 12 +++++++++++- lib/wowza.pm | 16 +++++++++++++++- lib/zfs.pm | 20 +++++++++++++++++++- 49 files changed, 645 insertions(+), 42 deletions(-) diff --git a/Changes b/Changes index 42f3283..28dde42 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ - Added the ability, in the alerts of 'ambsens.pm', to support a range of two values, separated by a dash, in the threshold. [#221] - Added support for FreeBSD NFS Server stats. [#238] +- Added the new option 'rrdtool_extra_options' to be able to include RRDtool + extra options on every graph. - Changed the main loop functionality using now the select() function, instead of the alarm()+pause() pair. This should improve the responsiveness on high system loads. [#230] diff --git a/lib/ambsens.pm b/lib/ambsens.pm index 0851ed5..7ed67ba 100644 --- a/lib/ambsens.pm +++ b/lib/ambsens.pm @@ -277,6 +277,7 @@ sub ambsens_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -305,6 +306,9 @@ sub ambsens_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -445,6 +449,7 @@ sub ambsens_cgi { "--vertical-label=$unit", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -473,6 +478,7 @@ sub ambsens_cgi { "--vertical-label=$unit", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/apache.pm b/lib/apache.pm index 150ab1e..35be6ae 100644 --- a/lib/apache.pm +++ b/lib/apache.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -733,6 +733,7 @@ sub apache_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -752,6 +753,9 @@ sub apache_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -894,6 +898,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -918,6 +923,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1021,6 +1027,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1047,6 +1054,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1117,6 +1125,7 @@ sub apache_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1137,6 +1146,7 @@ sub apache_cgi { "--vertical-label=Percent", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1199,6 +1209,7 @@ sub apache_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1219,6 +1230,7 @@ sub apache_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1288,6 +1300,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1311,6 +1324,7 @@ sub apache_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1376,6 +1390,7 @@ sub apache_cgi { "--vertical-label=Slots", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1396,6 +1411,7 @@ sub apache_cgi { "--vertical-label=Slots", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/apcupsd.pm b/lib/apcupsd.pm index ee8b861..89e8661 100644 --- a/lib/apcupsd.pm +++ b/lib/apcupsd.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -278,6 +278,7 @@ sub apcupsd_cgi { my $width; my $height; my $temp_scale = "Celsius"; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -297,6 +298,9 @@ sub apcupsd_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -492,6 +496,7 @@ sub apcupsd_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -517,6 +522,7 @@ sub apcupsd_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -594,6 +600,7 @@ sub apcupsd_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -619,6 +626,7 @@ sub apcupsd_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -696,6 +704,7 @@ sub apcupsd_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -718,6 +727,7 @@ sub apcupsd_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -783,6 +793,7 @@ sub apcupsd_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -804,6 +815,7 @@ sub apcupsd_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -868,6 +880,7 @@ sub apcupsd_cgi { "--vertical-label=Minutes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -889,6 +902,7 @@ sub apcupsd_cgi { "--vertical-label=Minutes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -950,6 +964,7 @@ sub apcupsd_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -970,6 +985,7 @@ sub apcupsd_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/bind.pm b/lib/bind.pm index cbd3a20..11ee650 100644 --- a/lib/bind.pm +++ b/lib/bind.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -561,6 +561,7 @@ sub bind_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -601,6 +602,9 @@ sub bind_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -832,6 +836,7 @@ sub bind_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -870,6 +875,7 @@ sub bind_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -956,6 +962,7 @@ sub bind_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -994,6 +1001,7 @@ sub bind_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1078,6 +1086,7 @@ sub bind_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1116,6 +1125,7 @@ sub bind_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1202,6 +1212,7 @@ sub bind_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1240,6 +1251,7 @@ sub bind_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1324,6 +1336,7 @@ sub bind_cgi { "--vertical-label=RRsets", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1362,6 +1375,7 @@ sub bind_cgi { "--vertical-label=RRsets", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1449,6 +1463,7 @@ sub bind_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1478,6 +1493,7 @@ sub bind_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1539,6 +1555,7 @@ sub bind_cgi { "--vertical-label=Tasks", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1561,6 +1578,7 @@ sub bind_cgi { "--vertical-label=Tasks", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/chrony.pm b/lib/chrony.pm index 90dd951..c209968 100644 --- a/lib/chrony.pm +++ b/lib/chrony.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -238,6 +238,7 @@ sub chrony_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -257,6 +258,9 @@ sub chrony_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -427,6 +431,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -451,6 +456,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -520,6 +526,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -542,6 +549,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -607,6 +615,7 @@ sub chrony_cgi { "--vertical-label=Level", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -627,6 +636,7 @@ sub chrony_cgi { "--vertical-label=Level", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -688,6 +698,7 @@ sub chrony_cgi { "--vertical-label=PPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -709,6 +720,7 @@ sub chrony_cgi { "--vertical-label=PPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -770,6 +782,7 @@ sub chrony_cgi { "--vertical-label=PPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -790,6 +803,7 @@ sub chrony_cgi { "--vertical-label=PPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -850,6 +864,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -870,6 +885,7 @@ sub chrony_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/disk.pm b/lib/disk.pm index 6c308db..700cfc3 100644 --- a/lib/disk.pm +++ b/lib/disk.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -318,6 +318,7 @@ sub disk_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -348,6 +349,9 @@ sub disk_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -536,6 +540,7 @@ sub disk_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -562,6 +567,7 @@ sub disk_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -665,6 +671,7 @@ sub disk_cgi { "--vertical-label=Sectors", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -692,6 +699,7 @@ sub disk_cgi { "--vertical-label=Sectors", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -792,6 +800,7 @@ sub disk_cgi { "--vertical-label=Sectors", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -819,6 +828,7 @@ sub disk_cgi { "--vertical-label=Sectors", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/du.pm b/lib/du.pm index 1f7fe49..b50c37e 100644 --- a/lib/du.pm +++ b/lib/du.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2018 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -217,6 +217,7 @@ sub du_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -246,6 +247,9 @@ sub du_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -434,6 +438,7 @@ sub du_cgi { "--vertical-label=$type_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -454,6 +459,7 @@ sub du_cgi { "--vertical-label=$type_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/fail2ban.pm b/lib/fail2ban.pm index 6dc3e35..d84527e 100644 --- a/lib/fail2ban.pm +++ b/lib/fail2ban.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -227,6 +227,7 @@ sub fail2ban_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -255,6 +256,9 @@ sub fail2ban_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -396,6 +400,7 @@ sub fail2ban_cgi { "--vertical-label=Bans/min", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -424,6 +429,7 @@ sub fail2ban_cgi { "--vertical-label=Bans/min", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/fs.pm b/lib/fs.pm index fbf1921..a56465d 100644 --- a/lib/fs.pm +++ b/lib/fs.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -823,6 +823,7 @@ sub fs_cgi { my $u = ""; my $width; my $height; + my @extra; my $graph_title; my $vlabel; my @IMG; @@ -854,6 +855,9 @@ sub fs_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -1009,6 +1013,7 @@ sub fs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1035,6 +1040,7 @@ sub fs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1125,6 +1131,7 @@ sub fs_cgi { "--vertical-label=Reads+Writes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1151,6 +1158,7 @@ sub fs_cgi { "--vertical-label=Reads+Writes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1238,6 +1246,7 @@ sub fs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1264,6 +1273,7 @@ sub fs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1389,6 +1399,7 @@ sub fs_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1423,6 +1434,7 @@ sub fs_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/ftp.pm b/lib/ftp.pm index 06e9c3c..f63c0bd 100644 --- a/lib/ftp.pm +++ b/lib/ftp.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -326,6 +326,7 @@ sub ftp_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -339,6 +340,9 @@ sub ftp_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -480,6 +484,7 @@ sub ftp_cgi { "--vertical-label=Commands/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -505,6 +510,7 @@ sub ftp_cgi { "--vertical-label=Commands/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -584,6 +590,7 @@ sub ftp_cgi { "--vertical-label=Logins/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -607,6 +614,7 @@ sub ftp_cgi { "--vertical-label=Logins/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -678,6 +686,7 @@ sub ftp_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -699,6 +708,7 @@ sub ftp_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/gensens.pm b/lib/gensens.pm index 384c867..e7d568a 100644 --- a/lib/gensens.pm +++ b/lib/gensens.pm @@ -273,6 +273,7 @@ sub gensens_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $temp_scale = "Celsius"; my @IMG; @@ -302,6 +303,9 @@ sub gensens_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -476,6 +480,7 @@ sub gensens_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -504,6 +509,7 @@ sub gensens_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/hptemp.pm b/lib/hptemp.pm index 4476014..efaa36f 100644 --- a/lib/hptemp.pm +++ b/lib/hptemp.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -270,6 +270,7 @@ sub hptemp_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $temp_scale = "Celsius"; my @tmp; @@ -296,6 +297,9 @@ sub hptemp_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -479,6 +483,7 @@ sub hptemp_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -506,6 +511,7 @@ sub hptemp_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -610,6 +616,7 @@ sub hptemp_cgi { "--width=$width", "--height=$height", "--lower-limit=0", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, @@ -635,6 +642,7 @@ sub hptemp_cgi { "--width=$width", "--height=$height", "--lower-limit=0", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, @@ -733,6 +741,7 @@ sub hptemp_cgi { "--width=$width", "--height=$height", "--lower-limit=0", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, @@ -758,6 +767,7 @@ sub hptemp_cgi { "--width=$width", "--height=$height", "--lower-limit=0", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, diff --git a/lib/icecast.pm b/lib/icecast.pm index 45807ea..7be7d6a 100644 --- a/lib/icecast.pm +++ b/lib/icecast.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -243,6 +243,7 @@ sub icecast_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -283,6 +284,9 @@ sub icecast_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -448,6 +452,7 @@ sub icecast_cgi { "--vertical-label=Listeners", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -475,6 +480,7 @@ sub icecast_cgi { "--vertical-label=Listeners", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -549,6 +555,7 @@ sub icecast_cgi { "--vertical-label=Bitrate", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -576,6 +583,7 @@ sub icecast_cgi { "--vertical-label=Bitrate", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/int.pm b/lib/int.pm index 87ccfe9..fa78158 100644 --- a/lib/int.pm +++ b/lib/int.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -451,6 +451,7 @@ sub int_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @CDEF; my @allvalues1; @@ -826,6 +827,9 @@ sub int_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -1062,6 +1066,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1081,6 +1086,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1137,6 +1143,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1157,6 +1164,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1210,6 +1218,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1230,6 +1239,7 @@ sub int_cgi { "--vertical-label=Ticks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/ipmi.pm b/lib/ipmi.pm index c04c6c2..3e3e0a1 100644 --- a/lib/ipmi.pm +++ b/lib/ipmi.pm @@ -234,6 +234,7 @@ sub ipmi_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -262,6 +263,9 @@ sub ipmi_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -403,6 +407,7 @@ sub ipmi_cgi { "--vertical-label=$unit", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -431,6 +436,7 @@ sub ipmi_cgi { "--vertical-label=$unit", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/kern.pm b/lib/kern.pm index f4592f7..a931944 100644 --- a/lib/kern.pm +++ b/lib/kern.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -399,6 +399,7 @@ sub kern_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -413,6 +414,9 @@ sub kern_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -705,6 +709,7 @@ sub kern_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -731,6 +736,7 @@ sub kern_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -815,6 +821,7 @@ sub kern_cgi { "--vertical-label=CS & forks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -837,6 +844,7 @@ sub kern_cgi { "--vertical-label=CS & forks/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -914,6 +922,7 @@ sub kern_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -936,6 +945,7 @@ sub kern_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/libvirt.pm b/lib/libvirt.pm index 97fc477..27cc25e 100644 --- a/lib/libvirt.pm +++ b/lib/libvirt.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -315,6 +315,7 @@ sub libvirt_cgi { my $u = ""; my $width; my $height; + my @extra; my $graph_title; my @IMG; my @IMGz; @@ -347,6 +348,9 @@ sub libvirt_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -517,6 +521,7 @@ sub libvirt_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -543,6 +548,7 @@ sub libvirt_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -628,6 +634,7 @@ sub libvirt_cgi { "--vertical-label=Bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -662,6 +669,7 @@ sub libvirt_cgi { "--vertical-label=Bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -752,6 +760,7 @@ sub libvirt_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -786,6 +795,7 @@ sub libvirt_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -898,6 +908,7 @@ sub libvirt_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -924,6 +935,7 @@ sub libvirt_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/lighttpd.pm b/lib/lighttpd.pm index 40d31ba..dcafd00 100644 --- a/lib/lighttpd.pm +++ b/lib/lighttpd.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -223,6 +223,7 @@ sub lighttpd_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -243,6 +244,9 @@ sub lighttpd_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -388,6 +392,7 @@ sub lighttpd_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -412,6 +417,7 @@ sub lighttpd_cgi { "--vertical-label=Workers", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -484,6 +490,7 @@ sub lighttpd_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -504,6 +511,7 @@ sub lighttpd_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -566,6 +574,7 @@ sub lighttpd_cgi { "--vertical-label=Accesses/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -586,6 +595,7 @@ sub lighttpd_cgi { "--vertical-label=Accesses/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/lmsens.pm b/lib/lmsens.pm index a10b705..b6f69f7 100644 --- a/lib/lmsens.pm +++ b/lib/lmsens.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -404,6 +404,7 @@ sub lmsens_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $temp_scale = "Celsius"; my @tmp; @@ -438,6 +439,9 @@ sub lmsens_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -712,6 +716,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -746,6 +751,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -905,6 +911,7 @@ sub lmsens_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -935,6 +942,7 @@ sub lmsens_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1046,6 +1054,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1072,6 +1081,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1172,6 +1182,7 @@ sub lmsens_cgi { "--vertical-label=RPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1201,6 +1212,7 @@ sub lmsens_cgi { "--vertical-label=RPM", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1327,6 +1339,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1356,6 +1369,7 @@ sub lmsens_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/mail.pm b/lib/mail.pm index 9ab45f1..0d048a5 100644 --- a/lib/mail.pm +++ b/lib/mail.pm @@ -733,6 +733,7 @@ sub mail_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $T = "B"; my $vlabel = "bytes/s"; @@ -752,6 +753,9 @@ sub mail_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -1082,6 +1086,7 @@ sub mail_cgi { "--vertical-label=$rate_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1117,6 +1122,7 @@ sub mail_cgi { "--vertical-label=$rate_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1213,6 +1219,7 @@ sub mail_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1237,6 +1244,7 @@ sub mail_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1304,6 +1312,7 @@ sub mail_cgi { "--vertical-label=Messages", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1324,6 +1333,7 @@ sub mail_cgi { "--vertical-label=Messages", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1385,6 +1395,7 @@ sub mail_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1406,6 +1417,7 @@ sub mail_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1474,6 +1486,7 @@ sub mail_cgi { "--vertical-label=Messages", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1497,6 +1510,7 @@ sub mail_cgi { "--vertical-label=Messages", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1585,6 +1599,7 @@ sub mail_cgi { "--vertical-label=$rate_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1608,6 +1623,7 @@ sub mail_cgi { "--vertical-label=$rate_label", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/memcached.pm b/lib/memcached.pm index 02069aa..b95f7e0 100644 --- a/lib/memcached.pm +++ b/lib/memcached.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -418,6 +418,7 @@ sub memcached_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -437,6 +438,9 @@ sub memcached_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -645,6 +649,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -675,6 +680,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -778,6 +784,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -809,6 +816,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -882,6 +890,7 @@ sub memcached_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -905,6 +914,7 @@ sub memcached_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -965,6 +975,7 @@ sub memcached_cgi { "--vertical-label=Items", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -985,6 +996,7 @@ sub memcached_cgi { "--vertical-label=Items", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1051,6 +1063,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1073,6 +1086,7 @@ sub memcached_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1141,6 +1155,7 @@ sub memcached_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1163,6 +1178,7 @@ sub memcached_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1234,6 +1250,7 @@ sub memcached_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1255,6 +1272,7 @@ sub memcached_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/mongodb.pm b/lib/mongodb.pm index 06c7fbe..3af2526 100644 --- a/lib/mongodb.pm +++ b/lib/mongodb.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -595,6 +595,7 @@ sub mongodb_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -616,6 +617,9 @@ sub mongodb_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -828,6 +832,7 @@ sub mongodb_cgi { "--vertical-label=Operations/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -853,6 +858,7 @@ sub mongodb_cgi { "--vertical-label=Operations/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -935,6 +941,7 @@ sub mongodb_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -958,6 +965,7 @@ sub mongodb_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1027,6 +1035,7 @@ sub mongodb_cgi { "--vertical-label=ms", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1048,6 +1057,7 @@ sub mongodb_cgi { "--vertical-label=ms", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1112,6 +1122,7 @@ sub mongodb_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1133,6 +1144,7 @@ sub mongodb_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1197,6 +1209,7 @@ sub mongodb_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1218,6 +1231,7 @@ sub mongodb_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1295,6 +1309,7 @@ sub mongodb_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1316,6 +1331,7 @@ sub mongodb_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1410,6 +1426,7 @@ sub mongodb_cgi { "--vertical-label=Values", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1432,6 +1449,7 @@ sub mongodb_cgi { "--vertical-label=Values", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1505,6 +1523,7 @@ sub mongodb_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1527,6 +1546,7 @@ sub mongodb_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/mysql.pm b/lib/mysql.pm index 43c0cf3..16a019c 100644 --- a/lib/mysql.pm +++ b/lib/mysql.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -508,6 +508,7 @@ sub mysql_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -528,6 +529,9 @@ sub mysql_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -731,6 +735,7 @@ sub mysql_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -759,6 +764,7 @@ sub mysql_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -865,6 +871,7 @@ sub mysql_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -890,6 +897,7 @@ sub mysql_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -967,6 +975,7 @@ sub mysql_cgi { "--vertical-label=Open & Locks/min", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -988,6 +997,7 @@ sub mysql_cgi { "--vertical-label=Open & Locks/min", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1057,6 +1067,7 @@ sub mysql_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1078,6 +1089,7 @@ sub mysql_cgi { "--vertical-label=Queries/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1152,6 +1164,7 @@ sub mysql_cgi { "--vertical-label=Connectionss/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1174,6 +1187,7 @@ sub mysql_cgi { "--vertical-label=Connectionss/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1252,6 +1266,7 @@ sub mysql_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1273,6 +1288,7 @@ sub mysql_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/net.pm b/lib/net.pm index c165852..6362451 100644 --- a/lib/net.pm +++ b/lib/net.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -270,6 +270,7 @@ sub net_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $netname; my @tmp; @@ -287,6 +288,9 @@ sub net_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -463,6 +467,7 @@ sub net_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -489,6 +494,7 @@ sub net_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -562,6 +568,7 @@ sub net_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -583,6 +590,7 @@ sub net_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -653,6 +661,7 @@ sub net_cgi { "--vertical-label=Errors/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -674,6 +683,7 @@ sub net_cgi { "--vertical-label=Errors/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/netstat.pm b/lib/netstat.pm index bce0248..d0acc99 100644 --- a/lib/netstat.pm +++ b/lib/netstat.pm @@ -375,6 +375,7 @@ sub netstat_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -388,6 +389,9 @@ sub netstat_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -532,6 +536,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -557,6 +562,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -657,6 +663,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -682,6 +689,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -761,6 +769,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -785,6 +794,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -864,6 +874,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -890,6 +901,7 @@ sub netstat_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -957,6 +969,7 @@ sub netstat_cgi { "--vertical-label=Listen", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -979,6 +992,7 @@ sub netstat_cgi { "--vertical-label=Listen", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/nfsc.pm b/lib/nfsc.pm index e02465e..c3e9475 100644 --- a/lib/nfsc.pm +++ b/lib/nfsc.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -240,6 +240,7 @@ sub nfsc_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -284,6 +285,9 @@ sub nfsc_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } my @nfsv2 = ("null", "getattr", "setattr", "root", "lookup", "readlink", "read", "wrcache", "write", "create", "remove", "rename", "link", "symlink", "mkdir", "rmdir", "readdir", "fsstat"); my @nfsv3 = ("null", "getattr", "setattr", "lookup", "access", "readlink", "read", "write", "create", "mkdir", "symlink", "mknod", "remove", "rmdir", "rename", "link", "readdir", "readdirplus", "fsstat", "fsinfo", "pathconf", "commit"); @@ -445,6 +449,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -464,6 +469,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -539,6 +545,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -557,6 +564,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -642,6 +650,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -661,6 +670,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -743,6 +753,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -762,6 +773,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -844,6 +856,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -863,6 +876,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -933,6 +947,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -955,6 +970,7 @@ sub nfsc_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/nfss.pm b/lib/nfss.pm index 0ee3c10..68fb70a 100644 --- a/lib/nfss.pm +++ b/lib/nfss.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -375,6 +375,7 @@ sub nfss_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -415,6 +416,9 @@ sub nfss_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } my @nfsv2 = ("null", "getattr", "setattr", "root", "lookup", "readlink", "read", "wrcache", "write", "create", "remove", "rename", "link", "symlink", "mkdir", "rmdir", "readdir", "fsstat"); my @nfsv3 = ("null", "getattr", "setattr", "lookup", "access", "readlink", "read", "write", "create", "mkdir", "symlink", "mknod", "remove", "rmdir", "rename", "link", "readdir", "readdirplus", "fsstat", "fsinfo", "pathconf", "commit"); @@ -607,6 +611,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -626,6 +631,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -701,6 +707,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -719,6 +726,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -794,6 +802,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -812,6 +821,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -882,6 +892,7 @@ sub nfss_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -903,6 +914,7 @@ sub nfss_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -975,6 +987,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -998,6 +1011,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1072,6 +1086,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1096,6 +1111,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1189,6 +1205,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1219,6 +1236,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1300,6 +1318,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1322,6 +1341,7 @@ sub nfss_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1395,6 +1415,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1419,6 +1440,7 @@ sub nfss_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/nginx.pm b/lib/nginx.pm index 9673ca4..7d654b0 100644 --- a/lib/nginx.pm +++ b/lib/nginx.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -269,6 +269,7 @@ sub nginx_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @warning; my @tmp; @@ -285,6 +286,9 @@ sub nginx_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -424,6 +428,7 @@ sub nginx_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -447,6 +452,7 @@ sub nginx_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -514,6 +520,7 @@ sub nginx_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -534,6 +541,7 @@ sub nginx_cgi { "--vertical-label=Requests/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -644,6 +652,7 @@ sub nginx_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -666,6 +675,7 @@ sub nginx_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/ntp.pm b/lib/ntp.pm index 7d5951e..be98452 100644 --- a/lib/ntp.pm +++ b/lib/ntp.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -216,6 +216,7 @@ sub ntp_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -247,6 +248,9 @@ sub ntp_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -405,6 +409,7 @@ sub ntp_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -430,6 +435,7 @@ sub ntp_cgi { "--vertical-label=Seconds", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -493,6 +499,7 @@ sub ntp_cgi { "--vertical-label=Level", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -513,6 +520,7 @@ sub ntp_cgi { "--vertical-label=Level", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -579,6 +587,7 @@ sub ntp_cgi { "--vertical-label=Hits", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -608,6 +617,7 @@ sub ntp_cgi { "--vertical-label=Hits", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/nut.pm b/lib/nut.pm index f389a4f..b88fa68 100644 --- a/lib/nut.pm +++ b/lib/nut.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -266,6 +266,7 @@ sub nut_cgi { my $u = ""; my $width; my $height; + my @extra; my $temp_scale = "Celsius"; my @riglim; my @IMG; @@ -286,6 +287,9 @@ sub nut_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -480,6 +484,7 @@ sub nut_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -505,6 +510,7 @@ sub nut_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -582,6 +588,7 @@ sub nut_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -607,6 +614,7 @@ sub nut_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -684,6 +692,7 @@ sub nut_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -706,6 +715,7 @@ sub nut_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -771,6 +781,7 @@ sub nut_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -792,6 +803,7 @@ sub nut_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -856,6 +868,7 @@ sub nut_cgi { "--vertical-label=Minutes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -879,6 +892,7 @@ sub nut_cgi { "--vertical-label=Minutes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -942,6 +956,7 @@ sub nut_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -962,6 +977,7 @@ sub nut_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/nvidia.pm b/lib/nvidia.pm index 2fbccfd..9805b34 100644 --- a/lib/nvidia.pm +++ b/lib/nvidia.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -296,6 +296,7 @@ sub nvidia_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $temp_scale = "Celsius"; my @tmp; @@ -321,6 +322,9 @@ sub nvidia_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -477,6 +481,7 @@ sub nvidia_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -506,6 +511,7 @@ sub nvidia_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -594,6 +600,7 @@ sub nvidia_cgi { "--vertical-label=Percent", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -623,6 +630,7 @@ sub nvidia_cgi { "--vertical-label=Percent", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -708,6 +716,7 @@ sub nvidia_cgi { "--vertical-label=Percent", "--width=$width", "--height=$height", + @extra, @riglim, @{$cgi->{version12}}, $zoom, @@ -737,6 +746,7 @@ sub nvidia_cgi { "--vertical-label=Percent", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/pagespeed.pm b/lib/pagespeed.pm index 65d5053..e21d789 100644 --- a/lib/pagespeed.pm +++ b/lib/pagespeed.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -659,6 +659,7 @@ sub pagespeed_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -678,6 +679,9 @@ sub pagespeed_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -866,6 +870,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -894,6 +899,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -999,6 +1005,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1024,6 +1031,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1107,6 +1115,7 @@ sub pagespeed_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1133,6 +1142,7 @@ sub pagespeed_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1210,6 +1220,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1235,6 +1246,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1307,6 +1319,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1332,6 +1345,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1401,6 +1415,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1425,6 +1440,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1496,6 +1512,7 @@ sub pagespeed_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1521,6 +1538,7 @@ sub pagespeed_cgi { "--vertical-label=Value/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1578,6 +1596,7 @@ sub pagespeed_cgi { "--vertical-label=Microseconds/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1598,6 +1617,7 @@ sub pagespeed_cgi { "--vertical-label=Microseconds/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/phpapc.pm b/lib/phpapc.pm index 956028a..04823db 100644 --- a/lib/phpapc.pm +++ b/lib/phpapc.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -219,6 +219,7 @@ sub phpapc_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -238,6 +239,9 @@ sub phpapc_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -409,6 +413,7 @@ sub phpapc_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -433,6 +438,7 @@ sub phpapc_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -505,6 +511,7 @@ sub phpapc_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -526,6 +533,7 @@ sub phpapc_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -589,6 +597,7 @@ sub phpapc_cgi { "--vertical-label=Cached files/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -611,6 +620,7 @@ sub phpapc_cgi { "--vertical-label=Cached files/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/phpfpm.pm b/lib/phpfpm.pm index b72e82d..0bee2cd 100644 --- a/lib/phpfpm.pm +++ b/lib/phpfpm.pm @@ -257,6 +257,7 @@ sub phpfpm_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -287,6 +288,9 @@ sub phpfpm_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -463,6 +467,7 @@ sub phpfpm_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -490,6 +495,7 @@ sub phpfpm_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -559,6 +565,7 @@ sub phpfpm_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -585,6 +592,7 @@ sub phpfpm_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -652,6 +660,7 @@ sub phpfpm_cgi { "--vertical-label=Listening", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -679,6 +688,7 @@ sub phpfpm_cgi { "--vertical-label=Listening", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -742,6 +752,7 @@ sub phpfpm_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -785,6 +796,7 @@ sub phpfpm_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -864,6 +876,7 @@ sub phpfpm_cgi { "--vertical-label=Children", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -891,6 +904,7 @@ sub phpfpm_cgi { "--vertical-label=Children", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -954,6 +968,7 @@ sub phpfpm_cgi { "--vertical-label=Requests", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -981,6 +996,7 @@ sub phpfpm_cgi { "--vertical-label=Requests", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/port.pm b/lib/port.pm index cbf66f9..cfd243a 100644 --- a/lib/port.pm +++ b/lib/port.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -345,6 +345,7 @@ sub port_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @warning; my @IMG; @@ -367,6 +368,9 @@ sub port_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -627,6 +631,7 @@ sub port_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -651,6 +656,7 @@ sub port_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/proc.pm b/lib/proc.pm index 462667f..c05f989 100644 --- a/lib/proc.pm +++ b/lib/proc.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -268,6 +268,7 @@ sub proc_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -287,6 +288,9 @@ sub proc_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -622,6 +626,7 @@ sub proc_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -649,6 +654,7 @@ sub proc_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/process.pm b/lib/process.pm index e3af6d8..0979a06 100644 --- a/lib/process.pm +++ b/lib/process.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -334,6 +334,7 @@ sub process_cgi { my $u = ""; my $width; my $height; + my @extra; my $graph_title; my @IMG; my @IMGz; @@ -368,6 +369,9 @@ sub process_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -529,6 +533,7 @@ sub process_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -557,6 +562,7 @@ sub process_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -640,6 +646,7 @@ sub process_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -678,6 +685,7 @@ sub process_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -768,6 +776,7 @@ sub process_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -806,6 +815,7 @@ sub process_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -922,6 +932,7 @@ sub process_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -950,6 +961,7 @@ sub process_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1030,6 +1042,7 @@ sub process_cgi { "--vertical-label=Files", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1058,6 +1071,7 @@ sub process_cgi { "--vertical-label=Files", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1141,6 +1155,7 @@ sub process_cgi { "--vertical-label=Threads", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1169,6 +1184,7 @@ sub process_cgi { "--vertical-label=Threads", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1254,6 +1270,7 @@ sub process_cgi { "--vertical-label=Nonvoluntary + voluntary/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1313,6 +1330,7 @@ sub process_cgi { "--vertical-label=Nonvoluntary + voluntary/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1427,6 +1445,7 @@ sub process_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1455,6 +1474,7 @@ sub process_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/raspberrypi.pm b/lib/raspberrypi.pm index 9948a89..b44ffd1 100644 --- a/lib/raspberrypi.pm +++ b/lib/raspberrypi.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -227,6 +227,7 @@ sub raspberrypi_cgi { my $u = ""; my $width; my $height; + my @extra; my $temp_scale = "Celsius"; my @riglim; my @tmp; @@ -252,6 +253,9 @@ sub raspberrypi_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -411,6 +415,7 @@ sub raspberrypi_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -438,6 +443,7 @@ sub raspberrypi_cgi { "--vertical-label=Hz", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -514,6 +520,7 @@ sub raspberrypi_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -534,6 +541,7 @@ sub raspberrypi_cgi { "--vertical-label=$temp_scale", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -602,6 +610,7 @@ sub raspberrypi_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -625,6 +634,7 @@ sub raspberrypi_cgi { "--vertical-label=Volts", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/serv.pm b/lib/serv.pm index 4669641..f131acb 100644 --- a/lib/serv.pm +++ b/lib/serv.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -652,6 +652,7 @@ sub serv_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my $vlabel; my @tmp; @@ -667,6 +668,9 @@ sub serv_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -899,6 +903,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -933,6 +938,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1032,6 +1038,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1055,6 +1062,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1151,6 +1159,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1177,6 +1186,7 @@ sub serv_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/squid.pm b/lib/squid.pm index d5e5b0a..a46fa4a 100644 --- a/lib/squid.pm +++ b/lib/squid.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -481,6 +481,7 @@ sub squid_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -525,6 +526,9 @@ sub squid_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -772,6 +776,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -790,6 +795,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -866,6 +872,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -884,6 +891,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -985,6 +993,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1012,6 +1021,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1088,6 +1098,7 @@ sub squid_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1112,6 +1123,7 @@ sub squid_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1181,6 +1193,7 @@ sub squid_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1205,6 +1218,7 @@ sub squid_cgi { "--vertical-label=Megabytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1280,6 +1294,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1302,6 +1317,7 @@ sub squid_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1380,6 +1396,7 @@ sub squid_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1403,6 +1420,7 @@ sub squid_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1481,6 +1499,7 @@ sub squid_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1502,6 +1521,7 @@ sub squid_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1578,6 +1598,7 @@ sub squid_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1599,6 +1620,7 @@ sub squid_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/system.pm b/lib/system.pm index abb350e..873c392 100644 --- a/lib/system.pm +++ b/lib/system.pm @@ -448,6 +448,7 @@ sub system_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -461,7 +462,9 @@ sub system_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); - + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -615,6 +618,7 @@ sub system_cgi { "--vertical-label=Load average", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -638,6 +642,7 @@ sub system_cgi { "--vertical-label=Load average", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -712,6 +717,7 @@ sub system_cgi { "--lower-limit=0", "--rigid", "--base=1024", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, @@ -747,6 +753,7 @@ sub system_cgi { "--lower-limit=0", "--rigid", "--base=1024", + @extra, $zoom, @{$cgi->{version12}}, @{$cgi->{version12_small}}, @@ -851,6 +858,7 @@ sub system_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -877,6 +885,7 @@ sub system_cgi { "--vertical-label=Processes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -940,6 +949,7 @@ sub system_cgi { "--vertical-label=Size", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -960,6 +970,7 @@ sub system_cgi { "--vertical-label=Size", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1017,6 +1028,7 @@ sub system_cgi { "--vertical-label=Days", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1038,6 +1050,7 @@ sub system_cgi { "--vertical-label=Days", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/tc.pm b/lib/tc.pm index 6873309..11e0c07 100644 --- a/lib/tc.pm +++ b/lib/tc.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -315,6 +315,7 @@ sub tc_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -348,6 +349,9 @@ sub tc_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -527,6 +531,7 @@ sub tc_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -554,6 +559,7 @@ sub tc_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -637,6 +643,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -664,6 +671,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -744,6 +752,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -771,6 +780,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -853,6 +863,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -880,6 +891,7 @@ sub tc_cgi { "--vertical-label=Packets/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/traffacct.pm b/lib/traffacct.pm index b2e9be6..4cf8914 100644 --- a/lib/traffacct.pm +++ b/lib/traffacct.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -445,6 +445,7 @@ sub traffacct_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -464,6 +465,9 @@ sub traffacct_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } if(lc($config->{netstats_in_bps}) eq "y") { $T = "b"; @@ -550,6 +554,7 @@ sub traffacct_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -571,6 +576,7 @@ sub traffacct_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -663,6 +669,7 @@ sub traffacct_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -685,6 +692,7 @@ sub traffacct_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/user.pm b/lib/user.pm index 8bbd82b..a0dacad 100644 --- a/lib/user.pm +++ b/lib/user.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -184,6 +184,7 @@ sub user_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -197,6 +198,9 @@ sub user_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -299,6 +303,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -322,6 +327,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -386,6 +392,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -406,6 +413,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -467,6 +475,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -487,6 +496,7 @@ sub user_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/varnish.pm b/lib/varnish.pm index 01c7c29..cf8ab91 100644 --- a/lib/varnish.pm +++ b/lib/varnish.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -394,6 +394,7 @@ sub varnish_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -407,6 +408,9 @@ sub varnish_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -578,6 +582,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -605,6 +610,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -711,6 +717,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -737,6 +744,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -813,6 +821,7 @@ sub varnish_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -835,6 +844,7 @@ sub varnish_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -902,6 +912,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -924,6 +935,7 @@ sub varnish_cgi { "--vertical-label=Values/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -994,6 +1006,7 @@ sub varnish_cgi { "--vertical-label=Objects", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1017,6 +1030,7 @@ sub varnish_cgi { "--vertical-label=Objects", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1088,6 +1102,7 @@ sub varnish_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1109,6 +1124,7 @@ sub varnish_cgi { "--vertical-label=bytes/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/verlihub.pm b/lib/verlihub.pm index faf7398..595f195 100644 --- a/lib/verlihub.pm +++ b/lib/verlihub.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -185,6 +185,7 @@ sub verlihub_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @tmp; my @tmpz; @@ -198,6 +199,9 @@ sub verlihub_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -298,6 +302,7 @@ sub verlihub_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -321,6 +326,7 @@ sub verlihub_cgi { "--vertical-label=Users", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -388,6 +394,7 @@ sub verlihub_cgi { "--width=$width", "--height=$height", "--units-exponent=0", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -409,6 +416,7 @@ sub verlihub_cgi { "--width=$width", "--height=$height", "--units-exponent=0", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -471,6 +479,7 @@ sub verlihub_cgi { "--width=$width", "--height=$height", "--units-exponent=0", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -492,6 +501,7 @@ sub verlihub_cgi { "--width=$width", "--height=$height", "--units-exponent=0", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/wowza.pm b/lib/wowza.pm index a710131..811d752 100644 --- a/lib/wowza.pm +++ b/lib/wowza.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -408,6 +408,7 @@ sub wowza_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -451,6 +452,9 @@ sub wowza_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -617,6 +621,7 @@ sub wowza_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -645,6 +650,7 @@ sub wowza_cgi { "--vertical-label=Connections", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -720,6 +726,7 @@ sub wowza_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -754,6 +761,7 @@ sub wowza_cgi { "--vertical-label=$vlabel", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -831,6 +839,7 @@ sub wowza_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -858,6 +867,7 @@ sub wowza_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -923,6 +933,7 @@ sub wowza_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -950,6 +961,7 @@ sub wowza_cgi { "--vertical-label=Connections/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1015,6 +1027,7 @@ sub wowza_cgi { "--vertical-label=Sessions", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1042,6 +1055,7 @@ sub wowza_cgi { "--vertical-label=Sessions", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, diff --git a/lib/zfs.pm b/lib/zfs.pm index d0132b6..df86925 100644 --- a/lib/zfs.pm +++ b/lib/zfs.pm @@ -1,7 +1,7 @@ # # Monitorix - A lightweight system monitoring tool. # -# Copyright (C) 2005-2017 by Jordi Sanfeliu +# Copyright (C) 2005-2019 by Jordi Sanfeliu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -320,6 +320,7 @@ sub zfs_cgi { my $u = ""; my $width; my $height; + my @extra; my @riglim; my @IMG; my @IMGz; @@ -337,6 +338,9 @@ sub zfs_cgi { my $IMG_DIR = $config->{base_dir} . "/" . $config->{imgs_dir}; my $imgfmt_uc = uc($config->{image_format}); my $imgfmt_lc = lc($config->{image_format}); + foreach my $i (split(',', $config->{rrdtool_extra_options} || "")) { + push(@extra, trim($i)) if trim($i); + } $title = !$silent ? $title : ""; @@ -511,6 +515,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -537,6 +542,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -611,6 +617,7 @@ sub zfs_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -633,6 +640,7 @@ sub zfs_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -697,6 +705,7 @@ sub zfs_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -718,6 +727,7 @@ sub zfs_cgi { "--vertical-label=Reads/s", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -794,6 +804,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -816,6 +827,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -881,6 +893,7 @@ sub zfs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -902,6 +915,7 @@ sub zfs_cgi { "--vertical-label=Percent (%)", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -970,6 +984,7 @@ sub zfs_cgi { "--vertical-label=Number", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -992,6 +1007,7 @@ sub zfs_cgi { "--vertical-label=Number", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1057,6 +1073,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}}, @@ -1081,6 +1098,7 @@ sub zfs_cgi { "--vertical-label=bytes", "--width=$width", "--height=$height", + @extra, @riglim, $zoom, @{$cgi->{version12}},