Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

20090422

how-to install smokeping on fedora 9/10

Smokeping - http://oss.oetiker.ch/smokeping/ - is an AWESOME tool to keep track of the latency of your sites, servers, and best of all your ISP! Currently I have ATT Uverse and I'm loving it, however, I used to live in a more rural area and had to use a fixed wireless ISP for my "broadband". They often had issues and had minimal monitoring on their end so they depended on users telling them when things were not going so well (reactive and not proactive, great...).

Smokeping pings each destination on a regular interval and graphs each response noting packetloss and jitter with "smoke".

I personally use it to ping my home router along with a very reliable url such as www.fedora.com. This helps when I am seeing a high amount of packet loss as I can just call up my ISP and point them to my website so that they can see first hand the trends that are occurring and cannot deny the degraded service in any way.

A sample of a smokeping is shown below.


On both debian and fedora smokeping can be found in the default repositories. Once this has been installed all you need to do is configure '/etc/smokeping/config'

Example noted below.

+ trunty

menu = trunty
title = Travis Runty's ping tests

++ Home

menu = trunty's home connection
title = Trunty's home Internet America connection (UVERSE)
host = kyle.travisrunty.com

Once you have made the configuration changes save them and restart the smokeping daemon.

how-to install spine on centOS-5/RHEL-5

Quick and dirty how-to how to install the spine poller for cacti on centos or rhel 5. This is useful if you have a ton of sources being polled.

  • yum install net-snmp-devel mysql mysql-devel openssl-devel ksh automake autoconf libtool gcc make -y
  • cd
  • wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7c.tar.gz
  • tar -xvzf cacti-spine-0.8.7c.tar.gz
  • cd cacti-spine-0.8.7c
  • chmod 744 ./configure
  • autoconf
  • autoheader
  • automake
  • ./configure
  • make
  • make install
  • cp /usr/local/spine/etc/spine.conf.dist /etc/spine.conf
  • edit '/etc/spine.conf' to match cacti's config.phpWithin the cacti GUI add the spine binary path in Settings > Paths '/usr/local/spine/bin/spine' and then under the Poller tab change the type from cmd.php to Spine.
Current repolist
repo id repo name status
addons CentOS-5 - Addons enabled : 0
base CentOS-5 - Base enabled : 3,272
centosplus CentOS-5 - Plus enabled : 63
contrib CentOS-5 - Contrib enabled : 0
epel Epel from fedora enabled : 4,970
extras CentOS-5 - Extras enabled : 266
updates CentOS-5 - Updates enabled : 258

how-to install cacti on rhel-5/centos-5

Hopefully this short and simple how-to will be useful to someone. There may be inaccuracies so please feel free to let me know if you see anything that needs correcting.

Download all necessary packages

* `yum install httpd php php-mysql php-snmp mysql mysql-server net-snmp net-snmp-utils rrdtool libart_lgpl -y`
* rrd-tool can be obtained from dag (http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.x86_64.rpm and http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.x86_64.rpm for 64-bit) if it is not in your repos.

Verify that the required daemons are started and configured to start on boot

* `chkconfig httpd on`
* `chkconfig snmpd on`
* `chkconfig mysqld on`
* `/etc/init.d/httpd restart`
* `/etc/init.d/mysqld restart`
* `/etc/init.d/snmpd restart`

Configure mysql daemon to listen only on localhost (optional)

* `vi /etc/my.cnf`
* add 'bind=127.0.0.1'
* restart mysql `/etc/init.d/mysqld restart`
* confirm that it is listening on localhost `netstat -ntlp | grep :3306`

Configure mysql users

* mysql -u root`
* set mysql password for root user
o `use mysql;`
o `update user set Password=PASSWORD('selectapw') where User='root';`
* create cacti database
o `create database cacti;`
* create cacti user and grant them permissions to the cacti database
o `grant all privileges on cacti.* to 'cacti'@'localhost' identified by 'selectpw' with grant option;`
* apply all new permission changes
o `flush privileges;`
o or you can simply restart mysql

Get and extract the cacti tarball

* `cd /var/www/html/`
* `wget http://www.cacti.net/downloads/cacti-0.8.7d.tar.gz`
* `tar -xvzf cacti-0.8.7d.tar.gz`

Create symbolic link and change the owernship to apache

* `ln -s /var/www/html/cacti-0.8.7d.tar.gz`
* `chown -R apache:apache /var/www/html/cacti`

Create the necessary cacti tables

* `mysql -u root -p cacti < /var/www/html/cacti/cacti.sql` Create cacti user and create the poller cron * `useradd cacti` * `passwd cacti` * `su – cacti` * `crontab -e` * insert `*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1` and save `:wq`
* exit back to root `exit`

Change ownership of rra and log to cacti

* `chown -R cacti /var/www/html/cacti/rra/ /var/www/html/cacti/log/`

Populate the cacti config with mysql information

* `vi /var/www/html/cacti/include/config.php`
* update the below accordingly
* $database_type = "mysql";
* $database_default = "cacti";
* $database_hostname = "127.0.0.1";
* $database_username = "cacti";
* $database_password = "createdpass";

Point your web browser to `http://your-server/cacti/` and follow the on-screen instructions

* accept defaults
* when prompted the default usernamd and password is admin

Current repolist
repo id repo name status
addons CentOS-5 - Addons enabled : 0
base CentOS-5 - Base enabled : 3,272
centosplus CentOS-5 - Plus enabled : 63
contrib CentOS-5 - Contrib enabled : 0
epel Epel from fedora enabled : 4,970
extras CentOS-5 - Extras enabled : 266
updates CentOS-5 - Updates enabled : 258