Observium Install on CentOS 7.x
From KlavoWiki
Epel and RPMforge Install
rpm -Uhv http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Package Installs
yum -y install wget httpd php php-mysql php-gd php-posix php-pear.noarch cronie net-snmp net-snmp-utils mariadb-server mariadb MySQL-python rrdtool subversion ipmitool graphviz ImageMagick php-mcrypt jwhois fping
systemctl enable mariadb systemctl enable httpd systemctl start mariadb systemctl start httpd
Observium Install
cd /opt wget http://www.observium.org/observium-community-latest.tar.gz tar zxvf observium-community-latest.tar.gz rm -f observium-community-latest.tar.gz
Create SQL Database
The below is using a username of myobservium and a password of somerandompassword
mysql CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; use observium; GRANT ALL PRIVILEGES ON observium.* TO 'myobservium'@'localhost' IDENTIFIED BY 'somerandompassword'; flush privileges; exit
Config File
cd /opt/observium cp config.php.default config.php
vi config.php
Modify Entries
// Database config --- This MUST be configured $config['db_host'] = 'localhost'; $config['db_user'] = 'myobservium'; $config['db_pass'] = 'somerandompassword'; $config['db_name'] = 'observium';
Add entry
$config['fping'] = "/usr/sbin/fping";
Create Config Folders
mkdir logs mkdir rrd chown apache:apache logs chown apache:apache rrd
Populate SQL Database
php /opt/observium/includes/update/update.php
Create Apache WEB Site
vi /etc/httpd/conf/httpd.conf
Add the following to the end of the file
<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 Require all granted </Directory> </VirtualHost>
Create Admin User
./adduser.php <username> <password> 10
Add Device
This command is for the CLI but can be done from the WEB interface
./add_device.php <hostname> <community> v2c
Cron Job
crontab -e
Add the following Lines
*/30 * * * * /opt/observium/discovery.php -h all >> /dev/null 2>&1 */5 * * * * /opt/observium/poller-wrapper.py 5 >> /dev/null 2>&1