diff --git a/zabbix_scripts/check_httpd b/zabbix_scripts/check_httpd index 21efe13..67486c7 100644 --- a/zabbix_scripts/check_httpd +++ b/zabbix_scripts/check_httpd @@ -1,20 +1,22 @@ -#!/usr/bin/env perl -w +#!/usr/bin/perl -w use strict; use warnings; use LWP::Simple; use Getopt::Long; +my $uri = 'http://127.0.0.1/server-status'; my $what = undef; my $help = 0; GetOptions( + "uri=s" => \$uri, "what=s" => \$what, "help" => \$help ); my %res = (); -my $status = get("http://127.0.0.1/server-status?auto"); +my $status = get($uri . '?auto'); unless ($status){ diff --git a/zabbix_scripts/disco_httpd b/zabbix_scripts/disco_httpd index 75176f6..74f3256 100644 --- a/zabbix_scripts/disco_httpd +++ b/zabbix_scripts/disco_httpd @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/perl -w use strict; use warnings; @@ -11,7 +11,7 @@ my $json; my $status = get('http://127.0.0.1/server-status?auto'); if ($status){ - push @{$json->{data}}, {"{#HTTPD_STATUS_AVAILABLE}" => 'yes'}; + push @{$json->{data}}, {"{#HTTPD_STATUS_URI}" => 'http://127.0.0.1/server-status'}; } print to_json($json);