Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Prometheus Service Discovery using DC/OS L4LB

Notifications You must be signed in to change notification settings

minyk/prometheus-sd-dcosl4lb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus-sd-dcosl4lb

What is for?

Find prometheus exporters using DC/OS's L4LB domain name.

How to

Build

# make docker

Use

Deploy docker image on DC/OS. The network is should be "host" mode. This app scans http://127.0.0.1:62080/v1/vips endpoint, finds VIP domain name that starts with prefix: prometheus, collects their container ip and port, then writes JSON file for prometheus's file_sd.

$ prometheus-sd-dcosl4lb-linux -h
usage: sd adapter usage [<flags>]

Tool to generate file_sd target files for DC/OS L4LB SD mechanisms.

Flags:
  -h, --help                Show context-sensitive help (also try --help-long and --help-man).
      --l4lb.prefix="prometheus"
                            Prefix of DC/OS L4LB domain name for prometheus exporters. e.g.
                            <l4lb.prefix>.test.marathon.l4lb.thisdcos.directory.
      --l4lb.framework="*"  Framework name part of DC/OS L4LB domain name. e.g.
                            prometheus.test.<l4lb.framework>.l4lb.thisdcos.directory. To capture any frameworks, use "*" for name.
      --output.file="custom_sd.json"
                            Output file for file_sd compatible file.
      --listen.address="localhost:62080"
                            The address the DC/OS L4LB HTTP API is listening on for requests.
  • The result JSON file example:
[
    {
        "targets": [
            "10.4.22.11:80",
            "10.4.94.3:80"
        ],
        "labels": {
            "__address__": "prometheus-testpromsd-test.marathon.l4lb.thisdcos.directory:80",
            "framework_name": "marathon",
            "service_id": "prometheus-testpromsd-test"
        }
    }
]

Acknowledgement

About

Prometheus Service Discovery using DC/OS L4LB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published