Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(kubernetes-operator): show each InfisicalStaticSecret metric in an accordion with its queries

DimitrisStaratzisaa9d62698e50
diff --git a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
index 5bc6fedcf1..66857b8f6c 100644
--- a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
+++ b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
@@ -1056,37 +1056,58 @@ secrets.infisical.com/auto-reload: "true"
## Metrics
-The operator exposes Prometheus metrics about each `InfisicalStaticSecret`, which you can use to count your resources, alert when a sync fails, and track how workloads use automatic redeployment. To collect the metrics, [enable the ServiceMonitor](/integrations/platforms/kubernetes/overview#metrics-and-prometheus).
-
-- `infisical_static_secrets` - One series per resource with the value `1`, labeled with `status` (`synced`, `failed`, or `unknown` before the first sync) and `instant_updates` (`true` or `false`)
-- `infisical_static_secret_refresh_interval_seconds` - The resource's `refreshInterval`, in seconds
-- `infisical_static_secret_auto_reload_workloads` - Number of workloads with [automatic redeployment](#automatic-redeployment) enabled that consume the resource's managed Secret or ConfigMap
-- `infisical_static_secret_workload_redeploys_total` - Number of workloads that automatic redeployment has restarted
-
-Each of these metrics has `namespace` and `name` labels that identify the `InfisicalStaticSecret`.
+The operator exposes Prometheus metrics about each `InfisicalStaticSecret`, which you can use to count your resources, alert when a sync fails, and track how workloads use automatic redeployment. To collect the metrics, [enable the ServiceMonitor](/integrations/platforms/kubernetes/overview#metrics-and-prometheus). Each metric has `namespace` and `name` labels that identify the `InfisicalStaticSecret`.
<Note>
These metrics require operator v0.11.14 or later.
</Note>
-### Example queries
+<AccordionGroup>
+ <Accordion title="infisical_static_secrets">
+ One series per resource with the value `1` and the following labels:
-```promql
-# InfisicalStaticSecret resources
-count(infisical_static_secrets)
+ - `status`: the result of the resource's last sync (`synced`, `failed`, or `unknown` before the first sync)
+ - `instant_updates`: `true` if `syncOptions.instantUpdates` is enabled, otherwise `false`
-# InfisicalStaticSecret resources whose last sync failed (use as an alert expression)
-infisical_static_secrets{status="failed"}
+ ```promql
+ # InfisicalStaticSecret resources
+ count(infisical_static_secrets)
-# Average refresh interval (seconds)
-avg(infisical_static_secret_refresh_interval_seconds)
+ # InfisicalStaticSecret resources whose last sync failed (use as an alert expression)
+ infisical_static_secrets{status="failed"}
-# InfisicalStaticSecret resources with automatic redeployment enabled on at least one workload
-count(infisical_static_secret_auto_reload_workloads > 0)
+ # InfisicalStaticSecret resources with instant updates enabled
+ count(infisical_static_secrets{instant_updates="true"})
+ ```
+ </Accordion>
-# Workloads restarted by automatic redeployment in the last 24 hours
-sum(increase(infisical_static_secret_workload_redeploys_total[24h]))
-```
+ <Accordion title="infisical_static_secret_refresh_interval_seconds">
+ The resource's `syncOptions.refreshInterval`, in seconds.
+
+ ```promql
+ # Average refresh interval (seconds)
+ avg(infisical_static_secret_refresh_interval_seconds)
+ ```
+ </Accordion>
+
+ <Accordion title="infisical_static_secret_auto_reload_workloads">
+ The number of workloads with [automatic redeployment](#automatic-redeployment) enabled that consume the resource's managed Secret or ConfigMap.
+
+ ```promql
+ # InfisicalStaticSecret resources with automatic redeployment enabled on at least one workload
+ count(infisical_static_secret_auto_reload_workloads > 0)
+ ```
+ </Accordion>
+
+ <Accordion title="infisical_static_secret_workload_redeploys_total">
+ The number of workloads that automatic redeployment has restarted.
+
+ ```promql
+ # Workloads restarted by automatic redeployment in the last 24 hours
+ sum(increase(infisical_static_secret_workload_redeploys_total[24h]))
+ ```
+ </Accordion>
+</AccordionGroup>
## Migrating from InfisicalSecret