Skip to content

Commit a189519

Browse files
Merge remote-tracking branch 'origin/develop' into pr-214
# Conflicts: # Installing-Under-Windows.md
2 parents e61c935 + d3cb3dc commit a189519

52 files changed

Lines changed: 2485 additions & 762 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespell.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codespell]
2+
# Skip binary files and images (some image filenames contain historical typos
3+
# that cannot be renamed without breaking existing markdown links)
4+
skip = *.png,*.jpg,*.jpeg,*.gif,*.svg,*.pdf,*.ico,*.zip,*.json,*.sh,*.html
5+
# Known false positives or intentional abbreviations
6+
ignore-words-list = parms,nd,ba,te

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
target-branch: develop
6+
schedule: {interval: weekly, day: friday}
7+
open-pull-requests-limit: 5
8+
cooldown: {default-days: 7}
9+
groups:
10+
github-actions: {patterns: ["*"]}
11+
labels: [dependencies, github-actions]
12+
commit-message: {prefix: ci, include: scope}

.github/workflows/spelling.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Spelling
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
codespell:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
18+
19+
- name: Install codespell
20+
run: pip install codespell==2.4.1
21+
22+
- name: Run codespell
23+
run: codespell --config .codespell.cfg

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ manual/*
1111
# Ignore any CertBot files
1212
.well-known
1313
.well-known/*
14-
# Ignore any Git/GitHub files
15-
.git*
14+
# Ignore Git internals but allow .github directory for CI workflows
15+
.git*
16+
!.github
17+
!.github/**

Boost.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,23 @@ on demand by the Cacti Administrator. They include:
3131

3232
## Prerequisites
3333

34+
> **Recommendation**: For most installations, especially those using the
35+
> **multiprocessing update** feature introduced in Cacti 1.2.17, or any
36+
> deployment with multiple Data Collectors, use **InnoDB** for all Boost tables.
37+
> The MEMORY engine can cause race conditions between concurrent processes
38+
> competing for memory table locks, which leads to polling backlogs and data
39+
> loss on busy systems. InnoDB with SSD or NVMe storage performs comparably and
40+
> avoids these failure modes. MEMORY tables are also incompatible with MariaDB
41+
> Galera and MySQL replication.
42+
3443
In its initial design the Boost process leveraged MySQL Memory Tables to
35-
increase overall performance, and to reduce writing data to disk. This is still
36-
a valid case however, with improvements in InnoDB performance over the years
37-
combined with Flash storage, the need for using MySQL Memory Tables has
38-
diminished. In some cases, for example when using MariaDB Galera, or MySQL
39-
Master/Slave replication, it can not be used.
44+
increase overall performance, and to reduce writing data to disk. With
45+
improvements in InnoDB performance over the years combined with Flash storage,
46+
the need for MySQL Memory Tables has diminished. The sections below document
47+
MEMORY table sizing for sites that have an explicit reason to use it, but InnoDB
48+
is the recommended engine. The main boost data table (`poller_output_boost`)
49+
already ships as InnoDB; the `ALTER TABLE` examples below convert tables to
50+
MEMORY only if you have a specific reason to use that engine.
4051

4152
If you do wish to use Memory you have to pay close attention to the amount of
4253
data that will be cached in your design. You should periodically check that you
@@ -178,10 +189,14 @@ Then, save the file, and restart MySQL. Once this is done, you are ready to
178189

179190
## Flushing the Boost Cache
180191

181-
If you are planning on system maintenance if you are using MEMORY storage in
182-
MySQL or MariaDB, you should flush your Boost Cache before your system is taken
183-
offline for maintenance. To do this, you simply login to the Cacti system as
184-
root, and flush the Cache using the commands below
192+
> **Warning**: MEMORY tables are cleared on every MySQL/MariaDB restart. If you
193+
> are using MEMORY storage, always flush the Boost Cache before taking the
194+
> database offline. Failure to do so will result in loss of all buffered poller
195+
> data since the last flush.
196+
197+
If you are planning on system maintenance and are using MEMORY storage in
198+
MySQL or MariaDB, flush your Boost Cache before the system is taken offline.
199+
Login to the Cacti system as root and run the following:
185200

186201
```console
187202
cd /var/www/html/cacti

Cacti-SSL-Configuration.md

Lines changed: 132 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,149 @@
1-
# Configuring and enabling SSL for Cacti with a self-signed certificate
1+
# Configuring SSL for Cacti
22

3-
Enabling SSL for Cacti is done at the web server level. An example HTTPS
4-
configuration for Apache is as follows:
3+
Enabling HTTPS for Cacti is done at the web server level. This page covers
4+
self-signed certificates for internal use and Let's Encrypt for public-facing
5+
servers.
56

6-
```bash
7-
yum install -y mod_ssl
8-
openssl genrsa -out ca.key 4096
9-
openssl req -new -key ca.key -out ca.csr
10-
openssl x509 -req -days 700 -in ca.csr -signkey ca.key -out ca.crt
11-
cp ca.crt /etc/pki/tls/certs
12-
cp ca.key /etc/pki/tls/private/ca.key
13-
cp ca.csr /etc/pki/tls/private/ca.csr
7+
> **Note**: If using multiple Data Collectors, all must have HTTPS enabled for
8+
> the remote polling feature to work correctly.
9+
10+
## Self-Signed Certificate (Internal Use)
11+
12+
Self-signed certificates are suitable for internal networks where you control
13+
the clients. Use ECDSA (secp384r1) for best performance, or RSA 4096 if your
14+
environment requires RSA.
15+
16+
### ECDSA (recommended)
17+
18+
```shell
19+
# RHEL/Rocky/AlmaLinux
20+
dnf install -y mod_ssl
21+
22+
# Generate a 384-bit EC private key and self-signed certificate (valid 3 years)
23+
openssl req -x509 -nodes -newkey ec -pkeyopt ec_paramgen_curve:P-384 \
24+
-keyout /etc/pki/tls/private/cacti.key \
25+
-out /etc/pki/tls/certs/cacti.crt \
26+
-days 1095 \
27+
-subj "/CN=cacti.example.com" \
28+
-addext "subjectAltName=DNS:cacti.example.com"
29+
30+
chmod 600 /etc/pki/tls/private/cacti.key
1431
```
1532

16-
> **Note on key size**: A 4096-bit RSA key is used above. NIST SP 800-57
17-
> recommends a minimum of 3072 bits for RSA keys through 2030. 2048-bit keys
18-
> are below that threshold and should not be used for new certificates.
33+
### RSA (alternative)
1934

20-
Then we need to update the Apache SSL configuration file:
35+
```shell
36+
# 4096-bit RSA — use when EC is not supported by your TLS client pool
37+
openssl req -x509 -nodes -newkey rsa:4096 \
38+
-keyout /etc/pki/tls/private/cacti.key \
39+
-out /etc/pki/tls/certs/cacti.crt \
40+
-days 1095 \
41+
-subj "/CN=cacti.example.com" \
42+
-addext "subjectAltName=DNS:cacti.example.com"
2143

22-
```ini
23-
vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf
24-
SSLCertificateFile /etc/pki/tls/certs/ca.crt
25-
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
44+
chmod 600 /etc/pki/tls/private/cacti.key
2645
```
2746

28-
Restart the httpd service:
47+
> **Debian/Ubuntu paths**: the commands above use the RHEL layout
48+
> (`/etc/pki/tls/...`). On Debian/Ubuntu, write the key and certificate to
49+
> `/etc/ssl/private/cacti.key` and `/etc/ssl/certs/cacti.crt` instead, to match
50+
> the Apache `SSLCertificateKeyFile`/`SSLCertificateFile` paths shown below.
51+
52+
> **Key size**: RSA 2048-bit is below NIST SP 800-131A Rev 2 guidance for
53+
> long-term use. Use 4096-bit RSA or an ECDSA key.
54+
55+
## Apache Configuration
2956

30-
```bash
31-
systemctl restart httpd
57+
Update `/etc/httpd/conf.d/ssl.conf` (RHEL/Rocky/AlmaLinux) or
58+
`/etc/apache2/sites-available/cacti-ssl.conf` (Debian/Ubuntu):
59+
60+
```apache
61+
<VirtualHost *:443>
62+
ServerName cacti.example.com
63+
DocumentRoot /var/www/html/cacti
64+
65+
SSLEngine on
66+
# RHEL/Rocky/AlmaLinux cert paths:
67+
# SSLCertificateFile /etc/pki/tls/certs/cacti.crt
68+
# SSLCertificateKeyFile /etc/pki/tls/private/cacti.key
69+
# Debian/Ubuntu cert paths:
70+
SSLCertificateFile /etc/ssl/certs/cacti.crt
71+
SSLCertificateKeyFile /etc/ssl/private/cacti.key
72+
73+
# Require TLS 1.2 or 1.3; TLS 1.0 and 1.1 are prohibited (RFC 8996)
74+
SSLProtocol -all +TLSv1.2 +TLSv1.3
75+
76+
# TLS 1.2 cipher suites -- no RC4, 3DES, or export ciphers
77+
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:\
78+
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:\
79+
ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
80+
SSLHonorCipherOrder on
81+
82+
# TLS 1.3 cipher suites (SSLCipherSuite does not apply to TLS 1.3)
83+
SSLOpenSSLConfCmd Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
84+
</VirtualHost>
85+
86+
# Optional: redirect HTTP to HTTPS (uncomment to enable)
87+
#<VirtualHost *:80>
88+
# ServerName cacti.example.com
89+
# Redirect permanent / https://cacti.example.com/
90+
#</VirtualHost>
3291
```
3392

34-
After configuring the web server to accept HTTPS, you can enable HTTPS in the
35-
GUI.
93+
Restart Apache after editing:
3694

37-
> **Note for public-facing servers**: Instead of a self-signed certificate,
38-
> use a certificate from a trusted CA. [Certbot](https://certbot.eff.org/)
39-
> from Let's Encrypt provides free, automatically-renewed certificates and
40-
> is the recommended approach for any internet-accessible Cacti instance.
95+
```shell
96+
apachectl configtest
97+
systemctl restart httpd # RHEL/Rocky/AlmaLinux
98+
systemctl restart apache2 # Debian/Ubuntu
99+
```
41100

42-
---
101+
## Let's Encrypt (Public-Facing Servers)
43102

44-
**Note**: if using multiple pollers, all must have HTTPS enabled for the remote polling feature to work properly.
103+
For servers reachable from the internet, use Let's Encrypt for a
104+
browser-trusted certificate at no cost.
105+
106+
### RHEL/Rocky/AlmaLinux
107+
108+
```shell
109+
# certbot ships in EPEL on RHEL/Rocky/AlmaLinux, not in BaseOS/AppStream
110+
dnf install -y epel-release
111+
dnf install -y certbot python3-certbot-apache
112+
certbot --apache -d cacti.example.com
113+
```
114+
115+
### Debian/Ubuntu
116+
117+
```shell
118+
apt-get install -y certbot python3-certbot-apache
119+
certbot --apache -d cacti.example.com
120+
```
121+
122+
Certbot configures Apache and sets up automatic renewal. Verify auto-renewal
123+
works:
124+
125+
```shell
126+
certbot renew --dry-run
127+
```
128+
129+
## Verifying the Configuration
130+
131+
After restarting Apache, confirm TLS is working and that weak protocols are
132+
disabled:
133+
134+
```shell
135+
# Check the certificate and protocol support
136+
openssl s_client -connect cacti.example.com:443 -tls1_2 < /dev/null
137+
openssl s_client -connect cacti.example.com:443 -tls1 < /dev/null # should fail
138+
```
139+
140+
For a comprehensive scan, use [SSL Labs](https://www.ssllabs.com/ssltest/) on
141+
public servers or `testssl.sh` on internal hosts:
142+
143+
```shell
144+
# testssl.sh (download from https://testssl.sh/)
145+
./testssl.sh cacti.example.com
146+
```
45147

46148
---
47149

Data-Collectors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ of **Data Collectors** they are:
1313
firewall or security policies. The **Remote Data Collectors** are
1414
also referred to as **Remote Pollers**.
1515

16-
Due to the design of the Cacti **Remote Data Collector**, somone at the
16+
Due to the design of the Cacti **Remote Data Collector**, someone at the
1717
remote site, can actually login to that **Data Collector** and interact
1818
with it as if their **Data Collector** was the **Main Data Collector**.
1919
Additionally, if for some reason the **Main Data Collector** becomes

Data-Input-Methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ be executed as the user the data gatherer runs as. Sometimes a script may work
169169
correctly when executed as root, but fails due to permissions problems when
170170
executed as a less privileged user.
171171

172-
## Walkthough
172+
## Walkthrough
173173

174174
You can find a detailed example of how to create a complete Graph from
175175
simple command output in the following example

Data-Source-Templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ see
3030

3131
## GAUGE
3232

33-
GUAGE is for things like temperatures or number of people in a room or the value
33+
GAUGE is for things like temperatures or number of people in a room or the value
3434
of a RedHat share.
3535

3636
## COUNTER
@@ -116,7 +116,7 @@ documentation page.
116116
![Data-Source-Templates](images/datasource-template.png)
117117

118118
What is also an important setting is the internal data source name. This will be
119-
used to asociate the Data source with the Graph template. so be sure to name is
119+
used to associate the Data source with the Graph template. so be sure to name is
120120
something that is recognizable.
121121

122122
![Data-Source-Templates](images/datasource-template2.png)

Data-Sources.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ to management then clicking on devices.
2828

2929
You can also see the total amount of data sources by checking the poller stats
3030
on the system. Click the log tab and filter by stats and lookout for the below
31-
messege
31+
message
3232

3333
```console
3434
2019/05/24 17:21:11 - SYSTEM STATS: Time:9.5913 Method:spine Processes:2 Threads:2 Hosts:14 HostsPerProcess:7 DataSources:162 RRDsProcessed:117
@@ -45,14 +45,20 @@ devices. e.g. 1 minute or 5 Minute polls
4545
Here is the approximate amount of storage you can expect to consume per data
4646
source
4747

48-
| Polling time | Retention | File size | Polling time | Retention | File size |
49-
| -----------: | --------- | --------: | -----------: | --------- | --------: |
50-
| 30 second | Daily | 48kb | 30 second | Weekly | 43kb |
51-
| 30 second | Monthly | 46kb | 30 second | Yearly | 140kb |
52-
| 1 minute | Daily | 93kb | 1 minute | Weekly | 45kb |
53-
| 1 minute | Monthly | 47kb | 1 minute | Yearly | 140kb |
54-
| 5 minute | Daily | 19b | 5 minute | Weekly | 22kb |
55-
| 5 minute | Monthly | 25kb | 5 minute | Yearly | 26kb |
48+
| Polling time | Retention | File size |
49+
| -----------: | --------- | --------: |
50+
| 30 second | Daily | 48kb |
51+
| 30 second | Weekly | 43kb |
52+
| 30 second | Monthly | 46kb |
53+
| 30 second | Yearly | 140kb |
54+
| 1 minute | Daily | 93kb |
55+
| 1 minute | Weekly | 45kb |
56+
| 1 minute | Monthly | 47kb |
57+
| 1 minute | Yearly | 140kb |
58+
| 5 minute | Daily | 19kb |
59+
| 5 minute | Weekly | 22kb |
60+
| 5 minute | Monthly | 25kb |
61+
| 5 minute | Yearly | 26kb |
5662

5763
### Viewing all Data sources by device
5864

0 commit comments

Comments
 (0)