KosmoKrator

analytics

Prometheus CLI for Headless Automation

Use the Prometheus CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 7 read 0 write API token auth

Prometheus CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Prometheus CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Prometheus CLI for Headless Automation
kosmokrator integrations:configure prometheus --set api_token="$PROMETHEUS_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call prometheus.prometheus_list_alerts '{"filter":"example_filter","receiver":"example_receiver"}' --json

Discovery Before Execution

Agents and scripts can inspect Prometheus docs and schemas before choosing a function.

kosmo integrations:docs prometheus --json
kosmo integrations:docs prometheus.prometheus_list_alerts --json
kosmo integrations:schema prometheus.prometheus_list_alerts --json
kosmo integrations:search "Prometheus" --json
kosmo integrations:list --json

Useful Prometheus CLI Functions

FunctionTypeParametersDescription
prometheus.prometheus_list_alerts Read filter, receiver List Prometheus alerts. Optionally filter by alert state or label selectors. Returns alert names, states, labels, and annotations.
prometheus.prometheus_get_alert Read name Get a Prometheus alert by name. Returns the full alert definition including labels, annotations, and state.
prometheus.prometheus_list_rules Read type List Prometheus alerting and recording rules. Optionally filter by type. Returns rule groups with their rules and states.
prometheus.prometheus_get_rule Read name Get a Prometheus rule group by name. Returns the full rule group definition including all rules within the group.
prometheus.prometheus_list_targets Read state List Prometheus scrape targets. Optionally filter by state (active or dropped). Returns target health status, labels, and scrape info.
prometheus.prometheus_get_target Read instance Get a Prometheus target by its instance address. Returns target health, last scrape info, and discovery labels.
prometheus.prometheus_get_current_user Read none Get the current authenticated Prometheus user info. Useful for verifying authentication and retrieving user details.

Automation Notes

Related Prometheus CLI Pages