.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SMOKEPING_EXAMPLES 5" .TH SMOKEPING_EXAMPLES 5 "2022-05-08" "2.8.2" "SmokePing" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" smokeping_examples \- Examples of Smokeping configuration .SH "OVERVIEW" .IX Header "OVERVIEW" This document provides some examples of Smokeping configuration files. All the examples can be found in the \f(CW\*(C`examples\*(C'\fR directory in the Smokeping documentation. Note that the \s-1DNS\s0 names in the examples are non-functional. .PP Details of the syntax and all the variables are found in smokeping_config and in the documentation of the corresponding probe, if applicable. .PP This manual is automatically generated from the Smokeping source code, specifically the Smokeping::Examples module. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Currently the examples differ only in the \f(CW\*(C`Probes\*(C'\fR and \f(CW\*(C`Targets\*(C'\fR sections. The other sections are taken from the \f(CW\*(C`etc/config.dist\*(C'\fR configuration template in the Smokeping distribution so that the example files are complete. .PP If you would like to provide more examples, document the other sections or enhance the existing examples, please do so, preferably by sending the proposed changes to the smokeping-users mailing list. .SS "Example 1: config.simple" .IX Subsection "Example 1: config.simple" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 3 \& *** Probes *** \& +FPing \& binary = /usr/bin/fping .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" Here we have just one probe, fping, pinging four hosts. .Sp The fping probe is using the default parameters, some of them supplied from the Database section (\*(L"step\*(R" and \*(L"pings\*(R"), and some of them by the probe module. .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 2 \& *** Targets *** \& probe = FPing \& \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to this SmokePing website. \& \& + mysite1 \& menu = Site 1 \& title = Hosts in Site 1 \& \& ++ myhost1 \& host = myhost1.mysite1.example \& ++ myhost2 \& host = myhost2.mysite1.example \& \& + mysite2 \& menu = Site 2 \& title = Hosts in Site 2 \& \& ++ myhost3 \& host = myhost3.mysite2.example \& ++ myhost4 \& host = myhost4.mysite2.example .Ve .IP "Target explanation" 4 .IX Item "Target explanation" The hosts are located in two sites of two hosts each, and the configuration has been divided to site sections ('+') and host subsections ('++') accordingly. .SS "Example 2: config.multiple\-probes" .IX Subsection "Example 2: config.multiple-probes" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 4 \& *** Probes *** \& + FPing \& binary = /usr/bin/fping \& packetsize = 1000 \& \& + DNS \& binary = /usr/bin/dig \& lookup = name.example \& pings = 5 \& step = 180 \& \& + EchoPingHttp \& pings = 5 \& url = /test\-url .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" Here we have three probes: FPing for the regular \s-1ICMP\s0 pings, \&\s-1DNS\s0 for name server latency measurement and EchoPingHttp for web servers. .Sp The FPing probe runs with the default parameters, except that the \s-1ICMP\s0 packet size is 1000 bytes instead of the default 56 bytes. .Sp The \s-1DNS\s0 and EchoPingHttp probes have been configured to be a bit more gentle with the servers, as they only do 5 queries (pings) instead of the default 20 (or whatever is specified in the Database section). However, \&\s-1DNS\s0 queries are made more often: 5 queries every 3 minutes instead of every 5 minutes. .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 5 \& *** Targets *** \& probe = FPing \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to this SmokePing website. \& \& + network \& menu = Net latency \& title = Network latency (ICMP pings) \& \& ++ myhost1 \& host = myhost1.example \& ++ myhost2 \& host = myhost2.example \& \& + services \& menu = Service latency \& title = Service latency (DNS, HTTP) \& \& ++ DNS \& probe = DNS \& menu = DNS latency \& title = Service latency (DNS) \& \& +++ dns1 \& host = dns1.example \& \& +++ dns2 \& host = dns2.example \& \& ++ HTTP \& menu = HTTP latency \& title = Service latency (HTTP) \& \& +++ www1 \& host = www1.example \& \& +++ www2 \& host = www2.example .Ve .IP "Target explanation" 4 .IX Item "Target explanation" The target tree has been divided by the probe used. This does not have to be the case: every target (sub)section can use a different probe, and the same probe can be used in different parts of the config tree. .SS "Example 3: config.fping\-instances" .IX Subsection "Example 3: config.fping-instances" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 3 \& *** Probes *** \& + FPing \& binary = /usr/bin/fping \& \& ++ FPingNormal \& offset = 0% \& \& ++ FPingLarge \& packetsize = 5000 \& offset = 50% .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" This example demonstrates the concept of probe instances. The FPingLarge and FPingNormal probes are independent of each other, they just use the same module, FPing. FPingNormal uses the default parameters, and so does FPingLarge except for the 5 kilobyte packetsize. Both use the same fping binary, and its path is configured FPing top section. .Sp The 'offset' parameters make sure the probes don't run at the same time \- FPingNormal is run every 'full' 5 minutes (eg. 8:00, 8:05, 8:10 and so on, in wallclock time) while FPingLarge is run halfway through these intervals (eg. 8:02:30, 8:07:30 etc.) .Sp The top FPing section does not define a probe in itself because it has subsections. If we really wanted to have one probe named \*(L"FPing\*(R", we could do so by making a subsection by that name. .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 5 \& *** Targets *** \& probe = FPingNormal \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to this SmokePing website. \& \& + network \& menu = Net latency \& title = Network latency (ICMP pings) \& \& ++ myhost1 \& menu = myhost1 \& title = ICMP latency for myhost1 \& \& +++ normal \& title = Normal packetsize (56 bytes) \& probe = FPingNormal \& host = myhost1.example \& \& +++ large \& title = Large packetsize (5000 bytes) \& probe = FPingLarge \& host = myhost1.example \& \& ++ myhost2 \& menu = myhost2 \& title = ICMP latency for myhost2 \& \& +++ normal \& title = Normal packetsize (56 bytes) \& probe = FPingNormal \& host = myhost2.example \& \& +++ large \& title = Large packetsize (5000 bytes) \& probe = FPingLarge \& host = myhost2.example .Ve .IP "Target explanation" 4 .IX Item "Target explanation" The target section shows two host, myhost1.example and myhost2.example, being pinged with two differently sized \s-1ICMP\s0 packets. This time the tree is divided by the target host rather than the probe. .SS "Example 4: config.targetvars\-with\-Curl" .IX Subsection "Example 4: config.targetvars-with-Curl" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 5 \& *** Probes *** \& + Curl \& # probe\-specific variables \& binary = /usr/bin/curl \& step = 60 \& \& # a default for this target\-specific variable \& urlformat = http://%host%/ .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" This example explains the difference between probe\- and target-specific variables. We use the Curl probe for this. .Sp Every probe supports at least some probe-specific variables. The values of these variables are common to all the targets of the probe, and they can only be configured in the Probes section. In this case, the probe-specific variables are \*(L"binary\*(R" and \*(L"step\*(R". .Sp Target-specific variables are supported by most probes, the most notable exception being the FPing probe and its derivatives. Target-specific variables can have different values for different targets. They can be configured in both Probes and Targets sections. The values assigned in the Probes section function become default values that can be overridden in the Targets section. .Sp The documentation of each probe states which of its variables are probe-specific and which are target-specific. .Sp In this case the \*(L"urlformat\*(R" variable is a target-specific one. It is also quite uncommon, because it can contain a placeholder for the \*(L"host\*(R" variable in the Targets section. This is not a general feature, its usage is only limited to the \*(L"urlformat\*(R" variable and the \*(L"%host%\*(R" escape. .Sp (The reason why the FPing probe does not support target-specific variables is simply the fact that the fping program measures all its targets in one go, so they all have the same parameters. The other probes ping their targets one at a time.) .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 5 \& *** Targets *** \& probe = Curl \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to this SmokePing website. \& \& + HTTP \& menu = http \& title = HTTP latency \& \& ++ myhost1 \& menu = myhost1 \& title = HTTP latency for myhost1 \& host = myhost1.example \& \& ++ myhost2 \& menu = myhost2 \& title = HTTP latency for myhost2 \& host = myhost2.example \& \& ++ myhost3 \& menu = myhost3 \& title = HTTP latency for myhost3 (port 8080!) \& host = myhost3.example \& urlformat = http://%host%:8080/ \& \& + FTP \& menu = ftp \& title = FTP latency \& urlformat = ftp://%host%/ \& \& ++ myhost1 \& menu = myhost1 \& title = FTP latency for myhost1 \& host = myhost1.example \& \& ++ myhost2 \& menu = myhost2 \& title = FTP latency for myhost2 \& host = myhost2.example .Ve .IP "Target explanation" 4 .IX Item "Target explanation" The target tree is divided into an \s-1HTTP\s0 branch and an \s-1FTP\s0 one. The servers \*(L"myhost1.example\*(R" and \*(L"myhost2.example\*(R" are probed in both. The third server, \*(L"myhost3.example\*(R", only has an \s-1HTTP\s0 server, and it's in a non-standard port (8080). .Sp The \*(L"urlformat\*(R" variable is specified for the whole \s-1FTP\s0 branch as \*(L"ftp://%host%/\*(R". For the \s-1HTTP\s0 branch, the default from the Probes section is used, except for myhost3, which overrides it to tag the port number into the \s-1URL.\s0 .Sp The myhost3 assignment could just as well have included the hostname verbatim (ie. urlformat = http://myhost3.example:8080/) instead of using the \f(CW%host\fR% placeholder, but the host variable would still have been required (even though it wouldn't have been used for anything). .SS "Example 5: config.echoping" .IX Subsection "Example 5: config.echoping" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 3 \& *** Probes *** \& + FPing \& binary = /usr/bin/fping \& \& # these expect to find echoping in /usr/bin \& # if not, you\*(Aqll have to specify the location separately for each probe \& # + EchoPing # uses TCP or UDP echo (port 7) \& # + EchoPingDiscard # uses TCP or UDP discard (port 9) \& # + EchoPingChargen # uses TCP chargen (port 19) \& + EchoPingSmtp # SMTP (25/tcp) for mail servers \& + EchoPingHttps # HTTPS (443/tcp) for web servers \& + EchoPingHttp # HTTP (80/tcp) for web servers and caches \& + EchoPingIcp # ICP (3130/udp) for caches \& # these need at least echoping 6 with the corresponding plugins \& + EchoPingDNS # DNS (53/udp or tcp) servers \& + EchoPingLDAP # LDAP (389/tcp) servers \& + EchoPingWhois # Whois (43/tcp) servers .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" This example shows most of the echoping-derived probes in action. .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 3 \& *** Targets *** \& # default probe \& probe = FPing \& \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to this SmokePing website. \& \& + MyServers \& \& menu = My Servers \& title = My Servers \& \& ++ www\-server \& menu = www\-server \& title = Web Server (www\-server) / ICMP \& # probe = FPing propagated from top \& host = www\-server.example \& \& +++ http \& menu = http \& title = Web Server (www\-server) / HTTP \& probe = EchoPingHttp \& host = www\-server.example \& # default url is / \& \& +++ https \& menu = https \& title = Web Server (www\-server) / HTTPS \& probe = EchoPingHttps \& host = www\-server.example \& \& ++ cache \& menu = www\-cache \& title = Web Cache (www\-cache) / ICMP \& host = www\-cache.example \& \& +++ http \& menu = http \& title = www\-cache / HTTP \& probe = EchoPingHttp \& host = www\-cache.example \& port = 8080 # use the squid port \& url = http://www.somehost.example/ \& \& +++ icp \& menu = icp \& title = www\-cache / ICP \& probe = EchoPingIcp \& host = www\-cache.example \& url = http://www.somehost.example/ \& \& ++ mail \& menu = mail\-server \& title = Mail Server (mail\-server) / ICMP \& host = mail\-server.example \& \& +++ smtp \& menu = mail\-server / SMTP \& title = Mail Server (mail\-server) / SMTP \& probe = EchoPingSmtp \& host = mail\-server.example \& \& ++ ldap\-server \& menu = ldap\-server \& title = ldap\-server / ICMP \& host = ldap\-server.example \& \& +++ ldap \& menu = ldap\-server / LDAP \& title = LDAP Server (ldap\-server) / LDAP \& probe = EchoPingLDAP \& ldap_request = (objectclass=*) \& host = ldap\-server.example \& \& ++ name\-server \& menu = name\-server \& title = name\-server / ICMP \& host = name\-server.example \& \& +++ DNS \& menu = name\-server / DNS \& title = DNS Server (name\-server) / DNS \& probe = EchoPingDNS \& dns_request = name.example \& host = name\-server.example \& \& ++ whois\-server \& menu = whois\-server \& title = whois\-server / ICMP \& host = whois\-server.example \& \& +++ Whois \& menu = whois\-server / Whois \& title = Whois Server (whois\-server) / Whois \& probe = EchoPingWhois \& whois_request = domain.example \& host = whois\-server.example .Ve .IP "Target explanation" 4 .IX Item "Target explanation" All the servers are pinged both with \s-1ICMP\s0 (the FPing probe) and their respective echoping probe. The proxy server, www-cache, is probed with both \s-1HTTP\s0 requests and \s-1ICP\s0 requests for the same \&\s-1URL.\s0 .SS "Example 6: config.template" .IX Subsection "Example 6: config.template" .IP "Probe configuration" 4 .IX Item "Probe configuration" .Vb 1 \& *** Probes *** \& \& + FPing \& \& binary = /usr/sbin/fping \& \& *** Slaves *** \& secrets=/usr/etc/smokeping_secrets.dist \& +boomer \& display_name=boomer \& color=0000ff \& \& +slave2 \& display_name=another \& color=00ff00 .Ve .IP "Probe explanation" 4 .IX Item "Probe explanation" This is the template configuration file distributed with Smokeping. It is included in the examples as well for the sake of completeness. .IP "Target configuration" 4 .IX Item "Target configuration" .Vb 1 \& *** Targets *** \& \& probe = FPing \& \& menu = Top \& title = Network Latency Grapher \& remark = Welcome to the SmokePing website of xxx Company. \e \& Here you will learn all about the latency of our network. \& \& + Test \& menu= Targets \& #parents = owner:/Test/James location:/ \& \& ++ James \& \& menu = James \& title =James \& alerts = someloss \& slaves = boomer slave2 \& host = james.address \& \& ++ MultiHost \& \& menu = Multihost \& title = James and James as seen from Boomer \& host = /Test/James /Test/James~boomer .Ve .IP "Target explanation" 4 .IX Item "Target explanation" This is the template configuration file distributed with Smokeping. It is included in the examples as well for the sake of completeness. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2005 by Niko Tyni. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, \s-1MA 02139, USA.\s0 .SH "AUTHOR" .IX Header "AUTHOR" Niko Tyni .SH "SEE ALSO" .IX Header "SEE ALSO" The other Smokeping documents, especially smokeping_config.