Hello, dear.
What aroused my interest in writing this article? What sometimes happens appears to prove that the load on the system has increased and it is necessary to show how much memory was needed a year ago and how much the system is eating now. For such purposes, you need a system like Observium to keep the history of the system loading and, of course, monitoring.
So, let's begin.
')
Observium is a PHP / MySQL network monitoring system, focused primarily on Cisco and Linux networks, but also includes support for a wide range of network equipment and operating systems.
Observium has grown due to the lack of easy-to-use NMSes. It is designed to provide a more native management interface. Designed to quickly collect information about devices and store change history without manual intervention.
Observium is free software.
The test bench will be configured on CentOS 6 and Apache.
RepositoriesTo begin, add the RPM Forge and EPEL repositories to install additional packages:
x86_64rpm --import apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -Uvh packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -Uvh download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
i386rpm --import apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -Uvh packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i386.rpm
rpm -Uvh download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
PackagesInstall the necessary packages for Observium operation:
yum install httpd php php-mysql php-gd php-snmp vixie-cron php-mcrypt \
php-pear net-snmp net-snmp-utils graphviz subversion mysql-server mysql rrdtool \
fping ImageMagick jwhois nmap ipmitool php-pear.noarch MySQL-python
You can try to install the i386 packages here:
yum install httpd.x86_64 php.x86_64 php-mysql.x86_64 php-gd.x86_64 php-snmp.x86_64 vixie-cron.x86_64 php-mcrypt.x86_64 \
net-snmp.x86_64 net-snmp-utils.x86_64 graphviz.x86_64 subversion.x86_64 mysql-server.x86_64 mysql.x86_64 rrdtool.x86_64 \
fping.x86_64 ImageMagick.x86_64 jwhois.x86_64 nmap.x86_64 ipmitool.x86_64 php-pear.noarch MySQL-python.x86_64
If you are going to monitor virtual machines, then you need to install
libvirt :
yum install libvirt
DownloadCreate a directory for Obversium and go to it:
mkdir -p /opt/observium && cd /opt
Check the latest version of the Observium from the SVN repository:
svn co www.observium.org/svn/observer/trunk observium
Go to the directory created for installation:
cd observium
DatabaseNow let's continue to configure mysql, since we have a new system and we need to set the root password:
service mysqld start
/usr/bin/mysqladmin -u root password 'yournrewrootpassword'
Now you need to enter a new password for the Observium base:
mysql -u root -p
mysql> CREATE DATABASE observium;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'
-> IDENTIFIED BY '';
SELinux ( , ):
setenforce 0
/etc/selinux/config SELinux- permissive
SELINUX=permissive
:
cp config.php.default config.php
fping :
$config['fping'] = "/usr/sbin/fping";
Setup the MySQL database and insert the default schema:
php includes/update/update.php
Create the rrd directory to store RRDs in:
rrd RRD :
mkdir rrd
chown apache:apache rrd
Observium, /etc/httpd/conf/httpd.conf :
<VirtualHost *:80>
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
Create a directory for collecting logs from the Apache web server:
mkdir /opt/observium/logs
chown apache:apache /opt/observium/logs
We create the first user for Observium, for this we use the adduser.php script which is in the Observium directory:
cd /opt/observium
./adduser.php komilgulboev papasword13 10
** number 10 means the System Administrator group
Add the first host to monitor:
./add_device.php server1 public v2c
** Unfortunately, Observium cannot add to an IP address and for this you need to write a trace in / etc / hosts.
192.168.1.30 server1
Track. Scripts are needed to review and query data:
./discovery.php -h all
./poller.php -h all
CronFor periodic review and data collection, add a task to Cron-e, create the file /etc/cron.d/observium, and add:
33 * / 6 * * * root /opt/observium/discovery.php -h all >> / dev / null 2> & 1
* / 5 * * * * root /opt/observium/discovery.php -h new >> / dev / null 2> & 1
* / 5 * * * * root /opt/observium/poller-wrapper.py 1 >> / dev / null 2> & 1
Accordingly, for the new changes to take effect, we restart cron:
/etc/init.d/cron reload
We go to the WEB-interface in order to see what we have:
http: // If everything is in order, then add httpd and mysql to the startup:
chkconfig mysqld on
chkconfig httpd on
Link to the site developer platformPS Friends, in view of the fact that I do not write often and that I don’t speak Russian, I don’t especially want to kick for mistakes :) Good luck to you!