hex.k8s.services.metrics ​
- Source: module
- Function count: 1
hex.k8s.services.metrics.scrape ​
Copy Call Skeleton ​
nix
(hex.k8s.services.metrics.scrape {
port = 8080;
})Required Args ​
| Arg | Type | Notes |
|---|---|---|
port | unknown | container port number (added as "metrics") or the name of an existing container port |
Optional Args ​
| Arg | Type | Default | Notes |
|---|---|---|---|
path | string | "/metrics" | - |
interval | string | "30s" | - |
scrapeTimeout | null | null | - |
scheme | null | null | http or https |
kind | string | "PodMonitor" | PodMonitor (prometheus-operator) or PodMonitoring (Google Managed Prometheus) |
monitorLabels | attrset | { } | labels your Prometheus selects monitors by, e.g. |
allowFrom | list | [ ] | services.policies.ingress rules for the scraper; their ports become the metrics port |