Skip to content

Service labels don't work without node info #68

@raiderx

Description

@raiderx

Is it correct that Server.go at lines 307 & 669 ignores additional service labels if NodeInfo is null?

I have service external-service-green that I want to monitor. I added additional label "appName", DFSL returns this label to DFM, but DFM ignores it.

2019/02/09 18:59:26 Processing: [
{"distribute":"true","port":"9090","replicas":"1","serviceDomain":"192.168.12.130","serviceName":"monitor_monitor","servicePath":"/monitor"},
{"distribute":"true","port":"3000","replicas":"1","reqPathSearch":"/grafana","serviceName":"monitor_grafana","servicePath":"/grafana/,/grafana/public,/grafana/api"},
{"appName":"external-service","distribute":"true","metricsPath":"/external-service/metrics","replicas":"1","scrapePort":"8080","serviceName":"external-service-green"}
]

I don't see label appName for target external-service-green:

global:
  scrape_interval: 10s
  scrape_timeout: 10s
  evaluation_interval: 1m
scrape_configs:
- job_name: external-service-green
  scrape_interval: 10s
  scrape_timeout: 10s
  metrics_path: /external-service/metrics
  scheme: http
  dns_sd_configs:
  - names:
    - tasks.external-service-green
    refresh_interval: 30s
    type: A
    port: 8080

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions