## Summary Consolidates the overlapping ICMP work from #555 and #619 into one review of the complete socket and resolver state machine. - add ICMPv6 echo polling and dispatch IPv6 devices to it - prefer unprivileged datagram ICMP sockets when the kernel permits them - retain bounded raw-socket fallback for IPv4 and IPv6 - give packet and socket resources one cleanup owner - leave caller-owned resolver state untouched on lookup failure - keep every retry inside one cached capability and privilege-transition decision - prevent LOCK_SETEUID retry deadlocks - validate raw and datagram reply layouts, source, sequence, identifiers, and payload - retain fuzz and unprivileged-socket integration coverage The consolidation also fixed an integration defect found locally: the controlled successful-reply test constructed only a raw IPv4 packet even when the production path selected SOCK_DGRAM. It now models the selected socket format, and IPv6 raw retries use the same privilege-safety invariant as IPv4. ## Verification - warning-enabled local build completed with MariaDB Connector/C, Net-SNMP, OpenSSL 3, and cmocka - make check: 5/5 test binaries passed - focused ping_icmp suite: 9/9 cases passed - actionlint and git diff --check passed - all commits are signed - GitHub CI is authoritative for Linux capability, sanitizer, fuzz, and unprivileged-network coverage Closes #127. Closes #250. Closes #593. Closes #611. Supersedes #555. Refs #597 and #618. --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> Signed-off-by: TheWitness <copilot@users.noreply.github.com> Co-authored-by: TheWitness <thewitness@cacti.net> Co-authored-by: TheWitness <copilot@users.noreply.github.com>
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 cmd.php.
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.
Unix Installation
These instructions assume the default install location for spine of
/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:
./bootstrap
./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:
./bootstrap
./configure --with-reentrant
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine
Windows Installation
CYGWIN Prerequisite
-
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!):
- autoconf
- automake
- dos2unix
- gcc-core
- gzip
- help2man
- inetutils-src
- libmysqlclient
- libmariadb-devel
- libssl-devel
- libtool
- m4
- make
- net-snmp-devel
- openssl-devel
- wget
-
Wait for installation to complete, coffee time!
-
Move the cygwin setup to the C:\cygwin\ folder for future usage.
Compile Spine
-
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:
-
Extract Spine into C:\Cygwin\usr\src<spineversion>:
tar xzvf cacti-spine-*.tar.gz -
Change into the Spine directory:
cd /usr/src/cacti-spine-* -
Run bootstrap to prepare Spine for compilation:
./bootstrap -
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 thePoller Typeto Spine. For the spine binary on Windows x64, and using default locations, that would beC:\cygwin64\usr\local\spine\bin\spine.exe -
If all is good Spine will be run from the poller in place of cmd.php.
Known Issues
-
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: (1 for main poller + 1 per each thread + 1 per each script server)
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.
Copyright (c) 2004-2026 - The Cacti Group, Inc.