2021-01-06 07:24:27 -05:00
|
|
|
Monitoring system
|
|
|
|
|
|
|
|
Install package:
|
|
|
|
|
|
|
|
sudo apt-get install rrdtool -y
|
2021-01-06 07:29:29 -05:00
|
|
|
|
|
|
|
Change scripts to execute:
|
2021-01-06 07:24:27 -05:00
|
|
|
|
2021-01-06 07:29:29 -05:00
|
|
|
chmod +x /opt/HBMonv2/sysinfo/cpu.sh
|
|
|
|
chmod +x /opt/HBMonv2/sysinfo/grap.sh
|
|
|
|
chmod +x /opt/HBMonv2/sysinfo/rrd-db.sh
|
|
|
|
|
|
|
|
Run script create database
|
2021-01-06 07:24:27 -05:00
|
|
|
|
2021-01-06 07:29:29 -05:00
|
|
|
/opt/HBMonv2/sysinfo/rrd-db.sh
|
2021-01-06 07:24:27 -05:00
|
|
|
|
2021-01-06 07:29:29 -05:00
|
|
|
Edit file
|
|
|
|
|
2021-01-06 07:24:27 -05:00
|
|
|
/opt/HBMonv2/sysinfo/graph.sh
|
|
|
|
|
|
|
|
Setup temperature depend of your computer
|
|
|
|
On raspberry pi or PC you can use sensors package tp get temperature CPU
|
|
|
|
If not avilable set tempcpu=false
|
|
|
|
|
|
|
|
For VPS set tempcpu=false
|
|
|
|
|
|
|
|
|
|
|
|
Optional display network traffic
|
|
|
|
===============================
|
|
|
|
|
|
|
|
Instal package mrtg and snmp
|
|
|
|
|
|
|
|
sudo apt-get install mrtg snmp -y
|
|
|
|
|
|
|
|
Edit file
|
|
|
|
|
|
|
|
/etc/snmp/snmpd.conf
|
|
|
|
|
|
|
|
and set as below
|
|
|
|
|
|
|
|
|
|
|
|
rocommunity public localhost
|
|
|
|
#rocommunity public default -V systemonly
|
|
|
|
#rocommunity6 public default -V systemonly
|
|
|
|
|
|
|
|
|
|
|
|
Restart snmpd
|
|
|
|
|
|
|
|
systemctl restart snmpd
|
|
|
|
|
|
|
|
|
|
|
|
Create config for mrtg:
|
|
|
|
|
|
|
|
cfgmaker public@localhost > /etc/mrtg.cfg
|
|
|
|
|
|
|
|
Please edit /etc/mrtg.cfg and change diretory to store image
|
|
|
|
|
|
|
|
change WorkDir to:
|
|
|
|
|
|
|
|
WorkDir=/opt/HBMonv2/img/mrtg
|
|
|
|
|
|
|
|
put below lines in section your netrwork card and replace localhost_2 to your name network card as result cfgmaker generate
|
|
|
|
in mrtg.cfg
|
|
|
|
|
|
|
|
|
|
|
|
XSize[localhost_2]: 600
|
|
|
|
Title[localhost_2]: Traffic Analysis
|
|
|
|
Options[localhost_2]: growright, bits
|
|
|
|
Unscaled[localhost_2]: d
|
|
|
|
|
|
|
|
Tune MaxBytes value for exmample 5000 to set vertical scale graph
|
|
|
|
|
2021-01-06 07:29:29 -05:00
|
|
|
Please edit template file where is which graph you are want display /opt/HBMonv2/templates/sysinfo_template.html
|
|
|
|
|
|
|
|
|
|
|
|
|