Fix ZBX_NOTSUPPORTED string in several scripts

tags/zabbix-agent-addons-0.2.59-1
Daniel Berteaud 6 years ago
parent 62069067a1
commit d782fc24ab
  1. 4
      zabbix_scripts/check_httpd
  2. 4
      zabbix_scripts/check_nginx
  3. 2
      zabbix_scripts/check_pmg_sudo
  4. 2
      zabbix_scripts/check_pve_sudo
  5. 4
      zabbix_scripts/check_squid
  6. 4
      zabbix_scripts/check_zfs

@ -21,7 +21,7 @@ my $status = get($uri . '?auto');
unless ($status){ unless ($status){
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
exit 1; exit 1;
} }
@ -50,6 +50,6 @@ elsif (defined $res{$what}){
print $res{$what}; print $res{$what};
} }
else{ else{
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
} }
exit 0; exit 0;

@ -23,7 +23,7 @@ my $status = get($uri);
unless ($status){ unless ($status){
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
exit 1; exit 1;
} }
@ -51,6 +51,6 @@ elsif (defined $res->{$what}){
print $res->{$what}; print $res->{$what};
} }
else{ else{
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
} }
exit 0; exit 0;

@ -81,7 +81,7 @@ if (not defined $domain){
$json->{$_} //= 0 foreach (qw/rbl pregreet/); $json->{$_} //= 0 foreach (qw/rbl pregreet/);
if (defined $what and not defined $json->{$what}){ if (defined $what and not defined $json->{$what}){
print 'ZBX_UNSUPORTED'; print 'ZBX_NOTSUPPORTED';
exit 0; exit 0;
} elsif (defined $what){ } elsif (defined $what){
$resp = $json->{$what} $resp = $json->{$what}

@ -114,7 +114,7 @@ if ($cluster){
} }
} }
} else{ } else{
print 'ZBX_UNSUPORTED'; print 'ZBX_NOTSUPPORTED';
exit 0; exit 0;
} }

@ -23,7 +23,7 @@ my $status = get($uri);
unless ($status){ unless ($status){
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
exit 1; exit 1;
} }
@ -82,6 +82,6 @@ elsif (defined $res->{$what}){
print $res->{$what}; print $res->{$what};
} }
else{ else{
print 'ZBX_UNSUPPOTED'; print 'ZBX_NOTSUPPORTED';
} }
exit 0; exit 0;

@ -45,9 +45,9 @@ if ($zpool){
} }
} }
if ($what){ if ($what){
print ((defined $json->{$pool}->{$what}) ? $json->{$pool}->{$what} : 'ZBX_UNSUPORTED'); print ((defined $json->{$pool}->{$what}) ? $json->{$pool}->{$what} : 'ZBX_NOTSUPPORTED');
} elsif ($pool){ } elsif ($pool){
print ((defined $json->{$pool}) ? to_json($json->{$pool}, { pretty => $pretty }) : 'ZBX_UNSUPORTED'); print ((defined $json->{$pool}) ? to_json($json->{$pool}, { pretty => $pretty }) : 'ZBX_NOTSUPPORTED');
} else { } else {
print to_json($json, { pretty => $pretty }); print to_json($json, { pretty => $pretty });
} }

Loading…
Cancel
Save