Smokeping Debian Nginx
Page content
Smokeping in 5min, with Dual Stack on Nginx
All in one Installer
Run it at your own risk …
wget https://blog.stoege.net/scripts/smokeping_debian3.sh
chmod 700 smokeping_debian3.sh
./smokeping_debian3.sh
or Setup by Hand
Install Packages
apt-get install borgbackup curl echoping fcgiwrap fping hping3 htop lynx mlocate mtr nginx rsync smokeping tmate tree tshark unzip vim vnstat wget zip
Configure Nginx
export MYSITENAME="smokeping.planet.world"
wget "https://github.com/vazhnov/smokeping_nginx/raw/master/best.conf"
sed -i -- s/smokeping\.example\.com/${MYSITENAME}/g best.conf
chown root: best.conf
mv best.conf /etc/nginx/sites-available/${MYSITENAME}.conf
ln -s "../sites-available/${MYSITENAME}.conf" "/etc/nginx/sites-enabled/${MYSITENAME}.conf"
nginx -t && systemctl restart nginx
Some Smokeping Fixes
mkdir -p /var/run/smokeping
Tune General
cat << 'EOF' > /etc/smokeping/config.d/General
*** General ***
owner = Franz Musterer
contact = nospam@nomail.ch
mailhost = smtp-relay-host
# NOTE: do not put the Image Cache below cgi-bin
# since all files under cgi-bin will be executed ... this is not
# good for images.
cgiurl = http://somekping.planet/smokeping/smokeping.cgi
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
@include /etc/smokeping/config.d/pathnames
EOF
Tune Databases
cat << 'EOF' > /etc/smokeping/config.d/Database
*** Database ***
step = 60
pings = 59
#step = 300
#pings = 20
# consfn mrhb steps total
AVERAGE 0.5 1 1008
AVERAGE 0.5 12 4320
MIN 0.5 12 4320
MAX 0.5 12 4320
AVERAGE 0.5 144 720
MAX 0.5 144 720
MIN 0.5 144 720
EOF
Tune Probes
cat << 'EOF' > /etc/smokeping/config.d/Probes
*** Probes ***
+ FPing
binary = /usr/bin/fping
+ FPing6
binary = /usr/bin/fping
protocol = 6
+ EchoPingHttp
binary = /usr/bin/echoping
forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
accept_redirects = yes
extraopts =
ignore_cache = yes
ipversion = 4
pings = 5
port = 80
priority = 6
revalidate_data = no
timeout = 20
tos = 0xa0
url = /
waittime = 1
+EchoPingHttps
binary = /usr/bin/echoping
forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
accept_redirects = yes
extraopts =
ignore_cache = yes
ipversion = 4
pings = 5
port = 443
priority = 6
prot = 3443
revalidate_data = no
timeout = 20
tos = 0xa0
url = /
waittime = 1
+EchoPingDNS
binary = /usr/bin/echoping
forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
dns_request = google.com
dns_tcp = no
dns_type = A
extraopts =
ipversion = 4
pings = 5
plugin = /usr/lib/echoping/dns.so
pluginargs = -p
priority = 6
timeout = 1
tos = 0xa0
waittime = 1
EOF
Tune Targets
cat << 'EOF' > /etc/smokeping/config.d/Targets
*** Targets ***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of xxx Company. Here you will learn all about the latency of our network.
+ Local
menu = Local
title = Local Network
++ LocalMachine
menu = Local Machine
title = This host
host = localhost
+ Inet
menu = Internet
title = some Hosts on the Net
probe = FPing
++ google
menu = google
title = google, 8.8.8.8
host = 8.8.8.8
++ switch
host = www.switch.ch
++ uzh
host = www.uzh.ch
++ blick
host = www.blick.ch
+ IPv4
menu = IPv4 Hosts
title = Hosts running IPv4
probe = FPing
++ multi
menu = MultiTarget
title = Multiple Targets
host = /IPv4/host1 \
/IPv4/host2 \
/IPv4/host3
++ host1
host = host1.planet
++ host2
host = host2.planet
++ host3
host = host3.planet
+ IPv6
menu = IPv6 Hosts
title = Hosts running IPv6
probe = FPing6
++ multi
menu = MultiTarget
title = Multiple Targets
host = /IPv6/host1 \
/IPv6/host2 \
/IPv6/host3
++ host1
host = host1.planet
++ host2
host = host2.planet
++ host3
host = host3.planet
+ HTTP
menu = HTTP
title = some HTTP Probes
probe = EchoPingHttp
++ google-com
host = www.google.com
++ uzh
host = www.uzh.ch
EOF
Restart Smokeping
systemctl restart smokeping
Browse
http://smokeping.planet/smokeping
Add Cert for Nginx on Debian
https://github.com/kshcherban/acme-nginx
Browse
https://smokeping.planet/smokeping
Any Comments ?
sha256: 1f4be87c861f1cca9937105f2fc2a760f5e294c53a050347171eeb89854b6b54