operator icon indicating copy to clipboard operation
operator copied to clipboard

How can scrape support consul through operator

Open leogoing opened this issue 1 year ago • 2 comments

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

leogoing avatar Jan 11 '24 07:01 leogoing

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

Haleygo avatar Jan 15 '24 07:01 Haleygo

ok, thank u very much

leogoing avatar Jan 17 '24 01:01 leogoing

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

f41gh7 avatar Apr 18 '24 09:04 f41gh7