Code Monkey home page Code Monkey logo

prometheus-sd-dcosl4lb's Introduction

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

prometheus-sd-dcosl4lb's People

Contributors

minyk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.