NAME

send_nsca - Send reports to NSCA just like send_nsca in NSCA 2.7.2

VERSION

This documentation refers to version 0.009002

DESCRIPTION

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.

USAGE

./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.

OPTIONS

-H

This switch takes the host name of the NSCA server. If not specified, then localhost is used.

-p

This switch takes the port number of the NSCA server. If not specified, then the default NSCA port 5667 is used.

-to

This switch specifies the timeout when communicating with the NSCA server in seconds. If not specified, the timeout will be 10 seconds.

-d

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.

-c

This switch takes the path to a configuration file. See "Configuration File" for details on the content of the file.

--help

This switch will cause the help message to be shown.

--version

This switch will cause the version to be displayed.

CONFIGURATION

Configuration File

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:

name=value

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:

password

The value should be the password as set in the NSCA server.

encryption_type

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:

0

This specifies no encryption.

1

This specified XOR encryption.

Input Delimiter

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.

EXIT STATUS

The following exit codes are produced by this application:

0

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.

2

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.

3

This code indicates that an error occurred in the processing of the request. Please refer to the STDERR stream for details of the message.

DEPENDENCIES

AUTHOR

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS

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.

LICENSE AND COPYRIGHT

Copyright 2009 Douglas Christopher Wilson.

This program is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or

  • the Artistic License version 2.0.