When invoked as an external monitor, the perl "print" command with no other options returns the printed text to the bigd daemon (which invoked the monitor script) rather than displaying the printed text on the console.
The sample perl monitor (/config/monitors/arg_example) shows how to send results to a file instead of return them bigd:
Open the output file
my $outfile = "/var/arg_ex_out";
open( OUTF, ">>$outfile" );
Print the command line args
my $cmdlinearg = 0;
print OUTF "---- Command Line Args ----\n";
while( $cmdlinearg = shift @ARGV ) {
print OUTF $cmdlinearg, "\n";
}
Remember that any data returned via the "print" command to bigd is interpreted as a successful monitor probe:
Arbitrarily tell bigd that the node is up.
print "up\n";
exit(0);