Spine: a poller for Cacti
Spine is a high speed poller replacement for
cmd.php. It is almost 100%
compatible with the legacy cmd.php processor and provides much more
flexibility, speed and concurrency than
Make sure that you have the proper development environment to compile Spine. This includes compilers, header files and things such as libtool. If you have questions please consult the forums and/or online documentation.
Feature branch for
1.2.x has been merged into the
develop branch. This means
things may and will break, but they will eventually be fixed.
DEVELOP branch is currently considered UNSTABLE, use with caution!
These instructions assume the default install location for spine
/usr/local/spine. If you choose to use another prefix, make
sure you update the commands as required for that new path.
To compile and install Spine using MySQL versions 5.5 or higher please do the following:
./configure make make install chown root:root /usr/local/spine/bin/spine chmod u+s /usr/local/spine/bin/spine
To compile and install Spine using MySQL versions previous to 5.5 please do the following:
./configure --with-reentrant make make install chown root:root /usr/local/spine/bin/spine chmod +s /usr/local/spine/bin/spine
- Download Cygwin for Window from https://www.cygwin.com/
- Install Cygwin by executing the downloaded setup program
- Select Install from Internet
- Select Root Directory: C:\cygwin
- Select a mirror which is close to your location
- Once on the package selection section make sure to select the following (TIP: use the search!):
- Wait for installation to complete, coffee time!
- Move the cygwin setup to the C:\cygwin\ folder for future usage.
- Open Cygwin shell prompt (C:\Cygwin\cygwin.bat) and brace yourself to use unix commands on Windows.
- Download the Spine source to the current directory: http://www.cacti.net/spine_download.php
- Extract Spine into C:\Cygwin\usr\src<spineversion>:
tar xzvf cacti-spine-*.tar.gz
- Change into the Spine directory:
- Run bootstrap to prepare Spine for compilation:
- Follow the instruction which bootstrap outputs.
- Update the spine.conf file for your installation of Cacti. You can optionally move it to a better location if you choose to do so, make sure to copy the spine.conf as well.
- Ensure that Spine runs well by running with
/usr/local/spine/spine -R -S -V 3
- Update Cacti
PathsSetting to point to the Spine binary and update the
Poller Typeto Spine. For the spine binary on Windows x64, and using default locations, that would be
- If all is good Spine will be run from the poller in place of cmd.php.
On Windows, Microsoft does not support a TCP Socket send timeout. Therefore, if you are using TCP ping on Windows, spine will not perform a second or subsequent retries to connect and the host will be assumed down on the first failure.
If this is a problem it is suggested to use another Availability/Reachability method, or moving to Linux/UNIX.
Spine takes quite a few MySQL connections. The number of connections is calculated as follows:
- main poller take one connection
- all threads take one connection each
- all script servers take one connection each
Therefore, if you have 4 processes, with 10 threads each, and 5 script servers each your spine will take approximately:
total connections = 4 * ( 1 + 10 + 5 ) = 64
On older MySQL versions, different libraries had to be used to make MySQL thread safe. MySQL versions 5.0 and 5.1 require this flag. If you are using these version of MySQL, you must use the --with-reentrant configure flag.