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        agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
23        expect = Status: green
24        extraargs = -6 --head --user user:password
25        extrare = / /
26        follow_redirects = yes
27        include_redirects = yes
28        insecure_ssl = 1
29        interface = eth0
30        pings = 5
31        require_zero_status = yes
32        ssl2 = 1
33        timeout = 20
34        urlformat = http://%host%/ # mandatory
35
36        # [...]
37
38        *** Targets ***
39
40        probe = Curl # if this should be the default probe
41
42        # [...]
43
44        + mytarget
45        # probe = Curl # if the default probe is something else
46        host = my.host
47        agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
48        expect = Status: green
49        extraargs = -6 --head --user user:password
50        extrare = / /
51        follow_redirects = yes
52        include_redirects = yes
53        insecure_ssl = 1
54        interface = eth0
55        pings = 5
56        require_zero_status = yes
57        ssl2 = 1
58        timeout = 20
59        urlformat = http://%host%/ # mandatory
60

DESCRIPTION

62       (see curl(1) for details of the options below)
63

VARIABLES

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

AUTHORS

223        Gerald Combs <gerald [AT] ethereal.com>
224        Niko Tyni <ntyni@iki.fi>
225

NOTES

227       You should consider setting a lower value for the "pings" variable than
228       the default 20, as repetitive URL fetching may be quite heavy on the
229       server.
230
231       The URL to be tested used to be specified by the variable 'url' in
232       earlier versions of Smokeping, and the 'host' setting did not influence
233       it in any way. The variable name has now been changed to 'urlformat',
234       and it can (and in most cases should) contain a placeholder for the
235       'host' variable.
236

SEE ALSO

238       curl(1), <http://curl.haxx.se/>
239
240
241
2422.7.3                             2021-07-23          Smokeping_probes_Curl(3)
Impressum