1Smokeping_probes_Curl(3)           SmokePing          Smokeping_probes_Curl(3)
2
3
4

NAME

6       Smokeping::probes::Curl - a curl(1) probe for SmokePing
7

OVERVIEW

9       Fetches an HTTP or HTTPS URL using curl(1).
10

SYNOPSIS

12        *** Probes ***
13
14        +Curl
15
16        binary = /usr/bin/curl
17        forks = 5
18        offset = 50%
19        step = 300
20
21        # The following variables can be overridden in each target section
22        /^influx_.+/ = influx_location = In the basement
23        agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
24        expect = Status: green
25        extraargs = -6 --head --user user:password
26        extrare = / /
27        follow_redirects = yes
28        include_redirects = yes
29        insecure_ssl = 1
30        interface = eth0
31        pings = 5
32        require_zero_status = yes
33        ssl2 = 1
34        timeout = 20
35        urlformat = http://%host%/ # mandatory
36
37        # [...]
38
39        *** Targets ***
40
41        probe = Curl # if this should be the default probe
42
43        # [...]
44
45        + mytarget
46        # probe = Curl # if the default probe is something else
47        host = my.host
48        /^influx_.+/ = influx_location = In the basement
49        agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
50        expect = Status: green
51        extraargs = -6 --head --user user:password
52        extrare = / /
53        follow_redirects = yes
54        include_redirects = yes
55        insecure_ssl = 1
56        interface = eth0
57        pings = 5
58        require_zero_status = yes
59        ssl2 = 1
60        timeout = 20
61        urlformat = http://%host%/ # mandatory
62

DESCRIPTION

64       (see curl(1) for details of the options below)
65

VARIABLES

67       Supported probe-specific variables:
68
69       binary
70           The location of your curl binary.
71
72           Default value: /usr/bin/curl
73
74       forks
75           Run this many concurrent processes at maximum
76
77           Example value: 5
78
79           Default value: 5
80
81       offset
82           If you run many probes concurrently you may want to prevent them
83           from hitting your network all at the same time. Using the probe-
84           specific offset parameter you can change the point in time when
85           each probe will be run. Offset is specified in % of total interval,
86           or alternatively as 'random', and the offset from the 'General'
87           section is used if nothing is specified here. Note that this does
88           NOT influence the rrds itself, it is just a matter of when data
89           acquisition is initiated.  (This variable is only applicable if the
90           variable 'concurrentprobes' is set in the 'General' section.)
91
92           Example value: 50%
93
94       step
95           Duration of the base interval that this probe should use, if
96           different from the one specified in the 'Database' section. Note
97           that the step in the RRD files is fixed when they are originally
98           generated, and if you change the step parameter afterwards, you'll
99           have to delete the old RRD files or somehow convert them. (This
100           variable is only applicable if the variable 'concurrentprobes' is
101           set in the 'General' section.)
102
103           Example value: 300
104
105       Supported target-specific variables:
106
107       /^influx_.+/
108           This is a tag that will be sent to influxdb and has no impact on
109           the probe measurement. The tag name will be sent without the
110           "influx_" prefix, which will be replaced with "tag_" instead. Tags
111           can be used for filtering.
112
113           Example value: influx_location = In the basement
114
115       agent
116           The "-A" curl(1) option.  This is a full HTTP User-Agent header
117           including the words "User-Agent:". Note that it does not need any
118           quotes around it.
119
120           Example value: User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14
121           SSL-MM/1.4.1 OpenSSL/0.9.6c
122
123       expect
124           Require the given text to appear somewhere in the response,
125           otherwise probe is treated as a failure
126
127           Example value: Status: green
128
129           Default value:
130
131       extraargs
132           Any extra arguments you might want to hand to curl(1). The
133           arguments should be separated by the regexp specified in "extrare",
134           which contains just the space character (" ") by default.
135
136           Note that curl will be called with the resulting list of arguments
137           without any shell expansion. If you need to specify any arguments
138           containing spaces, you should set "extrare" to something else.
139
140           As a complicated example, to explicitly set the "Host:" header in
141           Curl requests, you need to set "extrare" to something else, eg.
142           "/;/", and then specify "extraargs = --header;Host:
143           www.example.com".
144
145           Example value: -6 --head --user user:password
146
147       extrare
148           The regexp used to split the extraargs string into an argument
149           list, in the "/regexp/" notation.  This contains just the space
150           character (" ") by default, but if you need to specify any
151           arguments containing spaces, you can set this variable to a
152           different value.
153
154           Example value: / /
155
156           Default value: / /
157
158       follow_redirects
159           If this variable is set to 'yes', curl will follow any HTTP
160           redirection steps (the '-L' option).  If set to 'no', HTTP
161           Location: headers will not be followed. See also
162           'include_redirects'.
163
164           Example value: yes
165
166           Default value: no
167
168       include_redirects
169           If this variable is set to 'yes', the measurement result will
170           include the time spent on following any HTTP redirection steps. If
171           set to 'no', only the last step is measured. See also
172           'follow_redirects'.
173
174           Example value: yes
175
176           Default value: no
177
178       insecure_ssl
179           The "-k" curl(1) option. Accept SSL connections that don't have a
180           secure certificate chain to a trusted CA. Note that if you are
181           going to monitor https targets, you'll probably have to either
182           enable this option or specify the CA path to curl through extraargs
183           below. For more info, see the curl(1) manual page.
184
185           Example value: 1
186
187       interface
188           The "--interface" curl(1) option.  Bind to a specific interface, IP
189           address or host name.
190
191           Example value: eth0
192
193       pings
194           How many pings should be sent to each target, if different from the
195           global value specified in the Database section. Note that the
196           number of pings in the RRD files is fixed when they are originally
197           generated, and if you change this parameter afterwards, you'll have
198           to delete the old RRD files or somehow convert them.
199
200           Example value: 5
201
202       require_zero_status
203           If this variable is set to 'yes', responses will only be counted if
204           Curl's exit status is '0'. This is useful for reporting timeouts as
205           losses rather than delayed responses.
206
207           Example value: yes
208
209           Default value: no
210
211       ssl2
212           The "-2" curl(1) option.  Force SSL2.
213
214           Example value: 1
215
216       timeout
217           The "-m" curl(1) option.  Maximum timeout in seconds.
218
219           Example value: 20
220
221           Default value: 10
222
223       urlformat
224           The template of the URL to fetch.  Can be any one that curl
225           supports.  Any occurrence of the string '%host%' will be replaced
226           with the host to be probed.
227
228           Example value: http://%host%/
229
230           This setting is mandatory.
231

AUTHORS

233        Gerald Combs <gerald [AT] ethereal.com>
234        Niko Tyni <ntyni@iki.fi>
235

NOTES

237       You should consider setting a lower value for the "pings" variable than
238       the default 20, as repetitive URL fetching may be quite heavy on the
239       server.
240
241       The URL to be tested used to be specified by the variable 'url' in
242       earlier versions of Smokeping, and the 'host' setting did not influence
243       it in any way. The variable name has now been changed to 'urlformat',
244       and it can (and in most cases should) contain a placeholder for the
245       'host' variable.
246

SEE ALSO

248       curl(1), <http://curl.haxx.se/>
249
250
251
2522.8.2                             2022-07-23          Smokeping_probes_Curl(3)
Impressum