mirror of https://github.com/mikaku/Monitorix.git
added the new option 'extra_args' in 'ntp.pm' to be able to include extra arguments to the command executed
This commit is contained in:
parent
6656de112c
commit
35b3e8f6a8
3
Changes
3
Changes
|
@ -1,6 +1,9 @@
|
|||
N.N.N - DD-MMM-2015
|
||||
====================
|
||||
- Added support in ZFS graph for versions older than 0.6.4.
|
||||
- Added the new option 'extra_args' in 'ntp.pm' to be able to include extra
|
||||
arguments to the command executed by Monitorix.
|
||||
(suggested by Matti Pentti, Matti.Pentti AT cimcorp.com)
|
||||
- Fixed a missing identifier in sprintf(). [#109]
|
||||
- Fixed a message of 'use of uninitialized value' in 'port.pm'. [#110]
|
||||
- Fixed the Y-axis title in 'fail2ban.pm'. [#111]
|
||||
|
|
|
@ -136,6 +136,7 @@ sub ntp_update {
|
|||
my ($package, $config, $debug) = @_;
|
||||
my $rrd = $config->{base_lib} . $package . ".rrd";
|
||||
my $ntp = $config->{ntp};
|
||||
my $args = $ntp->{extra_args} || "";
|
||||
|
||||
my @data;
|
||||
my $del;
|
||||
|
@ -150,7 +151,7 @@ sub ntp_update {
|
|||
my $e = 0;
|
||||
foreach my $h (split(',', $ntp->{list})) {
|
||||
$h = trim($h);
|
||||
open(IN, "ntpq -pn $h |");
|
||||
open(IN, "ntpq -pn $args $h |");
|
||||
@data = <IN>;
|
||||
close(IN);
|
||||
$cod = $str = $del = $off = $jit = 0;
|
||||
|
|
|
@ -1827,6 +1827,17 @@ For more information on these NTP codes:
|
|||
.P
|
||||
The maximum number of codes allowed for each hostname is 10.
|
||||
.RE
|
||||
.P
|
||||
.BI extra_args
|
||||
.RS
|
||||
This option includes any extra argument to the NTP command executed by Monitorix, which is "ntpq -pn". This is specially useful if you want to force using IPv4, in this case just define this option like this:
|
||||
.P
|
||||
.RS
|
||||
extra_args = "-4"
|
||||
.RE
|
||||
.P
|
||||
Monitorix will add this extra argument to the NTP command which will become as "ntpq -pn -4".
|
||||
.RE
|
||||
.SS Fail2ban statistics (fail2ban.rrd)
|
||||
This graph is able to monitor an unlimited number of Fail2ban jails.
|
||||
.P
|
||||
|
|
Loading…
Reference in New Issue