projects
/
snmp-json.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
24f509d
)
save grouped json data
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 2 Dec 2010 13:34:37 +0000
(14:34 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 2 Dec 2010 13:34:37 +0000
(14:34 +0100)
printer-callbacks.pl
patch
|
blob
|
history
diff --git
a/printer-callbacks.pl
b/printer-callbacks.pl
index
38a76f7
..
38aa41b
100755
(executable)
--- a/
printer-callbacks.pl
+++ b/
printer-callbacks.pl
@@
-83,7
+83,6
@@
sub columns_cb {
substr($r_oid,0,length($_)) eq $_
} keys %$oid2name)[0] || die "no name for $r_oid in ",dump($oid2name);
my $name = $oid2name->{$oid};
substr($r_oid,0,length($_)) eq $_
} keys %$oid2name)[0] || die "no name for $r_oid in ",dump($oid2name);
my $name = $oid2name->{$oid};
-warn "++ $oid $name $var\n";
if ( $name =~ m{^\@} ) {
my $no_prefix = $name;
$no_prefix =~ s{^\@}{};
if ( $name =~ m{^\@} ) {
my $no_prefix = $name;
$no_prefix =~ s{^\@}{};
@@
-94,8
+93,6
@@
warn "++ $oid $name $var\n";
}
warn "## $ip response ",dump($response->{$ip});
}
warn "## $ip response ",dump($response->{$ip});
- save_json $ip => $response->{$ip};
- print $log encode_json($response->{$ip}),"\n";
}
foreach my $host ( @printers ) {
}
foreach my $host ( @printers ) {
@@
-151,6
+148,8
@@
foreach my $ip ( keys %$response ) {
}
print "$ip ",dump($status);
}
print "$ip ",dump($status);
+ save_json $ip => $response->{$ip};
+ print $log encode_json($response->{$ip}),"\n";
}
close($log);
}
close($log);