Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!-- translations:start -->
[English](README.md) | [简体中文](docs/i18n/zh-CN/README.md) | [हिन्दी](docs/i18n/hi-IN/README.md) | [Español (España)](docs/i18n/es-ES/README.md) | [Español (Latinoamérica)](docs/i18n/es-419/README.md) | [العربية](docs/i18n/ar-SA/README.md)
<!-- translations:end -->

# plugin_redfish

A Cacti 1.2 plugin that brings server power draw, inlet temperature, fan state, and power supply health from baseboard management controllers (BMCs) into Cacti as ordinary devices, data sources, and graphs, using Redfish with an optional IPMI fallback. Thold and Maint then alert on and suppress them, and a later phase adds rack-level power totals.
Expand All @@ -7,7 +11,7 @@ A Cacti 1.2 plugin that brings server power draw, inlet temperature, fan state,
### What milestone 2 ships

- Install, upgrade, disable, and uninstall through Cacti's plugin API, with tables kept on uninstall unless the setting is cleared. On PHP older than 8.2 the plugin refuses to install or enable and says why.
- Realms "Redfish View" (health page) and "Redfish Admin" (BMCs and credentials pages), and settings under Configuration > Settings > Redfish.
- Realms "Redfish View" (health page), "Redfish Operator" (operations page), and "Redfish Admin" (BMCs and credentials pages), and settings under Configuration > Settings > Redfish.
- A BMC registry with CSV import and JSON export. Import files must not contain passwords; credentials are referenced by name.
- Credentials stored encrypted with AES-256-GCM. The key is a file outside the database, `/etc/cacti/redfish-vault.key` by default, holding 64 hexadecimal characters (`openssl rand -hex 32`) or exactly 32 random bytes, owned by the poller user, not readable by other users, in a directory only the poller user or root can write. A key of 32 printable characters is refused as a passphrase. **Back up the key file with the database**; without it every stored password must be entered again.
- TLS verification on by default, with a per-BMC CA bundle or SPKI SHA-256 pin. A logged, per-BMC unverified opt-out stays on the health page as a warning.
Expand All @@ -28,6 +32,28 @@ A Cacti 1.2 plugin that brings server power draw, inlet temperature, fan state,

Deleting a device unmaps its BMC and keeps the BMC and its cache. Deleting a BMC, or uninstalling the plugin, keeps its device and graphs.

## Access roles

| Realm | Access |
| --- | --- |
| Redfish View | Existing monitoring pages. |
| Redfish Operator | Monitoring plus the Operations page and personal triage acknowledgments. |
| Redfish Admin | Operator access plus the existing configuration and administrative actions. |

After copying upgrade files, open the Plugins page as an administrator to register
the new realm. Assign the Operator realm explicitly under **Configuration > Users** or user groups.
Upgrades retain the existing View and Admin realm IDs and grants. Admin access
inherits Operator access, and Operator access inherits View access on each request;
this does not add stored grants to users or groups. Plugin settings also require
Redfish Admin access in addition to Cacti's Settings permission.

Cacti device permissions still limit the rows and actions available to each user; unmapped objects require an administrator. Operators can release a collection hold on a permitted BMC for the next scheduled run.
Credentials, configuration, mapping, deletion and other administrative changes
remain in the administrative pages. Acknowledgments last only in the current
user's session, for at most one hour and only while the same observation remains
fresh. New or changed observations invalidate them. They never mark a failed
measurement healthy or suppress alerts.

## Why

Every server has a BMC that reports power and thermal state independently of the operating system, so it keeps answering when the OS is down. The data serves capacity and cost tracking, early warning of a failed fan or power supply, and, in high-performance computing, power-capping decisions. The plugin is not HPC-specific.
Expand All @@ -38,7 +64,7 @@ Cacti covers part of this today:
- **A credential type without a collector.** plugin_credentials defines an "IPMI / Redfish (BMC)" credential but reads no BMC.
- **No rack-level view.** Cacti core has no rack object; a device has a free-text `location` field.

The plugin polls BMCs out of band from Cacti's poll cycle, caches normalized readings, and exposes them through a script server data query and summary data sources. It reuses Cacti's graphing, permissions, Thold, Maint, and remote data collectors, and does not change BMC state.
The plugin polls BMCs out of band from Cacti's poll cycle, caches normalized readings, and exposes them through a script server data query and summary data sources. It reuses Cacti's graphing, permissions, Thold, and Maint, and does not change BMC state. Remote data collector support is planned for phase 4; current collection runs on the main poller only.

## Planned scope

Expand Down
2 changes: 1 addition & 1 deletion docs/PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ Plugin code is object-oriented where Cacti's plugin contract allows it. No maint
- Page scripts, which include `include/auth.php`, read request variables with `get_filter_request_var()`, and call a page class.
- The script server input function and the collector CLI entry point.

**Layout.** Classes live in `lib/*.php` under `Somethingwithproof\Redfish` (milestone 2 diverged from the `Cacti\Redfish` named here and in issue 33; see [ADR 0014](decisions/0014-plugin-name-namespace-and-provisional-harness.md)), one class per file, loaded by a small `spl_autoload_register()` loader registered only after the PHP version check. No Composer runtime dependency is added. Files stay at depth 2 or less because the gettext build scans only `find . -maxdepth 2`. Settings use `config_settings`, logging uses `cacti_log()` with a `REDFISH` tag, strings use the `redfish` text domain, and realms are "Redfish View" and "Redfish Admin". The slug and namespace are provisional until decision #12.
**Layout.** Classes live in `lib/*.php` under `Somethingwithproof\Redfish` (milestone 2 diverged from the `Cacti\Redfish` named here and in issue 33; see [ADR 0014](decisions/0014-plugin-name-namespace-and-provisional-harness.md)), one class per file, loaded by a small `spl_autoload_register()` loader registered only after the PHP version check. No Composer runtime dependency is added. Files stay at depth 2 or less because the gettext build scans only `find . -maxdepth 2`. Settings use `config_settings`, logging uses `cacti_log()` with a `REDFISH` tag, strings use the `redfish` text domain, and realms are "Redfish View", "Redfish Operator" and "Redfish Admin". The slug and namespace are provisional until decision #12.

**As built in milestone 2.** The table above was a forecast. The shipped classes differ: normalization is one pure `Normalizer` with a rule per source instead of separate new and legacy normalizers; discovery is `Discoverer` producing a stored `DiscoveryPlan`; collection is `Collector` with `LeaseRepository`, `HealthRepository`, `DiscoveryRepository`, and `ReadingRepository`; credentials are `CredentialRepository`, `CredentialStore`, and `Vault`; HTTP is `SocketTransport` behind `GuardedTransport` and `OperationGuard`. `IpmiClient`, `Rack`, and `RackRepository` arrive with their phases.

Expand Down
Loading
Loading