/sapcc:sapcc-metricsfrom sapcc
Maia metrics querying for SAP Converged Cloud (Prometheus-as-a-Service). Triggers: metrics, monitoring, prometheus, promql, CPU usage, memory usage, maia, dashboard, alert, performance
Ships in sapcc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Maia is SAP CC's multi-tenant Prometheus-as-a-Service. Same PromQL query language, but tenant-isolated — each project sees only its own metrics. Read-only via MCP.
| Tool | Purpose | Key Parameters |
|---|---|---|
maia_query | Execute instant PromQL query | query, time (optional) |
maia_query_range | Execute range PromQL query over time window | query, start, end, step |
maia_label_values | Get values for a specific label | label (e.g., __name__, instance, job) |
maia_metric_names | List all available metric names for current project | — |
Maia enforces tenant isolation via the OpenStack token. There is no way to query cross-project metrics. If you need fleet-wide data, check Limes for capacity or use cluster-level monitoring.
maia_query returns a single point in time. Use the time parameter to query a historical point. For time series data ("show me the last hour"), use maia_query_range with start, end, and step parameters instead.
Before writing PromQL, discover what's available. Different projects have different metrics. Never assume a metric exists — verify first.
Both return the list of available metric names. Use maia_label_values when you need values for other labels (instance, job, device, etc.).
Optional. Accepts RFC3339 (2024-03-15T10:00:00Z) or Unix timestamp (1710500400). Omitting it gives current values. For "what was CPU at 3am?" — pass the specific timestamp.
The API does not give helpful parse errors. If you get an error, validate your query syntax independently before blaming connectivity or permissions. Common mistakes: missing brackets, unbalanced quotes, typos in metric names.
Not all projects have the same instrumentation. A compute-heavy project might have node_cpu_seconds_total while a Kubernetes project has container_cpu_usage_seconds_total. Always discover first.
Queries that match many series (e.g., {__name__=~".+"}) can hit response size limits. Use specific label selectors to narrow: {instance="specific-host"}, {job="specific-job"}.
If the user asks "how much CPU is our whole team using?" — that requires cluster-level access or Limes. Maia only shows the current project's metrics. Redirect to quota tools for cross-project views.
1. maia_metric_names → see what's instrumented
2. Pick relevant metric name
3. maia_label_values(label="instance") → find dimensions
4. maia_label_values(label="job") → understand metric sources
1. maia_metric_names → find CPU/memory/disk metrics
2. maia_label_values(label="instance") → identify the server
3. maia_query(query='node_cpu_seconds_total{instance="<host>", mode="idle"}')
4. maia_query(query='node_memory_MemAvailable_bytes{instance="<host>"}')
5. maia_query(query='node_filesystem_avail_bytes{instance="<host>", mountpoint="/"}')
1. maia_query(query='rate(node_cpu_seconds_total{mode!="idle"}[5m])')
2. maia_query(query='avg by (instance) (rate(node_cpu_seconds_total{mode!="idle"}[5m]))')
Note: rate() requires a range vector but returns an instant vector — works with maia_query.
1. maia_metric_names → find relevant metrics (grep mentally)
2. maia_label_values(label="<relevant_label>") → explore dimensions
3. Write targeted PromQL with specific label selectors
4. Interpret the value in context (e.g., bytes → GiB, ratio → percentage)
Common patterns for SAP CC infrastructure metrics:
| Pattern | PromQL | Use Case |
|---|---|---|
| Rate of change | rate(metric[5m]) | Counter metrics (CPU, network bytes) |
| Average by instance | avg by (instance) (metric) | Reduce cardinality |
| Top N | topk(5, metric) | Find highest consumers |
| Threshold check | metric > 0.9 | Alert-style filtering |
| CPU usage % | 1 - rate(node_cpu_seconds_total{mode="idle"}[5m]) | Per-core idle inverse |
| Memory usage % | 1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) | Available/total ratio |
| Disk usage % | 1 - (node_filesystem_avail_bytes / node_filesystem_size_bytes) | Free/total ratio |
| Sum by label | sum by (job) (metric) | Aggregate across instances |
| Filter by regex | metric{label=~"pattern.*"} | Flexible label matching |
See references/promql-patterns.md for extended pattern library.
keystone_token_infotime param (defaults to now)[10m] instead of [1m]rate(metric[5m] missing closing )[5m] not (5m){label="value"} with quotess, m, h, d — not sec, min{__name__="metric.with.dots"}rate() or increase() to get meaningful valuesNaN or +Inf — division by zero in your query or absent denominator seriesMetrics reveal operational state: CPU patterns, memory pressure, disk growth rates, network traffic volumes, and deployment schedules. This data exposes:
Treat metric data as internal/confidential. Only query what's needed for the task at hand.
| Need | Service | Tool |
|---|---|---|
| Map instance label to server name | Nova | nova_get_server(<instance_id>) |
| Correlate resource usage with quota | Limes | limes_get_project_quota |
| Investigate anomalies in audit trail | Hermes | hermes_list_events |
| Network metrics correlation | Neutron | neutron_list_ports(device_id=<instance_id>) |
| User need | Action |
|---|---|
| PromQL query patterns for SAP CC | Read promql-patterns.md |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub notque/openstack-agent-toolkit --plugin sapcc19 skills in this plugin
/credential-setupCreate and securely store OpenStack application credentials for MCP server authentication.
Triggers: setup credentials, configure auth, application credential, MCP server setup,
first time setup, rotate credentials
/sapcc-auditAudit trail investigation on SAP Converged Cloud using Hermes. Triggers: audit, who changed, what happened, hermes, events, compliance, CADF, activity log, trace action, who did, what was done, event history
/sapcc-autoscalingAutoscaling operations via Castellum. Triggers: autoscaling, castellum, resize, scaling, threshold, auto-resize, capacity management. NOT for: manual quota changes (use sapcc-quota/Limes).
Other plugins' skills for the same job