mirror of https://github.com/mikaku/Monitorix.git
added the option 'url' in the 'nginx' graph to define a full URL to be used to collect stats
This commit is contained in:
parent
327aee563e
commit
62c730dd85
|
@ -147,7 +147,13 @@ sub nginx_update {
|
|||
$ssl = "ssl_opts => {verify_hostname => 0}"
|
||||
if lc($config->{accept_selfsigned_certs}) eq "y";
|
||||
|
||||
my $url = "http://127.0.0.1:" . $nginx->{port} . "/nginx_status";
|
||||
my $url;
|
||||
|
||||
if($nginx->{url}) {
|
||||
$url = $nginx->{url};
|
||||
} else {
|
||||
$url = "http://127.0.0.1:" . $nginx->{port} . "/nginx_status";
|
||||
}
|
||||
my $ua = LWP::UserAgent->new(timeout => 30, $ssl);
|
||||
my $response = $ua->request(HTTP::Request->new('GET', $url));
|
||||
my $rrdata = "N";
|
||||
|
|
|
@ -322,6 +322,7 @@ secure_log_date_format = %b %e
|
|||
# NGINX graph
|
||||
# -----------------------------------------------------------------------------
|
||||
<nginx>
|
||||
url = http://localhost/nginx_status
|
||||
port = 80
|
||||
rule = 24100
|
||||
rigid = 0, 0, 0
|
||||
|
|
Loading…
Reference in New Issue