Tags
How to add PHP Weatherman with Observium….great Link to follow
http://blog.best-practice.se/2014/07/using-php-weathermap-with-observium.html
11 Thursday Sep 2014
Posted My Work
inTags
How to add PHP Weatherman with Observium….great Link to follow
http://blog.best-practice.se/2014/07/using-php-weathermap-with-observium.html
21 Thursday Nov 2013
Posted Uncategorized
inInstallation
The agent works through xinetd, so make sure this package is installed. There’s an example configuration file for the agent in scripts/observium_agent_xinetd.
1. Install xinet.d
root@netflow:/# apt-get install xinetd
2. Copy sample observium_agent from observium installation location.
root@netflow:/# cp /opt/observium/scripts/observium_agent_xinetd /etc/xinetd.d/observium_agent
Modify it, so the Observium server is allowed to connect (substitute 127.0.0.1 or place your IP after it, separated by a space).
3. Make sure to restart xinetd afterwards so the configuration file is read.
root@netflow:/# /etc/init.d/xinetd restart
4. Put observium_agent file (avilable in observium installation location) into /usr/bin/observium_agent, as matching the xinetd file.
root@netflow:/# cp /opt/observium/scripts/observium_agent /usr/bin/observium_agent
5. Create directory for application agent file.
root@netflow:/# mkdir /usr/lib/observium_agent root@netflow:/# mkdir /usr/lib/observium_agent/local
6. Put the agent scripts you want to run in the local directly.
root@netflow:/# cp /opt/observium/scripts/agent-local/apache /usr/lib/observium_agent/local/
Don’t forget to enable the unix-agent module (on your device’s settings tab, modules section) or globally for all *nix devices (in the configuration file, poller modules).
Testing
To verify the agent is running, from your observium server, try telnetting to the monitored host on port 36602.
root@netflow:/# telnet localhost 36602
To verify a specific script is working, you can run it from the command line on the monitored host. Make sure the script is executable (+x), otherwise the agent won’t run it.
Configure Application/Apache
1. First you need mod_status enabled.
root@netflow:/# a2enmod status
2. Enable server-status for apache.
root@netflow:/# vi /etc/apache2/mods-enabled/status.conf
ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 [observium server ip] </Location>
3. Also enable server-status from your virtual host
root@netflow:/# vi /etc/apache2/sites-enabled/000-default ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 [observium server ip] </Location>
Troubleshoot:
1. Please check the snmp is working properly from your observium server.
root@netflow:/# snmpstatus -c ‘SNMPCommunity’ -v2c MonitoringServerIP
2. Allow All from observium server in /etc/hosts.allow if your are doing tcpwrapper. Do the same for IPTABLES/IPCHAINS also.
[Source: http://www.observium.org/wiki/UNIX_Agent]
18 Monday Nov 2013
Posted My Work
in# yum install httpd php php-mysql php-gd php-snmp vixie-cron php-mcryp php-pear net-snmp net-snmp-utils graphviz subversion mysql-server mysql rrdtool fping ImageMagick jwhois nmap ipmitool php-pear.noarch MySQL-python
# 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
# pear install Net_IPv6 # pear install Net_IPv4
# mkdir /opt/observium # cd /opt # wget http://www.observium.org/observium-community-latest.tar.gz # tar zxvf observium-community-latest.tar.gz
# cd observium
# service mysqld start # /usr/bin/mysqladmin -u root password ‘yournrewrootpassword’
mysql -u root -p <mysql root password> mysql> CREATE DATABASE observium; mysql> GRANT ALL PRIVILEGES ON observium.* TO ‘observium’@’localhost’ IDENTIFIED BY ‘<observium db password>’; exit;
# setenforce 0
# vi /etc/selinux/config SELINUX=permissive
# cp config.php.default config.php
// Database config $config[‘db_host’] = “localhost”; $config[‘db_user’] = “observium”; $config[‘db_pass’] = “<observium db password>”; $config[‘db_name’] = “observium”;
# php includes/update/update.php
# mkdir rrd # chown apache:apache rrd
# vi /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 </Directory> </VirtualHost>
# mkdir /opt/observium/logs # chown apache:apache /opt/observium/logs # /etc/init.d/httpd restart
# cd /opt/observium # ./adduser.php <username> <password> <level>
# vi /etc/hosts 192.168.1.1 server0X.bdnog.org [replace x with group no]# ./add_device.php <hostname> <community> v2c
# ./discovery.php -h all ./poller.php -h all
3 */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.php -h all » /dev/null 2>&1
# /etc/init.d/cron reload
# chkconfig mysqld on # chkconfig httpd on
# whereis fping # ln -s /usr/sbin/fping /usr/bin/fping
; Enable mcrypt extension module extension=module.so
to
; Enable mcrypt extension module extension=mcrypt.so