Skip to content

feat(support): add technical support information page#7174

Open
somethingwithproof wants to merge 12 commits into
Cacti:1.2.xfrom
somethingwithproof:feat/1.2.x-support-page
Open

feat(support): add technical support information page#7174
somethingwithproof wants to merge 12 commits into
Cacti:1.2.xfrom
somethingwithproof:feat/1.2.x-support-page

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented May 29, 2026

Copy link
Copy Markdown
Contributor

Adds support.php, an authenticated diagnostics page that summarises rrdtool/snmp versions, recent database queries, and running background processes for support triage.

Carved out of #7172, which bundled it with unrelated changes; this is the standalone page so it can be reviewed on its own. Adds a filter_sanitize() wrapper on the table filter for the page's sanitize-only path.

Base: 1.2.x. Page requires authentication.

Copilot AI review requested due to automatic review settings May 29, 2026 15:49
@TheWitness

Copy link
Copy Markdown
Member

Merge conflicts @somethingwithproof, can you show a screen shot of the example support page?

@somethingwithproof

Copy link
Copy Markdown
Contributor Author

Rebased onto current 1.2.x, the conflicts are cleared. Screenshot of the support page to follow.

@somethingwithproof somethingwithproof force-pushed the feat/1.2.x-support-page branch 2 times, most recently from 7e60f01 to 2c2474f Compare June 14, 2026 20:42
Adds support.php, an authenticated diagnostics page (rrdtool/snmp versions,
recent database queries, running background processes), plus a filter_sanitize()
wrapper on the table filter for the page's sanitize-only path.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…stic output

Without a realm mapping the page denied every user; htmle() does not exist on 1.2.x so the escaping calls were fatal.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The 1.2.x sites table has no disabled column, so the second poller query failed
with 'Unknown column s.disabled'. Reuse the $sql_where guard the first query in
this function already builds via db_column_exists('sites', 'disabled').

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
1.2.x's CactiTableFilter does not register a 'page' field, so get_request_var('page')
returns '' and '' - 1 throws a TypeError under PHP 8 in show_database_processes() and
show_cacti_processes(). Floor it at page 1 (offset 0), matching develop's default.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
proc_get_status() can return without a populated exit_code on some paths, so the
unguarded read logs 'Undefined array key exit_code'. The support page is the first
caller to exercise it during the page crawl. Default to -1.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
1.2.x cacti_exec() logs any stderr as a SYSTEM WARNING, and 'snmpget -V' (and
rrdtool/spine usage banners) write to stderr, tripping the page-crawl log gate.
Use exec()/shell_exec(... 2>&1) with cacti_escapeshellcmd, the same version-probe
pattern already used in utilities.php and on develop.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The page reads rrdtool/net-snmp/spine versions via exec/shell_exec with
cacti_escapeshellcmd on admin-only path settings (the develop support.php and
utilities.php pattern). Add the three sites to the sink inventory baseline.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…eline

Same three cacti_escapeshellcmd-guarded version probes as the sink inventory
refresh, registered in the architectural hotspots baseline.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the feat/1.2.x-support-page branch from 2c2474f to d9b39ae Compare June 15, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants