zabbix-agent-addons/zabbix_scripts/disco_httpd
Daniel Berteaud 6db86ee0c5 Return the uri of server-status
Will make it easier later to suppot alternatives uri
2016-11-09 17:14:15 +01:00

19 lines
300 B
Perl

#!/usr/bin/perl -w
use strict;
use warnings;
use LWP::Simple;
use JSON;
my $json;
@{$json->{data}} = ();
my $status = get('http://127.0.0.1/server-status?auto');
if ($status){
push @{$json->{data}}, {"{#HTTPD_STATUS_URI}" => 'http://127.0.0.1/server-status'};
}
print to_json($json);
exit(0);