refactor: use deployment command names - #51
Merged
Conversation
Adds checks beyond reachability/splunkd, each independent (one failing check cannot crash the rest): - resource usage (CPU, memory) from /services/server/status/resource-usage/hostwide - per-partition disk space from /services/server/status/partitions-space - a clean-room internal-error-rate check over _internal (original SPL, not the proprietary Monitoring Console searches) Thresholds are named constants (calibration knobs). Checks carry a version (HEALTH_CHECKS_VERSION) so they can evolve as data. Closes #11
- The client now supports `Authorization: Splunk <sessionKey>` alongside Bearer tokens. config_from_env: SPLUNK_TOKEN -> Bearer (unchanged); else SPLUNK_SESSION_KEY -> the Splunk scheme. - `splunk auth login` mints a session key via /services/auth/login (username + password from env or a no-echo prompt, never a flag) and prints it; `auth status` reports the active scheme and target without revealing the secret. - Config-file profiles (stdlib INI): `--profile` / SPLUNK_PROFILE selects a [section] supplying url / token / session_key / app / owner. Precedence is flag > env > profile > default, applied per value. With no config file there is no change -- fully backward compatible. Closes #13
Add a 'kvstore' command group over a collection's data records -- records/get/insert/update/delete/purge -- treating KV Store data as a plain JSON document store under /servicesNS/<owner>/<app>/storage/ collections/data/<collection>. This is distinct from the collection *schema*, which stays in the 'kvstore-collection' factory group. Reads default to the '-' namespace wildcard; writes require an explicit app (never the default 'search') and route through do_write for the dry-run/confirm/audit gate. Reuses the client's get_json/write_json so JSON bodies and array responses bypass the Splunk entry[].content envelope. Closes #9
…restart and settings (#10) Add platform-level inspect and control: - 'cluster status' / 'shcluster status' summarize indexer- and search-head-cluster health (reads). - 'license list|get|usage' report licenses and pool usage (reads). - 'server restart' triggers a gated restart via /server/control/restart. - 'server settings get|set' read and (gated) change system settings; 'set' takes repeatable --set KEY=VALUE and sends only changed keys. These are system-level resources (not namespaced). Every mutation routes through do_write for the dry-run/confirm/--yes/audit gate; restart and settings-set never fire without explicit confirmation. 'message' already ships via the registry/factory and is left unchanged. Closes #10
Add the two parts of app/deploy that the CRUD specs cannot cover: - 'app install --file PATH | --url URL [--update]' installs an app via /services/apps/appinstall (Splunk reads a local path server-side or fetches an http(s) URL); exactly one source is required. - 'deploy' group: 'client list', 'serverclass list|get|create|update', and 'reload' for the deployment server. App lifecycle (list/get/enable/disable/remove) keeps shipping via the registry/factory; this adds only the hand-written multipart-ish install and the deployment-server endpoints. Server-class settings are taken as free-form --set KEY=VALUE so no field shape is assumed. Every mutation routes through do_write for the dry-run/confirm/--yes/audit gate. Closes #5
…objects (#6, #8) Finish the hand-written pieces the CRUD specs cannot express: HEC (#6): - 'hec rotate NAME' regenerates a token's secret (printed once; the secret is never written to the audit log). - 'hec global-enable' / 'global-disable' toggle the global HEC input. Knowledge objects (#8): - New 'tag' and 'datamodel' registry/factory groups (namespaced). - 'datamodel accelerate NAME --enable/--disable' toggles acceleration. - 'lookup upload --file CSV --app APP' registers a lookup table file (namespaced; requires an app). Every mutation routes through do_write for the dry-run/confirm/--yes/ audit gate. Large or version-variable settings (tag linkage, datamodel JSON) are taken as free-form --set KEY=VALUE rather than modeled fields. Closes #6 Closes #8
… feat/phase-8-health-depth
…epth # Conflicts: # .env.example # src/vct_splunk/cli.py # src/vct_splunk/commands/context.py # tests/unit/test_client.py # tests/unit/test_health.py
…feat/phase-10-kvstore-data # Conflicts: # src/vct_splunk/cli.py # tests/unit/test_commands.py
… feat/phase-12-apps-deploy # Conflicts: # tests/unit/test_commands.py
…feat/phase-13-hec-knowledge # Conflicts: # src/vct_splunk/cli.py # tests/unit/test_commands.py
# Conflicts: # .env.example
# Conflicts: # tests/unit/test_resource_factory.py
…ommand-names # Conflicts: # CHANGELOG.md # src/vct_splunk/cli.py # src/vct_splunk/commands/deploy.py # src/vct_splunk/core/acs/openapi/adminconfig-v2.json # src/vct_splunk/core/acs/operations.py # tests/integration/test_acs_public_spec.py # tests/unit/test_acs.py # tests/unit/test_app_deploy_contracts.py # tests/unit/test_cli_matrix.py # tests/unit/test_commands.py
…ommand-names # Conflicts: # tests/cli_catalog.py
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.
Summary
deploycommand area withdeploy-serveranddeploy-clientValidation
PYTHONPATH=src .venv/bin/pytest tests/unit/test_app_deploy_contracts.py tests/unit/test_commands.py.venv/bin/ruff check ….venv/bin/ruff format --check ….venv/bin/pyrightgit diff --check