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

DESCRIPTION

60       (see curl(1) for details of the options below)
61

VARIABLES

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

AUTHORS

212        Gerald Combs <gerald [AT] ethereal.com>
213        Niko Tyni <ntyni@iki.fi>
214

NOTES

216       You should consider setting a lower value for the "pings" variable than
217       the default 20, as repetitive URL fetching may be quite heavy on the
218       server.
219
220       The URL to be tested used to be specified by the variable 'url' in
221       earlier versions of Smokeping, and the 'host' setting did not influence
222       it in any way. The variable name has now been changed to 'urlformat',
223       and it can (and in most cases should) contain a placeholder for the
224       'host' variable.
225

SEE ALSO

227       curl(1), <http://curl.haxx.se/>
228
229
230
2312.7.2                             2019-02-02          Smokeping_probes_Curl(3)
Impressum