Use ".cfg" as the configuration file extension
[nsca-ng.git] / man / send_nsca.in
blob11f089343ce02e807f7f2cc00962ef0ea339c497
1 .\" Copyright (c) 2013 Holger Weiss <holger@weiss.in-berlin.de>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions are met:
6 .\"
7 .\" 1. Redistributions of source code must retain the above copyright notice,
8 .\"    this list of conditions and the following disclaimer.
9 .\"
10 .\" 2. Redistributions in binary form must reproduce the above copyright notice,
11 .\"    this list of conditions and the following disclaimer in the documentation
12 .\"    and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 .\" POSSIBILITY OF SUCH DAMAGE.
26 .TH send_nsca 8 "@date@" "Version @version@" "The NSCA\-ng Manual"
28 .SH NAME
30 .B send_nsca
31 \- send monitoring commands to NSCA\-ng server
33 .SH SYNOPSIS
35 .B send_nsca
36 .RB [ \-CSstv ]
37 .RB [ \-c
38 .IR file ]
39 .RB [ \-D
40 .IR delay ]
41 .RB [ \-d
42 .IR delimiter ]
43 .RB [ \-H
44 .IR server ]
45 .RB [ \-o
46 .IR timeout ]
47 .RB [ \-p
48 .IR port ]
50 .PP
51 .B send_nsca
52 .BR \-h " | " \-V
54 .SH DESCRIPTION
56 The
57 .B send_nsca
58 utility transmits one or more check results or monitoring commands to an
59 .BR nsca\-ng (8)
60 server.
61 The communication with the server is
62 .SM TLS
63 encrypted and authenticated using pre-shared keys (as per
64 .SM RFC
65 4279).
66 By default,
67 .B send_nsca
68 reads host or service check results from the standard input.
69 Multiple check results must be separated with an
70 .SM ASCII ETB
71 character (octal value: 27).
72 Service check results are expected to be in the following format:
74 .PP
75 .IR     host [tab] service [tab] status [tab] message [newline]
77 .PP
78 where
79 .I host
80 and
81 .I service
82 are the host name and service description as configured in Nagios,
83 .I status
84 is the numeric return code, and
85 .I message
86 is the output string.
87 Host check results are expected to be in the same format, just without
88 the
89 .I service
90 description:
92 .PP
93 .IR     host [tab] status [tab] message [newline]
95 .PP
96 Note that multiline
97 .IR message s
98 are supported.
100 .SH OPTIONS
103 .B \-C
105 Instead of accepting host or service check results in the format
106 described above, read \(lqraw\(rq monitoring commands for submission to
107 the Nagios command file from the standard input, one command per line.
108 The commands are expected to be in the format described in the Nagios
109 documentation; except that the leading bracketed timestamp may be
110 omitted, in which case the current timestamp is prepended to the
111 provided command by
112 .BR send_nsca .
115 .BI \-c\  file
117 Read the configuration from the specified
118 .I file
119 instead of using the default configuration file
120 .IR @sysconfdir@/send_nsca.cfg .
123 .BI \-D\  delay
125 Wait for a random number of seconds between 0 and the specified
126 .I delay
127 before contacting the server.
128 This might be useful to reduce the server load if many
129 .B send_nsca
130 clients are invoked simultaneously.
131 The default setting is 0, which tells
132 .B send_nsca
133 to connect to the server immediately.
134 If this option is specified, the
135 .B delay
136 setting in the
137 .BR send_nsca.cfg (5)
138 file is ignored.
141 .BI \-d\  delimiter
143 Use the specified
144 .I delimiter
145 (which must be a single
146 .SM ASCII
147 character) to separate the fields when parsing host or service check
148 results.
150 .I delimiter
151 must be a single character.
153 .SM ASCII
154 character other than a backslash, newline,
155 .SM ETB,
157 .SM NUL
158 is allowed.
159 The default
160 .I delimiter
161 is a horizontal tab.
162 This option is ignored if the
163 .B \-C
164 option is specified.
167 .BI \-H\  server
169 Connect and talk to the specified
170 .I server
171 address or host name.
172 By default,
173 .B send_nsca
174 attempts to communicate with \(lqlocalhost\(rq.
175 This option takes precedence over the
176 .B server
177 setting in the
178 .BR send_nsca.cfg (5)
179 file.
182 .B \-h
184 Print usage information to the standard output and exit.
187 .BI \-o\  timeout
189 Close the connection if the server didn't respond for the specified
190 number of seconds.
191 If the
192 .I timeout
193 is set to 0,
194 .B send_nsca
195 won't enforce connection timeouts.
196 The default
197 .I timeout
198 is 15 seconds.
199 This option is provided for compatibility with
200 .SM NSCA
201 2.x.
202 If it's specified, the
203 .B timeout
204 setting in the
205 .BR send_nsca.cfg (5)
206 file is ignored.
209 .BI \-p\  port
211 Connect to the specified service name or
212 .I port
213 number instead of using the default
214 .I port
215 (5668).
216 This option takes precedence over the
217 .B port
218 setting in the
219 .BR send_nsca.cfg (5)
220 file.
223 .B \-S
225 Write all messages to the standard error output.
226 This is the default behaviour.
229 .B \-s
231 Send all messages to the system logger.
232 This option may be combined with the
233 .B \-S
234 option.
237 .B \-t
239 This option is ignored.
240 It is accepted for compatibility with
241 .SM NSCA
242 2.x.
245 .B \-V
247 Print version information to the standard output and exit.
250 .B \-v
252 Generate a message for each check result or monitoring command sent to
254 .BR nsca\-ng (8)
255 server.
256 This option can be specified up to three times in order to increase the
257 verbosity.
259 .SH "EXIT STATUS"
262 .B send_nsca
263 utility exits 0 on success, and >0 if an error occurs.
265 .SH FILES
268 .I @sysconfdir@/send_nsca.cfg
271 .BR send_nsca.cfg (5)
272 configuration file.
274 .SH "SEE ALSO"
276 .BR send_nsca.cfg (5),
277 .BR nsca\-ng (8),
278 .BR nsca\-ng.cfg (5)
281 .I http://www.nagios.org/developerinfo/externalcommands/
283 .SH AUTHOR
285 Holger Weiss <holger@weiss.in-berlin.de>
287 .\" vim:set filetype=nroff textwidth=72: