Skip to content

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 ​

ArgTypeNotes
portunknowncontainer port number (added as "metrics") or the name of an existing container port

Optional Args ​

ArgTypeDefaultNotes
pathstring"/metrics"-
intervalstring"30s"-
scrapeTimeoutnullnull-
schemenullnullhttp or https
kindstring"PodMonitor"PodMonitor (prometheus-operator) or PodMonitoring (Google Managed Prometheus)
monitorLabelsattrset{ }labels your Prometheus selects monitors by, e.g.
allowFromlist[ ]services.policies.ingress rules for the scraper; their ports become the metrics port

Back to Helper Index