From df2da12d82af2f3a0a27c86c934746c2590af34c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 6 Mar 2018 09:29:50 +0100 Subject: [PATCH] Use "all" key to get all httpd stats in JSON format --- zabbix_scripts/check_httpd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/check_httpd b/zabbix_scripts/check_httpd index 5027bd1..2ea03b7 100644 --- a/zabbix_scripts/check_httpd +++ b/zabbix_scripts/check_httpd @@ -7,7 +7,7 @@ use Getopt::Long; use JSON; my $uri = 'http://127.0.0.1/server-status'; -my $what = undef; +my $what = 'all'; my $help = 0; GetOptions( @@ -43,7 +43,7 @@ if ($help){ exit 0; } -if (!$what){ +if ($what eq 'all'){ print to_json(\%res); } elsif (defined $res{$what}){