Monitoring Systems
Observium Monitoring System
General information
- Site: https://www.observium.org/ .
- The good thing is that it requires virtually no setup. Works out of the box.
- Observium is available in two versions:
- free Community (released once every 6 months);
- paid Professional ;
- paid Enterprise .
- Observium Community is only suitable for services that are not critical to response time, since devices are polled via SNMP once every 5 minutes.
- The paid version includes an Alarms module.
- Devices are polled using the SNMP protocol.
- Ideal for monitoring switching equipment.
Connecting devices
-
To add a Cisco router, just set the SNMP community:
snmp-server community public RO
-
Adding devices to Observium is carried out either through the web interface menu (Devices->Add device), or from the server command line (from the Observium directory ):
./add_device.php hostname
Operating principles
- Statistics collection is divided into 2 main processes:
discovery
: Performs basic discovery of sensors supported on this device.poller
: Poll devices every 5 minutes.
- In the version for subscribers there are 2 more additional processes that work in conjunction with the process poller:
bill
: calculation of billing information on individual ports for users;alert
: generation of notifications based on parameters collected by the system.
Observium installation
We create directories in which the Observium files will be located:
sudo mkdir -p /opt/observium
Download the Community Edition :
cd /opt
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
Go to the folder with the configuration files and create a configuration file by copying the default file:
cd /optobservium
sudo cp config.php.default config.php
Opening the file config.php
and edit MySQL settings: username
, password
, dbname
.
Connecting to MySQL:
mysql -u root -p
Create a database with the name observium:
CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
We give full privileges to the user observiumto the database of the same name:
GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'IDENTIFIED BY 'PASSWORD';
We execute the configuration script for the previously created MySQL database:
/opt/observium/discovery.php -u
Create additional service directories:
mkdir /opt/observium/logs
mkdir /opt/observium/rrd
Create a file /etc/httpd/conf.d/observium.conf
:
<VirtualHost \*>
DocumentRoot /opt/observium/html/
ServerName observium.domain.com
CustomLog /opt/observium/logs/access_log combined
ErrorLog /opt/observium/logs/error_log
<Directory "/opt/observium/html/">
AllowOverride All
Options FollowSymLinks MultiViews
Require all granted
</Directory>
</VirtualHost>
Create a file /etc/cron.d/observium
:
# Run a complete discovery of all devices once every 6 hours
33 _/6 _ \* \* root /opt/observium/discovery.php -h all >> /dev/null 2>&1
# Run automated discovery of newly added devices every 5 minutes
_/5 _ \* \* \* root /opt/observium/discovery.php -h new >> /dev/null 2>&1
# Run multithreaded poller wrapper every 5 minutes
_/5 _ \* \* \* root /opt/observium/poller-wrapper.py >> /dev/null 2>&1
# Run housekeeping script daily for syslog, eventlog and alert log
13 5 \* \* \* root /opt/observium/housekeeping.php -ysel
# Run housekeeping script daily for rrds, ports, orphaned entries in the database and performance data
47 4 \* \* \* root /opt/observium/housekeeping.php -yrptb
To force device monitoring, you need to run the following commands:
/opt/observium/discovery.php -h all
/opt/observium/poller.php -h all
Observium update
Rename the old installation and download and extract the new one (all under user root
):
cd /opt
mv observium observium_old
wget https://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
mv /opt/observium_old/rrd observium/
mv /opt/observium_old/logs observium/
mv /opt/observium_old/config.php observium/
Correct permissions:
chown -R apache:apache /opt/observium
Update the BD schema:
/opt/observium/discovery.php -u
You can force immediate rediscovery of all devices:
/opt/observium/discovery.php -h all
You can delete the directory observium_old
:
rm -rf observium_old
LibreNMS
https://yamadharma.github.io/ru/post/2023/03/20/librenms-monitoring-system/
Network Bandwidth & Speed Monitoring
https://yamadharma.github.io/ru/post/2023/06/16/bandwidth-network-speed-monitoring/