send_nsca - Send reports to NSCA just like send_nsca in NSCA 2.7.2
This documentation refers to version 0.009002
This utility is made to mimic the functionality and usage of the send_nsca program distributed with NSCA 2.7.2, but use the Net::NSCA::Client Perl library.
./send_nsca [-H host_name] [-p port] [-to timeout] [-d delim] [-c config_file] Options: -H The host name of the NSCA server (default to localhost) -p The port number of the NSCA server (defaults to 5667) -to The timeout when talking to the NSCA server in seconds (defaults to 10) -d The input delimiter (defaults to tab) -c The path to the configuration file --help Usage message --version Display version of the program The program then waits for input on STDIN until the first new line character. The input should be in the following format: Nagios Service Host<TAB>Nagios Service Description<TAB>Status Number<TAB>Plugin Output The <TAB> represents the tab character and should be change to which ever dimilimter is specified.
This switch takes the host name of the NSCA server. If not specified, then
localhost is used.
This switch takes the port number of the NSCA server. If not specified, then the default NSCA port 5667 is used.
This switch specifies the timeout when communicating with the NSCA server in seconds. If not specified, the timeout will be 10 seconds.
This switch takes a string that will be used as the input delimiter. If not specified, then will default to a tab. See "Input Delimiter" for details on what this does.
This switch takes the path to a configuration file. See "Configuration File" for details on the content of the file.
This switch will cause the help message to be shown.
This switch will cause the version to be displayed.
This program can be configured through the specification of a configuration file using the "-c" switch. The configuration file is a plain text file, in which lines starting with an octothorpe (
#) are comments and ignored and otherwise contain name-value pairs in the following format:
There should be no spaces around the equal sign (
=) unless you specifically want the spaces to be included in the variable name or value. The value will also exclude no white space, and so all characters up to the new line at the end will be included in the value.
The following names are required in the file:
The value should be the password as set in the NSCA server.
The value should be the encryption type as set in the NSCA server. The value must be a number as specified in the NSCA configuration format. The following numbers are valid for this program:
This specifies no encryption.
This specified XOR encryption.
The input delimiter is what separates the different values coming in on the program input (
STDIN). The default is the tab character, unless changed by the use of the "-d" switch.
The following exit codes are produced by this application:
This code indicates no errors were encountered and the packet was sent to the NSCA server. The NSCA protocol does not provide receipt confirmation, so it is not guaranteed that the server got the packet.
This code indicates that a required Perl module was not found on the system. Please refer to the STDERR stream for details of the message.
This code indicates that an error occurred in the processing of the request. Please refer to the STDERR stream for details of the message.
Douglas Christopher Wilson,
<doug at somethingdoug.com>
Please report any bugs or feature requests to
bug-net-nsca-client at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-NSCA-Client. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
I highly encourage the submission of bugs and enhancements to my modules.
Copyright 2009 Douglas Christopher Wilson.
This program is free software; you can redistribute it and/or modify it under the terms of either: