1SMOKEPING_EXAMPLES(5)              SmokePing             SMOKEPING_EXAMPLES(5)
2
3
4

NAME

6       smokeping_examples - Examples of Smokeping configuration
7

OVERVIEW

9       This document provides some examples of Smokeping configuration files.
10       All the examples can be found in the "examples" directory in the
11       Smokeping documentation. Note that the DNS names in the examples are
12       non-functional.
13
14       Details of the syntax and all the variables are found in
15       smokeping_config and in the documentation of the corresponding probe,
16       if applicable.
17
18       This manual is automatically generated from the Smokeping source code,
19       specifically the Smokeping::Examples module.
20

DESCRIPTION

22       Currently the examples differ only in the "Probes" and "Targets"
23       sections. The other sections are taken from the "etc/config.dist"
24       configuration template in the Smokeping distribution so that the
25       example files are complete.
26
27       If you would like to provide more examples, document the other sections
28       or enhance the existing examples, please do so, preferably by sending
29       the proposed changes to the smokeping-users mailing list.
30
31   Example 1: config.simple
32       Probe configuration
33            *** Probes ***
34            +FPing
35            binary = /usr/bin/fping
36
37       Probe explanation
38           Here we have just one probe, fping, pinging four hosts.
39
40           The fping probe is using the default parameters, some of them
41           supplied from the Database section ("step" and "pings"), and some
42           of them by the probe module.
43
44       Target configuration
45            *** Targets ***
46            probe = FPing
47
48            menu = Top
49            title = Network Latency Grapher
50            remark = Welcome to this SmokePing website.
51
52            + mysite1
53            menu = Site 1
54            title = Hosts in Site 1
55
56            ++ myhost1
57            host = myhost1.mysite1.example
58            ++ myhost2
59            host = myhost2.mysite1.example
60
61            + mysite2
62            menu = Site 2
63            title = Hosts in Site 2
64
65            ++ myhost3
66            host = myhost3.mysite2.example
67            ++ myhost4
68            host = myhost4.mysite2.example
69
70       Target explanation
71           The hosts are located in two sites of two hosts each, and the
72           configuration has been divided to site sections ('+') and host
73           subsections ('++') accordingly.
74
75   Example 2: config.multiple-probes
76       Probe configuration
77            *** Probes ***
78            + FPing
79            binary = /usr/bin/fping
80            packetsize = 1000
81
82            + DNS
83            binary = /usr/bin/dig
84            lookup = name.example
85            pings = 5
86            step = 180
87
88            + EchoPingHttp
89            pings = 5
90            url = /test-url
91
92       Probe explanation
93           Here we have three probes: FPing for the regular ICMP pings, DNS
94           for name server latency measurement and EchoPingHttp for web
95           servers.
96
97           The FPing probe runs with the default parameters, except that the
98           ICMP packet size is 1000 bytes instead of the default 56 bytes.
99
100           The DNS and EchoPingHttp probes have been configured to be a bit
101           more gentle with the servers, as they only do 5 queries (pings)
102           instead of the default 20 (or whatever is specified in the Database
103           section). However, DNS queries are made more often: 5 queries every
104           3 minutes instead of every 5 minutes.
105
106       Target configuration
107            *** Targets ***
108            probe = FPing
109            menu = Top
110            title = Network Latency Grapher
111            remark = Welcome to this SmokePing website.
112
113            + network
114            menu = Net latency
115            title = Network latency (ICMP pings)
116
117            ++ myhost1
118            host = myhost1.example
119            ++ myhost2
120            host = myhost2.example
121
122            + services
123            menu = Service latency
124            title = Service latency (DNS, HTTP)
125
126            ++ DNS
127            probe = DNS
128            menu = DNS latency
129            title = Service latency (DNS)
130
131            +++ dns1
132            host = dns1.example
133
134            +++ dns2
135            host = dns2.example
136
137            ++ HTTP
138            menu = HTTP latency
139            title = Service latency (HTTP)
140
141            +++ www1
142            host = www1.example
143
144            +++ www2
145            host = www2.example
146
147       Target explanation
148           The target tree has been divided by the probe used. This does not
149           have to be the case: every target (sub)section can use a different
150           probe, and the same probe can be used in different parts of the
151           config tree.
152
153   Example 3: config.fping-instances
154       Probe configuration
155            *** Probes ***
156            + FPing
157            binary = /usr/bin/fping
158
159            ++ FPingNormal
160            offset = 0%
161
162            ++ FPingLarge
163            packetsize = 5000
164            offset = 50%
165
166       Probe explanation
167           This example demonstrates the concept of probe instances. The
168           FPingLarge and FPingNormal probes are independent of each other,
169           they just use the same module, FPing. FPingNormal uses the default
170           parameters, and so does FPingLarge except for the 5 kilobyte
171           packetsize. Both use the same fping binary, and its path is
172           configured FPing top section.
173
174           The 'offset' parameters make sure the probes don't run at the same
175           time - FPingNormal is run every 'full' 5 minutes (eg. 8:00, 8:05,
176           8:10 and so on, in wallclock time) while FPingLarge is run halfway
177           through these intervals (eg. 8:02:30, 8:07:30 etc.)
178
179           The top FPing section does not define a probe in itself because it
180           has subsections. If we really wanted to have one probe named
181           "FPing", we could do so by making a subsection by that name.
182
183       Target configuration
184            *** Targets ***
185            probe = FPingNormal
186            menu = Top
187            title = Network Latency Grapher
188            remark = Welcome to this SmokePing website.
189
190            + network
191            menu = Net latency
192            title = Network latency (ICMP pings)
193
194            ++ myhost1
195            menu = myhost1
196            title = ICMP latency for myhost1
197
198            +++ normal
199            title = Normal packetsize (56 bytes)
200            probe = FPingNormal
201            host = myhost1.example
202
203            +++ large
204            title = Large packetsize (5000 bytes)
205            probe = FPingLarge
206            host = myhost1.example
207
208            ++ myhost2
209            menu = myhost2
210            title = ICMP latency for myhost2
211
212            +++ normal
213            title = Normal packetsize (56 bytes)
214            probe = FPingNormal
215            host = myhost2.example
216
217            +++ large
218            title = Large packetsize (5000 bytes)
219            probe = FPingLarge
220            host = myhost2.example
221
222       Target explanation
223           The target section shows two host, myhost1.example and
224           myhost2.example, being pinged with two differently sized ICMP
225           packets. This time the tree is divided by the target host rather
226           than the probe.
227
228   Example 4: config.targetvars-with-Curl
229       Probe configuration
230            *** Probes ***
231            + Curl
232            # probe-specific variables
233            binary = /usr/bin/curl
234            step = 60
235
236            # a default for this target-specific variable
237            urlformat = http://%host%/
238
239       Probe explanation
240           This example explains the difference between probe- and target-
241           specific variables. We use the Curl probe for this.
242
243           Every probe supports at least some probe-specific variables. The
244           values of these variables are common to all the targets of the
245           probe, and they can only be configured in the Probes section. In
246           this case, the probe-specific variables are "binary" and "step".
247
248           Target-specific variables are supported by most probes, the most
249           notable exception being the FPing probe and its derivatives.
250           Target-specific variables can have different values for different
251           targets. They can be configured in both Probes and Targets
252           sections. The values assigned in the Probes section function become
253           default values that can be overridden in the Targets section.
254
255           The documentation of each probe states which of its variables are
256           probe-specific and which are target-specific.
257
258           In this case the "urlformat" variable is a target-specific one.  It
259           is also quite uncommon, because it can contain a placeholder for
260           the "host" variable in the Targets section. This is not a general
261           feature, its usage is only limited to the "urlformat" variable and
262           the "%host%" escape.
263
264           (The reason why the FPing probe does not support target-specific
265           variables is simply the fact that the fping program measures all
266           its targets in one go, so they all have the same parameters. The
267           other probes ping their targets one at a time.)
268
269       Target configuration
270            *** Targets ***
271            probe = Curl
272            menu = Top
273            title = Network Latency Grapher
274            remark = Welcome to this SmokePing website.
275
276            + HTTP
277            menu = http
278            title = HTTP latency
279
280            ++ myhost1
281            menu = myhost1
282            title = HTTP latency for myhost1
283            host = myhost1.example
284
285            ++ myhost2
286            menu = myhost2
287            title = HTTP latency for myhost2
288            host = myhost2.example
289
290            ++ myhost3
291            menu = myhost3
292            title = HTTP latency for myhost3 (port 8080!)
293            host = myhost3.example
294            urlformat = http://%host%:8080/
295
296            + FTP
297            menu = ftp
298            title = FTP latency
299            urlformat = ftp://%host%/
300
301            ++ myhost1
302            menu = myhost1
303            title = FTP latency for myhost1
304            host = myhost1.example
305
306            ++ myhost2
307            menu = myhost2
308            title = FTP latency for myhost2
309            host = myhost2.example
310
311       Target explanation
312           The target tree is divided into an HTTP branch and an FTP one.  The
313           servers "myhost1.example" and "myhost2.example" are probed in both.
314           The third server, "myhost3.example", only has an HTTP server, and
315           it's in a non-standard port (8080).
316
317           The "urlformat" variable is specified for the whole FTP branch as
318           "ftp://%host%/". For the HTTP branch, the default from the Probes
319           section is used, except for myhost3, which overrides it to tag the
320           port number into the URL.
321
322           The myhost3 assignment could just as well have included the
323           hostname verbatim (ie. urlformat = http://myhost3.example:8080/)
324           instead of using the %host% placeholder, but the host variable
325           would still have been required (even though it wouldn't have been
326           used for anything).
327
328   Example 5: config.echoping
329       Probe configuration
330            *** Probes ***
331            + FPing
332            binary = /usr/bin/fping
333
334            # these expect to find echoping in /usr/bin
335            # if not, you'll have to specify the location separately for each probe
336            # + EchoPing         # uses TCP or UDP echo (port 7)
337            # + EchoPingDiscard  # uses TCP or UDP discard (port 9)
338            # + EchoPingChargen  # uses TCP chargen (port 19)
339            + EchoPingSmtp       # SMTP (25/tcp) for mail servers
340            + EchoPingHttps      # HTTPS (443/tcp) for web servers
341            + EchoPingHttp       # HTTP (80/tcp) for web servers and caches
342            + EchoPingIcp        # ICP (3130/udp) for caches
343            # these need at least echoping 6 with the corresponding plugins
344            + EchoPingDNS        # DNS (53/udp or tcp) servers
345            + EchoPingLDAP       # LDAP (389/tcp) servers
346            + EchoPingWhois      # Whois (43/tcp) servers
347
348       Probe explanation
349           This example shows most of the echoping-derived probes in action.
350
351       Target configuration
352            *** Targets ***
353            # default probe
354            probe = FPing
355
356            menu = Top
357            title = Network Latency Grapher
358            remark = Welcome to this SmokePing website.
359
360            + MyServers
361
362            menu = My Servers
363            title = My Servers
364
365            ++ www-server
366            menu = www-server
367            title = Web Server (www-server) / ICMP
368            # probe = FPing propagated from top
369            host = www-server.example
370
371            +++ http
372            menu = http
373            title = Web Server (www-server) / HTTP
374            probe = EchoPingHttp
375            host = www-server.example
376            # default url is /
377
378            +++ https
379            menu = https
380            title = Web Server (www-server) / HTTPS
381            probe = EchoPingHttps
382            host = www-server.example
383
384            ++ cache
385            menu = www-cache
386            title = Web Cache (www-cache) / ICMP
387            host = www-cache.example
388
389            +++ http
390            menu = http
391            title = www-cache / HTTP
392            probe = EchoPingHttp
393            host = www-cache.example
394            port = 8080 # use the squid port
395            url = http://www.somehost.example/
396
397            +++ icp
398            menu = icp
399            title = www-cache / ICP
400            probe = EchoPingIcp
401            host = www-cache.example
402            url = http://www.somehost.example/
403
404            ++ mail
405            menu = mail-server
406            title = Mail Server (mail-server) / ICMP
407            host = mail-server.example
408
409            +++ smtp
410            menu = mail-server / SMTP
411            title = Mail Server (mail-server) / SMTP
412            probe = EchoPingSmtp
413            host = mail-server.example
414
415            ++ ldap-server
416            menu = ldap-server
417            title = ldap-server / ICMP
418            host = ldap-server.example
419
420            +++ ldap
421            menu = ldap-server / LDAP
422            title = LDAP Server (ldap-server) / LDAP
423            probe = EchoPingLDAP
424            ldap_request = (objectclass=*)
425            host = ldap-server.example
426
427            ++ name-server
428            menu = name-server
429            title = name-server / ICMP
430            host = name-server.example
431
432            +++ DNS
433            menu = name-server / DNS
434            title = DNS Server (name-server) / DNS
435            probe = EchoPingDNS
436            dns_request = name.example
437            host = name-server.example
438
439            ++ whois-server
440            menu = whois-server
441            title = whois-server / ICMP
442            host = whois-server.example
443
444            +++ Whois
445            menu = whois-server / Whois
446            title = Whois Server (whois-server) / Whois
447            probe = EchoPingWhois
448            whois_request = domain.example
449            host = whois-server.example
450
451       Target explanation
452           All the servers are pinged both with ICMP (the FPing probe) and
453           their respective echoping probe. The proxy server, www-cache, is
454           probed with both HTTP requests and ICP requests for the same URL.
455
456   Example 6: config.template
457       Probe configuration
458            *** Probes ***
459
460            + FPing
461
462            binary = /usr/sbin/fping
463
464            *** Slaves ***
465            secrets=/etc/smokeping/smokeping_secrets
466            +boomer
467            display_name=boomer
468            color=0000ff
469
470            +slave2
471            display_name=another
472            color=00ff00
473
474       Probe explanation
475           This is the template configuration file distributed with Smokeping.
476           It is included in the examples as well for the sake of
477           completeness.
478
479       Target configuration
480            *** Targets ***
481
482            #menuextra = <a target='_blank' href='/smokeping/tr.html{HOST}' class='{CLASS}' \
483            #               onclick="window.open(this.href,this.target, \
484            #               'width=800,height=500,toolbar=no,location=no,status=no,scrollbars=no'); \
485            #                return false;">*</a>
486            #
487            probe = FPing
488
489            menu = Top
490            title = Network Latency Grapher
491            remark = Welcome to the SmokePing website of <b>Insert Company Name Here</b>. \
492                     Here you will learn all about the latency of our network.
493
494            + Ping
495
496            menu = Fedora
497            title = Fedora Pings
498
499            ++ FedoraprojectOrg
500
501            menu = fedoraproject.org
502            title = Fedora Webserver
503            host = fedoraproject.org
504
505            ++ DocsFedoraprojectOrg
506
507            menu = docs.fedoraproject.org
508            title = Fedora Docs Webserver
509            host = docs.fedoraproject.org
510
511            ++ PlanetFedora
512
513            menu = planet.fedoraproject.org
514            title = Planet Fedora
515            host = planet.fedoraproject.org
516
517            #
518            # Lots of more options are available, please have a look in the included documentation.
519            #
520
521
522            #++ James
523
524            #menu = James
525            #title =James
526            #alerts = someloss
527            #slaves = boomer slave2
528            #host = james.address
529
530            #++ MultiHost
531
532            #menu = Multihost
533            #title = James and James as seen from Boomer
534            #host = /Test/James /Test/James~boomer
535
536       Target explanation
537           This is the template configuration file distributed with Smokeping.
538           It is included in the examples as well for the sake of
539           completeness.
540
542       Copyright 2005 by Niko Tyni.
543

LICENSE

545       This program is free software; you can redistribute it and/or modify it
546       under the terms of the GNU General Public License as published by the
547       Free Software Foundation; either version 2 of the License, or (at your
548       option) any later version.
549
550       This program is distributed in the hope that it will be useful, but
551       WITHOUT ANY WARRANTY; without even the implied warranty of
552       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
553       General Public License for more details.
554
555       You should have received a copy of the GNU General Public License along
556       with this program; if not, write to the Free Software Foundation, Inc.,
557       675 Mass Ave, Cambridge, MA 02139, USA.
558

AUTHOR

560       Niko Tyni <ntyni@iki.fi>
561

SEE ALSO

563       The other Smokeping documents, especially smokeping_config.
564
565
566
5672.7.3                             2021-03-11             SMOKEPING_EXAMPLES(5)
Impressum