mirror of https://github.com/mikaku/Monitorix.git
Update nginx.pm
It didn't work for me until I edited that condition to match the part of code where ipconfig rule is created.
This commit is contained in:
parent
b8baf09891
commit
7683fac3fe
|
@ -142,7 +142,7 @@ sub nginx_update {
|
||||||
my $val;
|
my $val;
|
||||||
open(IN, "iptables -nxvL INPUT |");
|
open(IN, "iptables -nxvL INPUT |");
|
||||||
while(<IN>) {
|
while(<IN>) {
|
||||||
if(/ nginx_IN /) {
|
if(/ monitorix_nginx_IN /) {
|
||||||
(undef, $val) = split(' ', $_);
|
(undef, $val) = split(' ', $_);
|
||||||
chomp($val);
|
chomp($val);
|
||||||
$in = $val - ($config->{nginx_hist}->{'in'} || 0);
|
$in = $val - ($config->{nginx_hist}->{'in'} || 0);
|
||||||
|
@ -155,7 +155,7 @@ sub nginx_update {
|
||||||
close(IN);
|
close(IN);
|
||||||
open(IN, "iptables -nxvL OUTPUT |");
|
open(IN, "iptables -nxvL OUTPUT |");
|
||||||
while(<IN>) {
|
while(<IN>) {
|
||||||
if(/ nginx_IN /) {
|
if(/ monitorix_nginx_IN /) {
|
||||||
(undef, $val) = split(' ', $_);
|
(undef, $val) = split(' ', $_);
|
||||||
chomp($val);
|
chomp($val);
|
||||||
$out = $val - ($config->{nginx_hist}->{'out'} || 0);
|
$out = $val - ($config->{nginx_hist}->{'out'} || 0);
|
||||||
|
|
Loading…
Reference in New Issue