1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

update for the new json_app_get stuff (#179)

This commit is contained in:
VVelox
2018-08-19 17:47:07 -05:00
committed by Tony Murray
parent c772ac97d3
commit 99ad80740c

View File

@@ -51,7 +51,7 @@ use Getopt::Std;
$Getopt::Std::STANDARD_HELP_VERSION = 1;
sub main::VERSION_MESSAGE {
print "FreeBSD ZFS stats extend 0.0.0\n";
print "FreeBSD ZFS stats extend 0.1.0\n";
}
sub main::HELP_MESSAGE {
@@ -251,13 +251,19 @@ while ( defined( $pools[$pools_int] ) ) {
}
$tojson{pools}=\@toShoveIntoJSON;
my %head_hash;
$head_hash{'data'}=\%tojson;
$head_hash{'version'}=1;
$head_hash{'error'}=0;
$head_hash{'errorString'}='';
my $j=JSON->new;
if ( $opts{p} ){
$j->pretty(1);
}
print $j->encode( \%tojson );
print $j->encode( \%head_hash );
if (! $opts{p} ){
print "\n";