• About

http://blog.fakrul.com

http://blog.fakrul.com

Tag Archives: observium

Using PHP Weathermap with Observium

11 Thursday Sep 2014

Posted by Fakrul Alam in My Work

≈ Leave a comment

Tags

observium, PHP Weathermap

How to add PHP Weatherman with Observium….great Link to follow

http://blog.best-practice.se/2014/07/using-php-weathermap-with-observium.html

Application Monitoring : Observium

21 Thursday Nov 2013

Posted by Fakrul Alam in Uncategorized

≈ Leave a comment

Tags

apache, network management, observium

Installation
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]

Observium CentOS Howto

18 Monday Nov 2013

Posted by Fakrul Alam in My Work

≈ Leave a comment

Tags

centos, network management, observium

Introduction
This guide whill show you how to perform an Observium installation on an CentOS/RHEL/Scientific Linux (referred to collectively as Enterprise Linux or EL) box. In this example, we use also a clean installation of EL.
Repositories
For more extended packagelist, we first install the RPM Forge and EPEL repositories:
x86_64
# rpm —import http://apt.sw.be/RPM-GPG-KEY.dag.txt # rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
i386
# rpm —import http://apt.sw.be/RPM-GPG-KEY.dag.txt # rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i386.rpm # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Packages
Now let’s install the needed packages for Observium:
# 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
On x86_64 systems this will tend to try to install i386 packages too unless you’ve explicitly blocked them, so you can try to install the x86_64 packages only:
# 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
Press y to confirm installation.
Install PEAR:
# pear install Net_IPv6 # pear install Net_IPv4
Downloading
# mkdir /opt/observium # cd /opt # wget http://www.observium.org/observium-community-latest.tar.gz # tar zxvf observium-community-latest.tar.gz
Configuration
Change into the new install directory:
# cd observium
Database
Now we are going to install the mysql database. Because we have a clean install, we need to configure a root password to the mysqld:
# service mysqld start # /usr/bin/mysqladmin -u root password ‘yournrewrootpassword’
Now enter mysql to create the new Observium database:
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;
Configuration
Firstly, disable SELinux. You can do this temporarily with the following command:
# setenforce 0
We need to disable SELinux permanently, so you also need to change /etc/selinux/config so that the SELINUX option is set to permissive
# vi /etc/selinux/config SELINUX=permissive
Copy the default configuration file and edit it for your system:
# cp config.php.default config.php
Edit config.php. Change the options to reflect your installation.
// Database config $config[‘db_host’] = “localhost”; $config[‘db_user’] = “observium”; $config[‘db_pass’] = “<observium db password>”; $config[‘db_name’] = “observium”;
Setup the MySQL database and insert the default schema:
# php includes/update/update.php
It is OK to have some errors in the SQL revisions up to 006.
Create the rrd directory to store RRDs in:
# mkdir rrd # chown apache:apache rrd
If the server will be running *only* Observium, change /etc/httpd/conf/httpd.conf default to :
# 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>
Create logs directory for apache
# mkdir /opt/observium/logs # chown apache:apache /opt/observium/logs # /etc/init.d/httpd restart
Add a first user, use level of 10 for admin:
# cd /opt/observium # ./adduser.php <username> <password> <level>
Add a first device to monitor. You need to add related hostname in your DNS or /etc/hosts file.
# vi /etc/hosts 192.168.1.1  server0X.bdnog.org [replace x with group no]
# ./add_device.php <hostname> <community> v2c
Do an initial discovery and polling run to populate the data for the new device:
# ./discovery.php -h all   ./poller.php -h all
Cron
Add cron jobs, create a new file /etc/cron.d/observium with the following contents:
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
And reload the cron process:
# /etc/init.d/cron reload
Please note running only a single poller instance is good for initial testing, but do check the Performance tuning page for further performance enhancing options once you get going.
Final Points
You should now be able to see http://<server ip>
If everything works, let’s set the httpd and mysqld to startup when we reboot the server:
# chkconfig mysqld on # chkconfig httpd on
Troubleshooting
Error 1: Could not ping <hostname>
Solution: Check fping location at /opt/observium/includes/defaults.inc.php file.
# whereis fping # ln -s /usr/sbin/fping /usr/bin/fping
Error 2:  PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/module.so’
Solution: Edit /etc/php.d/mcrypt.ini
 ; Enable mcrypt extension module extension=module.so
to
 ; Enable mcrypt extension module extension=mcrypt.so
 Source: http://www.observium.org/wiki/RHEL_Installation

Social

  • View rapappu’s profile on Twitter
  • View fakrulalam’s profile on LinkedIn
  • View fakrul’s profile on GitHub
  • View FakrulAlamPappu’s profile on Google+
  • View fakrulalam’s profile on Flickr

Twitter Updates

  • 1976 forming the modern-day #Vietnam 1971 #Bangladesh independence When we could see something like this happening… twitter.com/i/web/status/1… 4 days ago
  • The beauty is here #Keychron #K2 Mechanical Keyboard https://t.co/j5OVbpmvKi 5 days ago
  • blog.fitbit.com/2021-update/?u… #fitbit + #google https://t.co/X2g7HpIMvI 1 week ago
  • #DevNet Class of 2020. View my verified achievement from @learningatcisco. youracclaim.com/badges/bf864fa… 1 month ago
  • #pythonprogramminglanguage #python #pyenv towardsdatascience.com/how-to-set-up-… 1 month ago
  • wsj.com/articles/u-s-c… 1 month ago
  • bleepingcomputer.com/news/security/… 1 month ago
  • RT @GinNTTnet: Carriers, Internet-centric businesses and enterprises can prepare themselves to fight against #DDoS attacks. Download this w… 2 months ago
  • #LoRaWAN GPS payload is coming nicely to #AzureIotHub @GlobalNTT @CiscoDevNet #ntthackfest2020 https://t.co/VqYi7dMBoq 2 months ago
  • RT @GinNTTnet: Paolo Lucente @Paolo_Lucente from the #globalipnetwork division at @GlobalNTT will present this Monday Oct 12 at the Next Ho… 3 months ago
  • RT @bdNetOpGroup: Make sure we always "Learning from failures". Wanna know more? Please join bdnog.org/bdnog12/index.…. Because our very own… 3 months ago
  • RT @bdNetOpGroup: #bdNOG12 Panel Discussion: "Social CDN Business : Paid or Free". Make sure you register and join bdnog.org/bdnog12/index.…… 3 months ago
  • RT @teamcymru: #DDoS Attacks Hit 1 Tbps in #2020 #infosec bit.ly/2ZLmAlK https://t.co/Ezx3s5xVcw 4 months ago
  • github.blog/2020-09-10-ann… #msteams #github 4 months ago
  • I just backed Keychron K3 -Ultra-slim Compact Wireless Mechanical Keyboard on @Kickstarter kickstarter.com/projects/keytr… 4 months ago
Follow @rapappu

Tags

antismap antivirus automation Azure bangladesh BASH BASH Script BDCERT bgp bind ccsp centos CentOS mirror CERT CISA cisco Cyber Security ddos dhaka dhakacom DNS DNSSEC GSM intrusion detectoin system Intrusion prevention system ips IPv6 ISACA junos linux Looking Glass lxc lxc profile lxd mailqueue mailscanner Mail Server mailwatch Meraki mikrotik monitor mpls MPLS L3 VPN mysql My Work network network management nginx NSD observium OpenVPN perl PHP ping postfix Proxy PTA python RANCID Reading RPKI Shell Script sms sms server SNMP SSH Tutorial ubuntu Ubuntu Mirror Server Virtual Box vispan vmware websvn Youtube hack খামাখা

Blog at WordPress.com.