Files
spine/README.md
86a062dd09 ci: enforce cross-platform quality gates and connector coverage (#618)
## Summary

Consolidates the connector/build work from #613 and the broader
test-infrastructure work extracted from #597 into one review:

- discover MariaDB Connector/C first while retaining MySQL and
Percona-compatible support
- test MariaDB and MySQL Connector/C with strict GCC and Clang builds on
Ubuntu 24.04
- add a real macOS 15 build and unit-test lane with portable Autotools
platform detection
- run unit tests under ASan/UBSan and ThreadSanitizer
- enforce the measured 7% global coverage baseline and 70% changed-line
coverage
- add libFuzzer coverage for output parsing alongside the existing
hostname parser
- exercise the SNMPv3 integration suite against MariaDB and MySQL 8.4
- add cppcheck, shellcheck, DCO verification, CODEOWNERS, distcheck, and
Linux-capability checks while retaining the repository-managed default
CodeQL setup
- expose a stable `CI / required` aggregate check for branch protection
- pin runners and third-party actions and keep workflow permissions
read-only by default

## Correctness fixes found by the new gates

- reject truncated capability strings and poller-output SQL tuples
instead of publishing partial data
- make `bootstrap` fail closed and select `libtoolize`/`glibtoolize`
portably
- use Autoconf's canonical host for Darwin detection instead of an empty
native-build alias
- remove stale initialization/name-shadow findings and make read-only
interfaces const-correct
- make the ICMP parser test portable across Linux and BSD header names

## Verification

- strict GCC and Clang builds: 4/4 unit targets passed
- ASan/UBSan: 4/4 passed
- ThreadSanitizer: 4/4 passed
- macOS Clang/Homebrew build: 4/4 passed
- MariaDB integration: passed
- MySQL 8.4 integration: passed
- both libFuzzer targets: passed sustained local runs
- coverage: 7.2% global and 84% on changed lines
- cppcheck, shellcheck, actionlint, DCO verification, and `git diff
--check`: passed locally

## Post-merge repository settings

After these workflows exist on `develop`, an administrator should
require `CI / required`, Fuzz, Integration, Rocky Linux, and the
repository-managed CodeQL/code-scanning result in the active ruleset;
enable code-owner approval; and require the branch to be current (or use
a merge queue). Enabling those settings before this PR merges would
create required checks that the base branch cannot yet emit.

Consolidates and supersedes #613. Closes #612.

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
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>
2026-09-24 05:52:56 -04:00

4.1 KiB

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

  1. Download Cygwin for Window from https://www.cygwin.com/

  2. Install Cygwin by executing the downloaded setup program

  3. Select Install from Internet

  4. Select Root Directory: C:\cygwin

  5. Select a mirror which is close to your location

  6. 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
    • libmariadb-devel (preferred) or libmysqlclient
    • libssl-devel
    • libtool
    • m4
    • make
    • net-snmp-devel
    • openssl-devel
    • wget
  7. Wait for installation to complete, coffee time!

  8. Move the cygwin setup to the C:\cygwin\ folder for future usage.

Compile Spine

  1. Open Cygwin shell prompt (C:\Cygwin\cygwin.bat) and brace yourself to use unix commands on Windows.

  2. Download the Spine source to the current directory:

    http://www.cacti.net/spine_download.php

  3. Extract Spine into C:\Cygwin\usr\src<spineversion>:

    tar xzvf cacti-spine-*.tar.gz

  4. Change into the Spine directory:

    cd /usr/src/cacti-spine-*

  5. Run bootstrap to prepare Spine for compilation:

    ./bootstrap

  6. Follow the instruction which bootstrap outputs.

  7. 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.

  8. Ensure that Spine runs well by running with /usr/local/spine/spine -R -S -V 3

  9. Update Cacti Paths Setting to point to the Spine binary and update the Poller Type to Spine. For the spine binary on Windows x64, and using default locations, that would be C:\cygwin64\usr\local\spine\bin\spine.exe

  10. If all is good Spine will be run from the poller in place of cmd.php.

Known Issues

  1. 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.

  2. 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

  3. 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.