* docs: update stale PHP/MySQL/MariaDB version requirements - Requirements.md: PHP 5.4 -> 8.1 (matches 1.2.31+ requirement note) - Requirements.md: MySQL 5.6 -> 5.7, MariaDB 5.5 -> 10.2 (current minimums) - Requirements.md: MySQL section header updated to >= 5.7 / 10.2 - Requirements.md, Install-Under-CentOS_LAMP.md, Install-Under-CentOS_LEMP.md, Installing-Under-Windows.md: comment out innodb_file_format and innodb_large_prefix (removed in MySQL 8.0 / MariaDB 10.3+) Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: upgrade http:// links to https:// and fix dead wiki URLs - Upgrade http:// to https:// in 8 files: General-Installing-Instructions.md, Graph-Templates.md, How-To-SSH-Tunnels.md, Plugin-Development.md, Standards-Code-Formatting.md, Templates.md, Upgrading-Cacti-Under-Windows.md - Replace two dead docs.cacti.net wiki links: How-To-SSH-Tunnels.md: old wiki SNMP guide -> Net-SNMP man page Plugin-Syslog.md: dead plugin:syslog.config -> plugin_syslog repo Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: fix technically inaccurate MySQL configuration recommendations - innodb_additional_mem_pool_size: removed in MySQL 5.7.4 / MariaDB 10.0; replaced with removal notice in Requirements.md and comments in Install-Under-CentOS_LAMP.md and Install-Under-CentOS_LEMP.md - max_heap_table_size: clarify ">= 5" means ">= 5% of system RAM" - innodb_buffer_pool_size: clarify ">= 25" means ">= 25% of system RAM" Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: add missing required PHP extensions to Requirements.md Add dom, mysqlnd, pcntl, Phar, and sqlite3 — all declared as required in composer.json but absent from the module list. pcntl is Linux-only (process control for the poller). Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: fix 36 spelling errors across 19 documentation files Corrections detected by codespell: - somone->someone, Walkthough->Walkthrough, GUAGE->GAUGE - asociate->associate, messege->message, therefor->therefore - get's->gets, Proxys->Proxies, paralelisation->parallelization - parms->params (6 instances in script data query examples) - finialise->finalise, buildin->built-in, everytime->every time - Unistall->Uninstall, resiliant->resilient, build-in->built-in - requriments->requirements (2 instances), explanitory->explanatory (3 instances) - fro->for, invole->involve, reulting->resulting - stauts->status, tge->the Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * ci: add codespell spelling check workflow for documentation Adds GitHub Actions workflow that runs codespell==2.4.1 on all Markdown files on every push/PR to main. Also adds .codespell.cfg to skip binary and generated files (JSON, shell scripts, HTML, images). Update .gitignore to allow .github directory (was blocked by .git* glob). Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: improve voice, consistency, and note formatting across 10 files - Convert passive/impersonal constructions to active voice - Standardize NOTE -> Note in blockquotes for consistency - Reformat inline IMPORTANT/Note callouts as blockquotes - Fix awkward phrasing in LXC container notes - Consolidate fragmented note bullets into single blockquote Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: fix technical accuracy and correct typos across 10 files - Requirements.md: clarify Composer is for source/develop installs only; RRDtool minimum updated to 1.5+ (1.8+ for 1.3.x); php-snmp section rewritten to describe selective fallback behavior; SELinux/AppArmor advice reworded to recommend policy exceptions over blanket disable - Spine.md: fix PHP Script Server range (10 -> 15); fix 'senstivive' and 'Davices' typos - Trees.md: fix broken table rows split across lines; 'Sporting' -> 'Sorting' - Data-Sources.md: restructure storage table to standard 3-column layout; fix '19b' unit typo -> '19kb' - How-To-SNMP-Custom-Script.md: convert bold/backtick commands to proper fenced code blocks; fix 'intex' and 'BNSMPD' typos - Plugins.md: fix 'onfiguration' typo; fix YouTube thumbnail http -> https; fix 'Tuturial' typo - Standards-Security.md: fix 'invalidate' -> 'invalid' - template_apache_config.md: fix 'apcache2' -> 'apache2' - device-template-specific-proxmox.md: replace service file edit with drop-in approach; remove ProtectSystem=off/ProtectHome=off; add note on minimal required systemd overrides - resource/xml/query_interface_traffic.php: http -> https URL Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: rename CentOS install guides to Enterprise Linux; fix grammar, logic, and security flaws - Rename Install-Under-CentOS_LAMP.md → Install-Under-Enterprise-Linux-LAMP.md - Rename Install-Under-CentOS_LEMP.md → Install-Under-Enterprise-Linux-LEMP.md - Update README.md ToC links to match new filenames and correct labels LAMP fixes: - Title updated to reflect RHEL/Rocky Linux/AlmaLinux coverage - Fix step numbering: "2.Install" / "3.Enable" missing space after number - Spine build deps: restructure for EL7/EL8/EL9+ separately; EL8 was missing package install after repo enable; EL9+ uses 'crb' not 'powertools' - SELinux URL: fix quadruple-slash typo; switch to English wiki URL LEMP fixes: - Title: "CentOS 7" → "Enterprise Linux (RHEL / Rocky Linux / AlmaLinux)" - TLS: remove TLSv1 and TLSv1.1 (RFC 8996 prohibited, fails OpenSSL 3.x); set ssl_protocols TLSv1.2 TLSv1.3 - Ciphers: remove DH+3DES (Sweet32 / CVE-2016-2183) - HTTP redirect: uncomment return 301 (comment claiming nginx lacks support for 'return' has been wrong since nginx 0.8 / 2009) - PHP location block: fix 'alias' → 'root' (alias breaks $document_root in fastcgi_param SCRIPT_FILENAME); add missing semicolon after index directive - Cron: poller path was /var/www/html/cacti but install target throughout this guide is /usr/share/nginx/html/cacti — align them - DB: split GRANT...IDENTIFIED BY into CREATE USER + GRANT (IDENTIFIED BY on GRANT removed in MySQL 8.0 / MariaDB 10.5.2) - Fix comment typo: "Compression increases performance0" → remove trailing 0 - SELinux URL: fix quadruple-slash typo README.md: - Update section 3.1 and 3.2 links to new filenames - Correct labels from "CentOS 7" to "Enterprise Linux" - Fix "Reports Admistrative Interface" → "Administrative" - Fix "requriments" (×2) → "requirements" * docs: remove Install-Under-CentOS_LAMP.md (superseded by Install-Under-Enterprise-Linux-LAMP.md) * docs: remove Install-Under-CentOS_LEMP.md (superseded by Install-Under-Enterprise-Linux-LEMP.md) * docs: update README ToC links and fix typos - Update 3.1 and 3.2 links from CentOS to Enterprise Linux filenames - Correct labels: "CentOS 7" → "Enterprise Linux (RHEL/Rocky/AlmaLinux)" - Fix "Reports Admistrative" → "Reports Administrative" - Fix "requriments" (×2) → "requirements" * docs: fix grammar, logic, and technical errors in remaining install/upgrade guides Installing-Under-Windows.md: - Replace php_mysql.dll with php_pdo_mysql.dll (php_mysql removed in PHP 7.0) - Remove IIS ISAPI steps referencing php8isapi.dll (ISAPI dropped in PHP 8.0); replace with FastCGI instructions via php-cgi.exe - Remove NO_AUTO_CREATE_USER from sql_mode (removed MySQL 8.0, breaks startup) - sort_buffer_size = 200M → 32M with caveat (per-session; 200M causes OOM under load) - Fix step numbering gaps: main list 5→8, IIS 3→5, Finishing 5→8 - "you will have to user 8.3 notation" → "use" - "c:cygwin" → "c:\cygwin" (missing backslash) - "it's subfolders" → "its subfolders" - "A anm example" → "An example" - "verify/udate" → "verify/update" Installing-Under-Ubuntu-Debian.md: - Cron user: apache → www-data (apache user does not exist on Ubuntu/Debian) - CREATE DATABASE: use utf8mb4 directly; remove redundant ALTER DATABASE - php8.1-mbstring listed twice in apt-get install; deduplicated - "may received" → "may receive" - Note php8.1 is EOL; recommend checking current supported release Upgrading-Cacti-Under-Windows.md: - Fix all steps numbered 1. → proper sequential numbering (1–10) - Remove hardcoded MySQL 5.7 path; use generic %MYSQL_HOME% note Upgrading-Cacti-Under-FreeBSD.md: - mysqldump: remove contradictory -l / --lock-tables=false flags; replace with --single-transaction (correct for InnoDB, no locking) How-To-SSH-Tunnels.md: - Add prominent note: SSH -L is TCP-only; standard SNMP uses UDP; this guide requires TCP transport configured on snmpd and does not work for most network devices - Fix unclosed code fence after ssh-keygen output block - Replace rc.local persistence with systemd unit (rc.local is deprecated and disabled by default on systemd distros: Ubuntu 16.04+, Debian 9+) - ssh-keygen: recommend ed25519 over RSA * docs: correct PHP 8.1 EOL date, Net-SNMP link, and grammar PHP 8.1 security support ended 31 December 2025, not November 2024. Point the snmpd.conf link at www.net-snmp.org (the sourceforge.io mirror is bot-blocked). Fix 'There a two ways extending' to 'There are two ways to extend'. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * ci: fix spelling workflow trigger to target develop, not main The repo's default branch is develop; main hasn't moved since 2023. The workflow's push/pull_request filters targeted main, so it never ran on any PR opened against develop. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
8.0 KiB
Principles of Operation
To understand Cacti's principles of operation, you have to start at the top and work down. Cacti's operational model is divided into multiple layers. They include
- Devices
- Sites
- Data Collectors (Pollers)
- Data Retrieval
- Data Storage
- Graphing
Devices
Cacti Devices are either physical hosts, sensors, clusters, services, or any type of object with a name and that can provide information about itself that should go into a Graph or could be used to provide additional information useful for Operations.
The Cacti Device object serves as the center Cacti's world it stores information on how to gather data about it. You can have from one to tens of thousands of Devices monitored from one Cacti system. It's very scalable. They can be discovered using Cacti's Automation sub-system, added manually, or gathered from a CMDB and added to Cacti using its command line interface.
Sites
Cacti works with Sites. So, when you add a physical Device to Cacti, you can associate it with a Site. Sites are designed to be physical locations. Cacti can organize Devices and its Graphs by Site in a convenient fashion.
Data Collectors
These are the physical or virtual hosts or containers that gather data about a group of devices either within a network or a site. They are resilient in that if the central Cacti server is not reachable, they will cache data and wait for it to become available again.
Cacti supports up to dozens of Data Collectors today. Some customers use something as simple as a Raspberry Pi or Intel NUC for Data Collectors. However, Virtual Machines are preferred as they can be migrated live which does not interrupt data collection.
Data Retrieval
The Data Collectors first and foremost task it to retrieve data and forward it to the main Cacti server for storage. Cacti will do so using its poller which is a part of the Data Collector. The Poller is executed from the operating system's scheduler or from systemd depending on the OS and the version of the OS. It collects data as frequently as every 10 seconds to hours dynamically in the same system. So, one Cacti system can be monitoring objects at a 10 second granularity, a 30 second granularity, 1 minute all the way to once per several hours.
In the image below, you can see the general flow of data from the device to the Cacti database.
In enterprise installations, you're dealing with potentially thousands of devices of different type, e.g. Servers, Network Equipment, Appliances, Sensors, PDU's, Static Transfer Switches and the like. To retrieve data from remote targets/hosts, Cacti will mainly use the Simple Network Management Protocol SNMP. Thus, all devices capable of using SNMP will be eligible to be monitored by Cacti. But that's just the simplest case.
Many customers gather data using out of band processes like
using the Cacti hmib Plugin, which stores data in transient
tables, and then Cacti can do device data collection directly
from those transient tables. That design, since no device
can be nearer in latency than the database, can scale to 30,
40, even 50 thousand devices with relative ease in Cacti
depending on the size of your database and data collector
infrastructure (sockets, cores, threads). When using this
N-Tiered methodology, most customers will use Cacti's
script server which is a pool of memory resident PHP
interpreters that preloads all scripts used to gather data,
therefore, it's super fast, and parallel in nature.
However, most customers will use SNMP, or SSH to gather
metrics from their Devices. I mean, how many companies
have 50 thousand devices that they monitor with regularity?
Once the data has been gathered, Cacti then uses either an out-of-band or in-band process to store the data into Round Robin Archive files, which represent a flat very well performing Time Series Databases called RRDfiles. See below for details on that storage mechanism.
Data Storage
In the industry, storage of the resulting data can take many forms. In Cacti, the RRDfile has been the tool of choice for many years. There are only so many ways to make a hammer, and RRDtool's a great hammer. Other approaches in the industry use SQL database, others flat files or document stores like ElasticSearch, Splunk, Mongo DB, InfluxDB. There are a number of options out there. You can get more information about RRDfile from the RRDtool Website.
RRD is an acronym for Round Robin Database. RRD is a system to store and
display time-series data (i.e. network bandwidth, machine-room temperature,
server load average). It stores the data in a very compact way that will not
expand over time, and it can create beautiful graphs. Data that ages
beyond a certain point is consolidated and very old data just rolls off
the end of the RRDfile. It ages out. This keeps storage requirements at bay.
As mentioned, performs consolidation to combine raw data (a primary data point
in RRDtool lingo) to consolidated data (a consolidated data point).
This way, historical data is compressed to save space. RRDtool knows
different consolidation functions: AVERAGE, MAXIMUM, MINIMUM and LAST.
Data Presentation
One of the most appreciated features of RRDtool is the built-in graphing function. This comes in useful when combining this with some commonly used web server. Such, it is possible to access the graphs from merely any browser on any platform.
The Graphing engine is quite flexible. It is possible, to graph one or many items in one graph. Auto-scaling is supported and logarithmic y-axis, left and right axes, and much much more. You may stack items onto another and print pretty legends denoting characteristics such as minimum, average, maximum and lots more.
Extending Built-in capabilities
As mentioned, scripts and Queries extend Cacti's capabilities beyond just SNMP. They allow for data retrieval using custom-made code. This is not even restricted to certain programming languages; you will find PHP, Perl, Python, shell/batch and more. These scripts and queries are executed locally by Cacti's Poller. But they may retrieve data from remote hosts by different protocols, e.g.
| Protocol | Description |
|---|---|
| ICMP | ping to measure round trip times and availability |
| telnet | programming telnet scripts to retrieve data available to sysadmins only |
| ssh | much like telnet, but more secure (and more complicated) |
| http(s) | invoke remote cgi scripts to retrieve data via a web server or parse web pages for statistical data (e.g. some network printers) |
| snmp | use Net-SNMP's exec/pass functions to call remote scripts and get data |
| ldap | to retrieve statistical about your ldap server's activities |
| use your own | invoke Nagios agents |
and much more...
There are two ways to extend Cacti's built-in capabilities:
Data Input Methods for querying single or multiple, but non-indexed readings
- temperature, humidity, wind, ...
- cpu, memory usage
- number of users logged in
- IP readings like ipInReceives (number of ip packets received per host)
- TCP readings like tcpActiveOpens (number of tcp open sockets)
- UDP readings like udpInDatagrams (number of UDP packets received)
Data Queries for indexed readings
- network interfaces with e.g. traffic, errors, discards
- other SNMP Tables, e.g. hrStorageTable for disk usage
- you may even create Data Queries as scripts e.g. for querying a name server (index = domain) for requests per domain
By using the Exporting and Importing facilities, it is possible to share your results with others.
Beyond Graphs
Cacti is not just a Graphing platform, it's also a Network Operations Framework. Through the dozens of plugins and user contributed Graph Templates, the sky is the limit as to what can be done using the Cacti Framework. It's stood the test of time now for over two decades in the Open Source world.
Copyright (c) 2004-2026 The Cacti Group

