feat(support): add technical support information page#7174
Open
somethingwithproof wants to merge 12 commits into
Open
feat(support): add technical support information page#7174somethingwithproof wants to merge 12 commits into
somethingwithproof wants to merge 12 commits into
Conversation
Member
|
Merge conflicts @somethingwithproof, can you show a screen shot of the example support page? |
4a80701 to
419b2bc
Compare
d81e395 to
ce277d7
Compare
Contributor
Author
|
Rebased onto current 1.2.x, the conflicts are cleared. Screenshot of the support page to follow. |
7e60f01 to
2c2474f
Compare
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>
2c2474f to
d9b39ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.