HELP => \&cmd_help,
PUTVAL => \&putval,
GETVAL => \&getval,
+ GETTHRESHOLD => \&getthreshold,
FLUSH => \&flush,
LISTVAL => \&listval,
PUTNOTIF => \&putnotif,
HELP
PUTVAL
GETVAL
+ GETTHRESHOLD
FLUSH
LISTVAL
PUTNOTIF
return 1;
}
+=item B<GETTHRESHOLD> I<Identifier>
+
+=cut
+
+sub getthreshold {
+ my $sock = shift || return;
+ my $line = shift || return;
+
+ my @line = tokenize($line);
+
+ my $id;
+ my $vals;
+
+ if (! @line) {
+ return;
+ }
+
+ if (scalar(@line) < 1) {
+ print STDERR "Synopsis: GETTHRESHOLD <id>" . $/;
+ return;
+ }
+
+ $id = getid($line[0]);
+
+ if (! $id) {
+ print STDERR "Invalid id \"$line[0]\"." . $/;
+ return;
+ }
+
+ $vals = $sock->getthreshold(%$id);
+
+ if (! $vals) {
+ print STDERR "socket error: " . $sock->{'error'} . $/;
+ return;
+ }
+
+ foreach my $key (keys %$vals) {
+ print "\t$key: $vals->{$key}\n";
+ }
+ return 1;
+}
+
=item B<FLUSH> [B<timeout>=I<$timeout>] [B<plugin>=I<$plugin>[ ...]]
=cut