Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = func() Config { return Config{ MonitoringAssignment: MonitoringAssignmentConfig{ Client: MonitoringAssignmentClientConfig{ Name: "kuma_sd", URL: "grpc://localhost:5676", ApiVersion: mads.API_V1, }, }, Prometheus: PrometheusConfig{ OutputFile: "kuma.file_sd.json", }, } }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // MonitoringAssignment defines configuration related to Monitoring Assignment in Kuma. MonitoringAssignment MonitoringAssignmentConfig `yaml:"monitoringAssignment,omitempty"` // Prometheus defines configuration related to integration with Prometheus. Prometheus PrometheusConfig `yaml:"prometheus,omitempty"` }
Config defines configuration of the Prometheus service discovery adapter.
type MonitoringAssignmentClientConfig ¶
type MonitoringAssignmentClientConfig struct { // Address defines the address of Control Plane's Monitoring Assignment Discovery Service server. URL string `yaml:"url,omitempty" envconfig:"kuma_monitoring_assignment_client_url"` // Name this adapter should use when connecting to Monitoring Assignment server. Name string `yaml:"name,omitempty" envconfig:"kuma_monitoring_assignment_client_name"` // ApiVersion is the MADS API version served by the Monitoring Assignment server. ApiVersion string `yaml:"apiVersion,omitempty" envconfig:"kuma_monitoring_assignment_client_api_version"` }
MonitoringAssignmentClientConfig defines configuration of a Monitoring Assignment Discovery Service (MADS) client.
func (*MonitoringAssignmentClientConfig) Sanitize ¶
func (c *MonitoringAssignmentClientConfig) Sanitize()
func (*MonitoringAssignmentClientConfig) Validate ¶
func (c *MonitoringAssignmentClientConfig) Validate() (errs error)
type MonitoringAssignmentConfig ¶
type MonitoringAssignmentConfig struct { // Client defines configuration of a Monitoring Assignment Discovery Service (MADS) client. Client MonitoringAssignmentClientConfig `yaml:"client,omitempty"` }
MonitoringAssignmentConfig defines configuration related to Monitoring Assignment in Kuma.
func (*MonitoringAssignmentConfig) Sanitize ¶
func (c *MonitoringAssignmentConfig) Sanitize()
func (*MonitoringAssignmentConfig) Validate ¶
func (c *MonitoringAssignmentConfig) Validate() (errs error)
type PrometheusConfig ¶
type PrometheusConfig struct { // Path to an output file where Kuma Prometheus SD adapter should persists a list of scrape targets. // The same file path must be used on Prometheus side in a configuration of `file_sd` discovery mechanism. OutputFile string `yaml:"outputFile,omitempty" envconfig:"kuma_prometheus_output_file"` }
PrometheusConfig defines configuration related to integration with Prometheus.
In short, Kuma Prometheus SD adapter integrates with Prometheus via a shared file, where the former is a writer and the latter is a reader. For further details see https://github.com/prometheus/prometheus/tree/master/documentation/examples/custom-sd
func (*PrometheusConfig) Sanitize ¶
func (c *PrometheusConfig) Sanitize()
func (*PrometheusConfig) Validate ¶
func (c *PrometheusConfig) Validate() (errs error)
Click to show internal directories.
Click to hide internal directories.