From 820934c865fd5389dc9a6c49eadfc40c343822ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Szewczak?= Date: Thu, 24 May 2018 09:37:30 +0100 Subject: [PATCH] cleanup --- check_json.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/check_json.pl b/check_json.pl index dd22e1b..b6404a3 100755 --- a/check_json.pl +++ b/check_json.pl @@ -26,7 +26,7 @@ my $np = Nagios::Plugin->new( extra => "\nExample: \n" . "check_json.pl --url http://192.168.5.10:9332/local_stats --attributes '{shares}->{dead}' " . "--warning :5 --critical :10 --perfvars '{shares}->{dead},{shares}->{live}' " - . "--outputvars '{status_message}'", + . "--outputvars '{status_message}' -x ", url => 'https://github.com/c-kr/check_json', plugin => 'check_json', timeout => 15, @@ -105,7 +105,6 @@ $np->add_arg( help => "-x|--xauth\n Use X-Auth-Token in header", ); - ## Parse @ARGV and process standard arguments (e.g. usage, help, version) $np->getopts; if ($np->opts->verbose) { (print Dumper ($np))}; @@ -114,13 +113,13 @@ if ($np->opts->verbose) { (print Dumper ($np))}; my $ua = LWP::UserAgent->new; $ua->env_proxy; $ua->agent('check_json/0.5'); -$ua->default_header('Accept' => 'application/json' ); +$ua->default_header('Accept' => 'application/json'); $ua->protocols_allowed( [ 'http', 'https'] ); $ua->parse_head(0); $ua->timeout($np->opts->timeout); if ($np->opts->xauth) { - $ua->default_header('Accept' => 'application/json', 'X-Auth-Token' => $np->opts->xauth ); + $ua->default_header('Accept' => 'application/json', 'X-Auth-Token' => $np->opts->xauth ); } if ($np->opts->ignoressl) {