prometheus
Schema Prometheus
Prometheus can be used to define monitoring requirements
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
interval The time interval which Prometheus scrapes metrics data. Only applicable when operator mode is set to true. When operator mode is set to false, the scraping interval can only be set in the scraping job configuration, which kusion does not have permission to manage directly. | str | Prometheus global scraping interval, which should be 1m if not explicitly set | optional |
timeout The timeout when Prometheus scrapes metrics data. Only applicable when operator mode is set to true. When operator mode is set to false, the scraping timeout can only be set in the scraping job configuration, which kusion does not have permission to manage directly. | str | Prometheus global scraping timeout, which should be 10s if not explicitly set | optional |
path The path to scrape metrics from. | str | Prometheus global scraping path, which should be /metrics if not explicitly set | optional |
port The port to scrape metrics from. When using Prometheus operator, this needs to be the port NAME. Otherwise, this can be a port name or a number. | str | Container ports when scraping pod (monitorType is pod); Service port when scraping service (monitorType is service) | optional |
scheme The scheme to scrape metrics from. Possible values are http and https. | "http" | "https" | http | optional |
Examples
import catalog.models.schema.v1.monitoring as m
monitoring: m.Prometheus{
interval: "30s"
timeout: "15s"
path: "/metrics"
port: "web"
scheme: "http"
}