Giter VIP home page Giter VIP logo

yc-compute-sd's Introduction

Yandex Cloud Compute Instance Prometheus service discovery

Web service for discovery of computer instances in Yandex.Сloud

Environment variables:

  • YC_COMPUTE_SD_FOLDER_ID - Folder ID
  • YC_COMPUTE_SD_SERVICE_ACCOUNT_ID - Service account ID with compute.viewer role
  • YC_COMPUTE_SD_KEY_ID - Key ID in service account
  • YC_COMPUTE_SD_PRIVATE_KEY - Private part of key

Setup instances for service discovery

Add following labels to yandex.cloud instances:

  • prometheus_*_port=*: e.g. prometheus_node_exporter_port=9100
  • prometheus_job=*: e.g. prometheus_job=my_awesome_service

Without at least one prometheus_*_port label and prometheus_job label targets will be not discovered by service

Example response (GET /api/v1/discover) with following labels on yc instance:

  • prometheus_node_exporter_port=9100
  • prometheus_awesome_service_exporter_port=8080
  • prometheus_job=awesome-service
[
  {
    "targets": [
      "127.0.0.1:9100",
      "127.0.0.1:8080"
    ],
    "labels": {
      "yc_id": "1234567890",
      "yc_folder_id": "1234567890",
      "yc_zone_id": "ru-central1-a",
      "yc_fqdn": "awesome-service-app-1.ru-central1.internal",
      "hostname": "awesome-service-app-1",
      "job": "awesome-service"
    }
  }
]

yc-compute-sd's People

Contributors

antkey1 avatar

Watchers

 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.