* docs: [1.2.x] refresh the manual front page The front page opened with version notes before saying what Cacti is, used headings as sentences in the credits, and its table of contents listed seven sections while the page has ten. Open with a short description and a getting-started sequence, link the website and forums, give the credits real headings, and list every section in the table of contents in page order. Record Jeff Pasnak under In Memoriam with a link to the 1.2.31 release announcement. Correct label typos and wrap long entries with reference links. Existing section anchors are unchanged, and every page is still linked. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] fix typos, unrendered headings and forum links A check of every page linked from the front page found misspellings in eleven pages, three Mactrack headings written without a space after the hashes, which render as plain text, and two forum links still using http. Correct the spellings, add the missing space so the headings render, and point the forum links at https, where they already redirect. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] align the plugin pages with the plugin READMEs The supported plugins list and the Syslog and Mactrack pages had drifted from the README and INFO files in the plugin repositories. Update the descriptions that the READMEs contradict: Monitor's Thold requirement, the Router Configs transfer methods, the ReportIt release and Cacti versions, the WMI collection methods and its development status, and NUT support in Apcupsd. Add the Syslog requirements, the upgrade procedure, the dedicated database settings and the remote collector settings, and correct the database grant and a misplaced code fence. Add the Mactrack requirements and a short section on history partitioning and ignored ports that links to the README. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] correct grammar, spelling and broken Markdown A read of every page linked from the front page found grammar and spelling errors throughout, and Markdown that does not render as intended. Correct grammar, spelling, punctuation and product-name capitalization in 95 pages without changing headings, code blocks, link targets or the meaning of the text. Repair the Markdown defects: a code fence in the SSH tunnel how-to that never closed, malformed bold markers in the user management and device defaults pages, a release notes table with no blank line before it, split rows in the tree sorting table, and LDAP list items missing their markers. Correct three interface labels quoted with typos. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: [1.2.x] correct statements that differ from the 1.2.x source Reviewers of the linked pages flagged statements that looked wrong. Each was compared with the Cacti 1.2.x source at 1523aa04b, and only those the source or the page itself settles are changed. Correct interface labels and option names (Index Count Changed, Permissive, Not Selected, Utilities, the BCC description, the gear icon for plugin install), the default Maximum Value of U for a new data source item, the sysDescr object name, the PHP floor wording in the requirements table, the Mactrack wildcard character and the snmptrapd -On option. Repair cross-references, example values that disagree with their commands, two table captions, a split list and several sentences with missing words. Statements the source does not settle are left as written. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
15 KiB
Spine
Use only the supported operating systems and maintained dependencies compatible with this Cacti branch.
Spine is a multithreaded replacement for cmd.php, written in C. Polling
performance depends on the devices, network latency, scripts, database and
collector configuration. Measure complete poll-cycle duration on your own
workload before choosing thread and process counts; this page does not provide
a reproducible benchmark or guarantee a particular speedup.
For Cacti 1.2.31, start with the corresponding Spine 1.2.31 source and its build instructions. Check the installed binary's version and configuration before switching pollers. This does not establish compatibility for arbitrary mixed Cacti and Spine versions.
When using Spine, don't change crontab or systemd settings! Always use poller.php with crontab or cactid.php for systemd!
To activate Spine instead of cmd.php, please visit
Console > Configuration > Settings > Poller and select spine and save as the
Poller Type. If it's not showing as an available Poller Type this means
either it has not been installed, or its path has not been defined on the
Paths tab within Settings.
Once saved, poller.php will use Spine on all subsequent polling cycles. Before making this change, ensure that Spine runs properly from the command line using the following test:
cd /usr/local/spine/bin
./spine -R -V 3 -S
You should receive quite a bit of output depending on the size of your system.
To increase the number of Threads and concurrent processes, you must modify the
setting when editing your Data Collector under
Console > Data Collection > Data Collectors.
Choose Processes together with thread counts and database connection capacity. CPU count alone does not determine the appropriate settings.
When using spine, you must be sensitive to the number of connections that are
available for MySQL or MariaDB. Under
Console > Utilities > System Utilities > General Cacti will provide a
recommended max_connection for MySQL/MariaDB.
Table 15-1. Spine Parameters maintained at the System Level
| Name | Description |
|---|---|
| Number of PHP Script Servers | The number of concurrent script server processes to run per Spine process. Settings between 1 and 15 are accepted. Script Servers will pre-load a PHP environment. Then, the Script Server Scripts are included into that environment to save the overhead of reloading PHP and re-interpreting the binary for each call. |
| Script and Script Server Timeout Value | The maximum time that Spine will wait on a script to complete, in units of seconds. If a Script Server Script is terminated due to timeout conditions, the value entered into the RRDfile will be NaN |
Table 15-2. Spine Parameters maintained at the Data Collector Level
| Name | Description |
|---|---|
| Threads | The maximum threads allowed per process. More threads may reduce time spent waiting for devices, but also increase database connections and concurrent work. Measure poll-cycle duration and resource use before increasing the value; there is no universal requirement to use 10-15 threads. |
Table 15-3. Spine Parameters maintained at the Device Level
| Name | Description |
|---|---|
| Maximum OIDs Per Get Request | The maximum number of SNMP get OIDs to issue per SNMP request. Increasing this value increases poller performance over slow links. The maximum value is 60 OIDs, but that value is highly dependent on the MTU for your links to the remote devices. In some cases, using a Remote Data Collector is much more effective for polling remote Devices. Additionally, some Device Types do not handle large SNMP OID get requests. It's best to experiment until you find the correct setting. |
| Number of Collection Threads | The maximum number of spine threads used to gather information from a Device. When using this setting at the Device level, you have to ensure that you have enough threads allocated to a process so as to not block other Devices being polled from the same spine binary. |
Installing Spine
Use a Spine release compatible with the installed Cacti release. For Cacti 1.2.31, obtain Spine 1.2.31 or a compatible maintained package. Follow that release's build instructions rather than using an older archive.
On supported Ubuntu Server or Debian installations:
apt-get update
apt-get install -y build-essential autoconf automake libtool dos2unix \
help2man libssl-dev default-libmysqlclient-dev libsnmp-dev
On supported RHEL, Rocky Linux, or AlmaLinux installations, first enable the vendor's development-header repository if needed. Repository names differ between RHEL and its derivatives. Install the required build tools:
dnf install -y gcc autoconf automake libtool dos2unix help2man \
openssl-devel mariadb-devel net-snmp-devel
Build and install from the extracted release directory:
./bootstrap
./configure
make
make install
Copy the installed spine.conf.dist to spine.conf. Set DB_Host,
DB_Database, DB_User, DB_Pass, and DB_Port to the actual Cacti database
connection. Restrict access to the configuration to administrators and the
poller account. Configure the installed Spine binary and configuration paths
in Cacti, then test execution under the actual poller account.
Grant raw-socket privileges only if the selected availability checks need them, using the package's documented mechanism. Do not grant blanket root execution privileges merely to resolve a failed configuration check.
Testing/Debugging spine via command line
spine offers a few different ways at the command line to test its functionality. Here are a few examples of some tests you can run by executing spine.
Test Spine without writing results to database
This test allows you to run spine and display the results to the console. This will not commit any of the data to the database by specifying the -R option.
/usr/local/spine/bin# ./spine -R -V 5
SPINE: Using spine config file [../etc/spine.conf]
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The path_php_server variable is /var/www/html/cacti/script_server.php
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The path_cactilog variable is /var/www/html/cacti/log/cacti.log
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The log_destination variable is 1 (FILE)
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The path_php variable is /usr/bin/php
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The availability_method variable is 2
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The ping_recovery_count variable is 3
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The ping_failure_count variable is 2
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The ping_method variable is 2
2021-01-08 14:26:25 - SPINE: Poller[1] PID[13482] DEBUG: The ping_retries variable is 1
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] POLLER: Active Threads is 1, Pending is 1
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] DEBUG: Entering ICMP Ping
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] DEBUG: Attempting to ping 192.168.1.5, seq 9 (Retry 0 of 1)
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] DEBUG: Attempting to ping 192.168.1.5, seq 9 (Retry 0 of 1)
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] DEBUG: ICMP Device Alive, Try Count:1, Time:0.4990 ms
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] PING: Result ICMP: Device is Alive
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] HT[1] Device has no information for recache.
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] HT[1] NOTE: There are '1' Polling Items for this Device
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] DEBUG: The NIFTY POPEN returned the following File Descriptor 5
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] HT[1] DS[64] TT[9.95] SCRIPT: perl /var/www/html/cacti/scripts/ping.pl '192.168.1.5', output: 0.047
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] HT[1] Total Time: 0.018 Seconds
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] Device[38] HT[1] DEBUG: HOST COMPLETE: About to Exit Device Polling Thread Function
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] DEBUG: The Value of Active Threads is 0 for Device ID 38
2021-01-08 14:31:40 - SPINE: Poller[1] PID[13804] POLLER: Active Threads is 0, Pending is 0
Running spine for a specific host
If you want to run spine for a specific host you are able to do that with the following command:
/usr/local/spine/bin# ./spine -R -f 42 -l 42 -V 5
SPINE: Using spine config file [../etc/spine.conf]
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: The path_php_server variable is /var/www/html/cacti/script_server.php
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: The path_cactilog variable is /var/www/html/cacti/log/cacti.log
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: The log_destination variable is 1 (FILE)
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: The path_php variable is /usr/bin/php
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: The Value of Active Threads is 1 for Device ID 0
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] POLLER: Active Threads is 1, Pending is 0
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] SPINE: Active Threads is 1, Pending is 1
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] DEBUG: In Poller, About to Start Polling of Device for Device ID 42
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] IPv4 address 1.1.1.30 (1.1.1.30)
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] DEBUG: Entering ICMP Ping
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] DEBUG: Attempting to ping 1.1.1.30, seq 0 (Retry 0 of 1)
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] DEBUG: ICMP Device Alive, Try Count:1, Time:26.5849 ms
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] PING: Result ICMP: Device is Alive
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] HT[1] Device has no information for recache.
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] HT[1] NOTE: There are '1' Polling Items for this Device
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] DEBUG: The NIFTY POPEN returned the following File Descriptor 7
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] HT[1] DS[68] TT[42.86] SCRIPT: perl /var/www/html/cacti/scripts/ping.pl '1.1.1.30', output: 26.9
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] HT[1] Total Time: 0.077 Seconds
2021-01-08 14:34:14 - SPINE: Poller[1] PID[14296] Device[42] HT[1] DEBUG: HOST COMPLETE: About to Exit Device Polling Thread Function
Spine debug via GUI
You are also able to view spine debug information via the log file. Also, spine allows you to raise the level of detail it provides in the log. If you want to debug a specific device and see the spine output, click enable device debug.
Below is an example output of Spine debug info via the log file
To enable more detailed spine logging go to
Console > Configuration > Settings > Poller
You can choose from Detailed, Summary or No logging for Invalid data
Detailed Logging will be similar to cmd.php in that you will get a report for each data source that is having an issue.
Summary provides a count of how many data sources are having an issue per device.
Common Spine related errors
2021/01/08 14:38:44 - SPINE: Poller[1] PID[14838] FATAL: Unable to read configuration file! (Spine init)
Ensure that you have spine.conf in /usr/local/spine/etc. On first install,
spine.conf may be spine.conf.dist.
DEBUG Falling back to UDP Ping Due to SetUID Issues
This is a permissions issue with spine; ensure you have given spine the proper permissions.
chmod u+s /usr/local/spine/bin/spine
Copyright (c) 2004-2026 The Cacti Group

