====================== Basic Configuration ======================
# timedatectl set-timezone Asia/Dhaka
# timedatectl
# vi /etc/selinux/config
SELINUX=disabled
😡
# chkconfig firewalld on
#reboot
# hostnamectl set-hostname graph.nmslab.net
# logout
# hostname
# nmtui
# nmcli connection down enp0s3
# nmcli connection up enp0s3
# ifconfig
# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
103.110.59.150 graph.nmslab.net graph
😡
# hostname
# adduser sysadmin
# passwd sysadmin
# dnf -y install openssh-clients openssh-server
or yum install openssh-clients openssh-server
# cd /etc/ssh/
#vi sshd_config
Port 4422
PermitRootLogin no
AllowUsers sysadmin
😡
# firewall-cmd –permanent –add-port=4422/tcp
# firewall-cmd –reload
# systemctl enable sshd
# systemctl status sshd
# systemctl restart sshd
Try to login remotely
#ssh sysadmin@103.110.59.150 –p 4422
========================== SmokePing Configuration ====================
# yum install epel-release
# yum groupinstall “Development tools”
# yum install perl mailx bind-utils httpd httpd-devel mod_fcgid rrdtool perl-CGI-SpeedyCGI fping rrdtool-perl perl-Sys-Syslog perl-HTML-Parser perl-FCGI perl-Net-DNS perl-Socket6 perl-Text-Soundex perl-LDAP perl-CPAN
# cd /opt
# w!get https://oss.oetiker.ch/smokeping/pub/smokeping-2.7.3.tar.gz
# tar -zxvf smokeping-2.7.3.tar.gz
# mkdir /opt/smokeping/
# cd /opt/smokeping-2.7.3/
# ./configure –prefix=/opt/smokeping
# /usr/bin/gmake install
# cd /opt/smokeping/
# mkdir data var cache
# cd /opt/smokeping/etc/
# for foo in *.dist; do mv $foo `basename $foo .dist`; done
# chmod 600 /opt/smokeping/etc/smokeping_secrets
# ln -s /opt/smokeping/cache /opt/smokeping/htdocs/cache
# chown -R apache /opt/smokeping/cache
# chown -R apache /opt/smokeping/data
# vim /etc/httpd/conf.d/smokeping.conf
ScriptAlias /smokeping/smokeping.cgi /opt/smokeping/htdocs/smokeping.fcgi.dist
Alias /smokeping /opt/smokeping/htdocs
<Directory “/opt/smokeping/htdocs”>
Options FollowSymLinks
Require all granted
</Directory>
# vim /opt/smokeping/etc/config
*** General ***
owner = Zafar-Imam
contact = engr.zafar@gmail.com
mailhost = localhost
sendmail = /usr/bin/mail
# 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.
imgcache = /opt/smokeping/cache
imgurl = cache
datadir = /opt/smokeping/data
piddir = /opt/smokeping/var
cgiurl = http://some.url/smokeping.cgi
smokemail = /opt/smokeping/etc/smokemail
tmail = /opt/smokeping/etc/tmail
# 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
*** Alerts ***
to = alertee@address.somewhere
from = smokealert@company.xy
+someloss
type = loss
# in percent
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times in a row
*** Database ***
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
*** Presentation ***
template = /opt/smokeping/etc/basepage.html
+ charts
menu = Charts
title = The most interesting destinations
++ stddev
sorter = StdDev(entries=>4)
title = Top Standard Deviation
menu = Std Deviation
format = Standard Deviation %f
++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip Time
menu = by Max
format = Max Roundtrip Time %f seconds
++ loss
sorter = Loss(entries=>5)
title = Top Packet Loss
menu = Loss
format = Packets Lost %f
++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip Time
menu = by Median
format = Median RTT %f seconds
+ overview
width = 600
height = 50
range = 10h
+ detail
width = 600
height = 200
unison_tolerance = 2
“Last 3 Hours” 3h
“Last 30 Hours” 30h
“Last 10 Days” 10d
“Last 400 Days” 400d
#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location
*** Probes ***
+ FPing
binary = /usr/sbin/fping
+ DNS
binary = /usr/bin/dig
lookup = google.com
pings = 5
step = 180
+ EchoPingHttp
+ EchoPingHttps
pings = 5
#binary = /usr/bin/echoping
# forks = 5
#offset = 50%
#step = 300
#url = /test-url
accept_redirects = yes
*** Slaves ***
secrets=/opt/smokeping/etc/smokeping_secrets
+boomer
display_name=boomer
color=0000ff
+slave2
display_name=another
color=00ff00
*** Targets ***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to NMS-Lab SmokePing website.
+ Internet
menu = Internet Latency
title = Network latency (ICMP pings)
++ Google
host = www.google.com
++ Facebook
host = www.facebook.com
++ Youtube
host = www.youtube.com
++ Yahoo
host = www.yahoo.com
++ Public-DNS
host = 9.9.9.9
++ Public-DNS2
host = 8.8.8.8
+ Multihost
menu = Multihost
title = Internet Latency (Google, Facebook)
host = /Internet/Google /Internet/Facebook
+ network
menu = Net latency
title = Network latency (ICMP pings)
++ CISCO-Rtr01
host = 192.168.1.5
++ Smokeping Server
host = 192.168.199.201
# firewall-cmd –permanent –add-service=http
# firewall-cmd –reload
# vim /lib/systemd/system/smokeping.service
[Unit]
Description=Smokeping Server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=simple
ExecStart=/opt/smokeping/bin/smokeping –nodaemon –config=/opt/smokeping/etc/config –logfile=/var/log/smoke.log
[Install]
WantedBy=multi-user.target
# systemctl start httpd
# systemctl enable httpd
# systemctl status httpd
# systemctl daemon-reload
# systemctl start smokeping
# systemctl enable smokeping
# systemctl status smokeping
Now check from browser:
=======================
http://Server-IP/smokeping/smokeping.cgi
i.e http://192.168.1.142/smokeping/smokeping.cgi