VictoriaMetrics / operator

Kubernetes operator for Victoria Metrics
Apache License 2.0
429 stars 143 forks source link

How can scrape support consul through operator #847

Closed leogoing closed 6 months ago

leogoing commented 9 months ago

hellow guys, consul configuration is not found in scrape crd. Can anyone help me

Haleygo commented 9 months ago

Hi, I'm afraid it's not available now, should be added in https://github.com/VictoriaMetrics/operator/issues/803

leogoing commented 9 months ago

ok, thank u very much

f41gh7 commented 6 months ago

Must be fixed at v0.43.0 release

Operator now supports scrape config, it's possible to configure consul discovery via it. See full docs at https://docs.victoriametrics.com/operator/api/#vmscrapeconfigspec

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMScrapeConfig
metadata:
  name: example-scrape-consul
  labels:
    some-label: new 
  annotations:
    scrape: annotation
spec:
  staticConfigs: []
  fileSDConfigs: []
  httpSDConfigs: []
  kubernetesSDConfigs: []
  consulSDConfigs:
    - server: http://consul.consul.svc:8081
  dnsSDConfigs: []
  ec2SDConfigs: []
  azureSDConfigs: []
  gceSDConfigs: []
  openstackSDConfigs: []
  digitalOceanSDConfigs: []
  relabelConfigs: []
  metricRelabelConfigs: []
  metricsPath: null
  scrapeInterval: "10s"
  scrapeTimeout: "30s"
  seriesLimit: 0
  sampleLimit: 0
  tlsConfig: null
  oauth2: null
  authorization: null
  basicAuth: null
  proxyURL: null
  follow_redirects: null
  vm_scrape_params: null