Use "all" key to get all httpd stats in JSON format

tags/zabbix-agent-addons-0.2.28-1
Daniel Berteaud 7 years ago
parent 347ca02674
commit df2da12d82
  1. 4
      zabbix_scripts/check_httpd

@ -7,7 +7,7 @@ use Getopt::Long;
use JSON; use JSON;
my $uri = 'http://127.0.0.1/server-status'; my $uri = 'http://127.0.0.1/server-status';
my $what = undef; my $what = 'all';
my $help = 0; my $help = 0;
GetOptions( GetOptions(
@ -43,7 +43,7 @@ if ($help){
exit 0; exit 0;
} }
if (!$what){ if ($what eq 'all'){
print to_json(\%res); print to_json(\%res);
} }
elsif (defined $res{$what}){ elsif (defined $res{$what}){

Loading…
Cancel
Save