Call us Today +49 7543 609337-0
Log In

In this posting you will be learning how to install the Cacti spine poller on a freshly installed CentOS 6 system.

Step 1 – Prerequisites

If you followed the guide from here you can skip Step 1. Otherwise please continue.

First we need to install some of the software packages needed for Cacti to run properly. Software which is not included or enabled in the base CentOS 6 installation are:

  • gcc
  • development headers/sources

Let’s use yum to get these installed.

yum install -y gcc mysql-devel net-snmp-devel autoconf automake libtool dos2unix help2man

gcc and the devel packages are required for the installation of spine, hence that’s why we include it here.

[the_ad id=”1440″]

[field name=AdsWithin]

Step 2 – Spine Files

Spine 0.8.8b

Let’s now move to the actualy installation of Spine. First we need to download and extract it:

cd /tmp
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8b.tar.gz
tar -xzvf cacti-spine-0.8.8b.tar.gz

Now we have the spine sources downloaded and extracted in our tmp directory. Let’s move on to the compilation.

Step 3 – Compile Spine

The following commands will compile and install spine

cd /tmp/cacti-spine-0.8.8b
./bootstrap
./configure
make
make install

Please note, if you want to install spine somewhere else e.g. in /opt/spine then you have to use the following syntax:

./configure --prefix=/opt/spine

By default, the make install will install all files to /usr/local/spine/. For this HowTo we are going to assume that you’ve also compiled spine with the default values.

Spine 0.8.8d

Let’s now move to the actualy installation of Spine. First we need to download and extract it:

cd /tmp
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8d.tar.gz
tar -xzvf cacti-spine-0.8.8d.tar.gz

Now we have the spine sources downloaded and extracted in our tmp directory. Let’s move on to the compilation.

Step 3 – Compile Spine

The following commands will compile and install spine

cd /tmp/cacti-spine-0.8.8d
./bootstrap
./configure
sed -i "s/DEFS = -DHAVE_CONFIG_H/DEFS = -DHAVE_CONFIG_H -DUSE_NET_SNMP/ig" Makefile
make
make install

Please note, if you want to install spine somewhere else e.g. in /opt/spine then you have to use the following syntax:

./configure --prefix=/opt/spine

By default, the make install will install all files to /usr/local/spine/. For this HowTo we are going to assume that you’ve also compiled spine with the default values.

Spine 0.8.8g

Let’s now move to the actualy installation of Spine. First we need to download and extract it:

cd /tmp
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8g.tar.gz
tar -xzvf cacti-spine-0.8.8g.tar.gz

Now we have the spine sources downloaded and extracted in our tmp directory. Let’s move on to the compilation.

Step 3 – Compile Spine

The following commands will compile and install spine

cd /tmp/cacti-spine-0.8.8g
./bootstrap
./configure
make
make install

Please note, if you want to install spine somewhere else e.g. in /opt/spine then you have to use the following syntax:

./configure --prefix=/opt/spine

By default, the make install will install all files to /usr/local/spine/. For this HowTo we are going to assume that you’ve also compiled spine with the default values.

Spine 0.8.8h

Let’s now move to the actualy installation of Spine. First we need to download and extract it:

cd /tmp
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8h.tar.gz
tar -xzvf cacti-spine-0.8.8h.tar.gz

Now we have the spine sources downloaded and extracted in our tmp directory. Let’s move on to the compilation.

Step 3 – Compile Spine

The following commands will compile and install spine

cd /tmp/cacti-spine-0.8.8h
./bootstrap
./configure
make
make install

Please note, if you want to install spine somewhere else e.g. in /opt/spine then you have to use the following syntax:

./configure --prefix=/opt/spine

By default, the make install will install all files to /usr/local/spine/. For this HowTo we are going to assume that you’ve also compiled spine with the default values.

Step 4 – Configure Spine

After the installation we now need to configure spine, so it knows how to connect to the cacti database. Copy the template config file and edit it:

cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
vi /usr/local/spine/etc/spine.conf

Then change the content of it to suit your installation:

DB_Host localhost
DB_Database cacti
DB_User cactiuser
DB_Pass cactiuser
DB_Port 3306
DB_PreG 0

Step 5 – Configure Cacti to use spine

Login to your Cacti instance and go to:
Console -> Settings -> Poller

Change the “Poller Type” to “spine”.

You’re cacti instance is now using the spine poller.

Ubuntu

For ubuntu, the bootstrap process will fail as it specifically checks for the existence of dos2unix. This tool is not available but has been renamed to “fromdos”. Therefore you will have to edit the bootstrap file and change the refernces to dos2unix into fromdos. Afterwards bootstrap will work just fine.

[the_ad id=”1440″]

SetGUID

Spine recommends issuing the chmod +s command to support e.g. ICMP ping requests. Unfortunately this will break most of the perl scripts due to security issues reported by these during the polling cycle. To resolve this issue you will have to execute the following commands onto spine :

chmod u+s spine
chown root.root spine

You will also have to either edit the perl files to fix the environment variable or replace them with the attached files. ( /path/to/cacti/scripts ):

Download cacti_spine_suid_scripts.zip

Need Commercial Support ?

Urban-Software.de offer commercial Cacti support not only for Cacti itself, but also for several of the plugins ( e.g. Thold ).
There’s going to be an on-demand solution in the future. You can contact us for more details using the contact form.

[field name=AdsWithin]