HBMonv2/sysinfo/Readme.txt

140 lines
3.5 KiB
Plaintext
Raw Normal View History

2021-01-06 07:24:27 -05:00
Monitoring system
2021-05-25 01:06:42 -04:00
==================
You can use and install ezSM tool to monitor your server instead described below method.
The ezSM you can download from: https://www.ezservermonitor.com/
2021-06-03 14:12:12 -04:00
cd /var/www/html
git clone https://github.com/shevabam/ezservermonitor-web.git
mv ezservermonitor-web esm
cd esm/conf/
Edit file esm.config.json and read domunetation about configuration: https://www.ezservermonitor.com/esm-web/documentation
2021-06-03 14:14:58 -04:00
Edit file /var/www/html/buttons.html and change link from
<a href="sysinfo.php"><button class="button link">&nbsp;System Info&nbsp;</button></a>
to:
2021-06-03 14:16:40 -04:00
<a target=_blank href="esm/"><button class="button link">&nbsp;System Info&nbsp;</button></a>
2021-06-03 14:12:12 -04:00
2021-05-26 01:08:17 -04:00
You can put in esm.config.json monitor services like HBMonitor, HBlink like:
"services": {
"show_port": false,
"list": [
{
"name": "Web Server",
"host": "localhost",
"port": 80,
"protocol": "tcp"
},
{
"name": "HBMonitor",
"host": "localhost",
"port": 9000,
"protocol": "tcp"
},
{
"name": "HBLink",
"host": "localhost",
"port": 4321,
"protocol": "tcp"
}
2021-05-25 01:06:42 -04:00
2021-06-03 14:12:12 -04:00
====================================================
Alternative SYSInfo based on rrdtools and scripts
====================================================
2021-05-25 01:06:42 -04:00
Below is a description of how to monitor the system using rrdtools and scripts :
2021-01-06 07:24:27 -05:00
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-02-22 07:21:27 -05:00
cd /opt/HBMonv2/sysinfo
./rrd-db.sh
2021-01-06 07:24:27 -05:00
2021-05-18 11:22:40 -04:00
Edit file
/opt/HBMonv2/sysinfo/cpu.sh
Setup in WEB_PATH path to your web server html directory
for example /var/www/html or /var/www/html/hbmon
where is located your html files of HBMon
2021-01-06 07:29:29 -05:00
Edit file
2021-01-06 07:24:27 -05:00
/opt/HBMonv2/sysinfo/graph.sh
2021-05-18 11:22:40 -04:00
Setup in WEB_PATH path to your web server html directory
for example /var/www/html or /var/www/html/hbmon
where is located your html files of HBMon
2021-01-06 07:24:27 -05:00
Setup temperature depend of your computer
2021-02-21 09:57:23 -05:00
On raspberry pi or PC you can use sensors package to get temperature CPU
2021-01-06 07:24:27 -05:00
2021-02-21 09:57:23 -05:00
If not avilable set:
tempcpu=false
For VPS set:
tempcpu=false
2021-01-06 07:24:27 -05:00
Optional display network traffic
===============================
2021-02-21 02:15:53 -05:00
Instal package mrtg and snmp
2021-01-06 07:24:27 -05:00
2021-02-21 02:15:53 -05:00
sudo apt-get install mrtg snmp snmpd -y
2021-01-06 07:24:27 -05:00
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:
2021-02-22 07:18:36 -05:00
cfgmaker -zero-speed=10000 public@localhost > /etc/mrtg.cfg
2021-01-06 07:24:27 -05:00
2021-05-18 11:22:40 -04:00
Please edit /etc/mrtg.cfg and change diretory to store image change WorkDir with
path to your webserver html directory where is html files for HBMon:
WorkDir:/var/www/html/hbmon/img/mrtg
2021-01-06 07:24:27 -05:00
2021-05-18 11:22:40 -04:00
Put below lines in section your netrwork card
2021-02-21 02:23:33 -05:00
and replace localhost_2 to your name network card as result cfgmaker generate in mrtg.cfg
2021-01-06 07:24:27 -05:00
XSize[localhost_2]: 600
Options[localhost_2]: growright, bits
Unscaled[localhost_2]: d
2021-02-21 02:54:19 -05:00
Tune MaxBytes value for exmample 50000 to set vertical scale graph
2021-01-06 07:24:27 -05:00
2021-06-03 14:12:12 -04:00
Please edit template file where is which graph you are want display /var/www/html/sysinfo.php
and check / verify name of img from mrtg: <img alt="" src="img/mrtg/localhost_2-day.png" />
2021-01-06 07:29:29 -05:00