Sign inSign up

kennyopennix/prometheus-exporter-yandex-cloud

By kennyopennix

Updated about 4 years ago

Prometheus exporter for Yandex Cloud

Image
0

277

kennyopennix/prometheus-exporter-yandex-cloud repository overview

Prometheus exporter for Yandex cloud

Simple Prometheus for Yandex cloud metrics, based on prometheusMetrics

Pre-requirements

Environments variables

Variable nameTypeSensitiveMandatoryDescription
YC_TOKENstringtruetrueYandex Cloud IAM token
YC_FOLDER_IDstringfalsetrueA folder is a space where Yandex Cloud resources are created and grouped.
YC_SERVICESlistfalsefalseList of services for getting metrics.

How to run

Locally

Checkout repository

Install dependencies

pip install -r requirements.txt

Export YC_TOKEN and YC_FOLDER_ID

export YC_TOKEN="your_token"
export YC_FOLDER_ID="directory_id"

Run exporter

python main.py

After up and running exporter will listen on 0.0.0.0 port 9000

Build docker image
docker build . -t some_name:tag
Run via docker compose

Export YC_TOKEN and YC_FOLDER_ID

export YC_TOKEN="your_token"
export YC_FOLDER_ID="directory_id"

Run

docker-compose up -d --build
Use docker hub image
docker pull kennyopennix/prometheus-exporter-yandex-cloud

Endpoints

/metrics/all - Get all metrics /metrics/<service_name> - Get metrics for some service for example, getting metrics for compute /metrics/compute

List of services

  • application-load-balancer — Application Load Balancer.
  • audit-trails — Audit Trails.
  • certificate-manager — Certificate Manager.
  • compute — Compute Cloud.
  • container-registry — Container Registry.
  • data-proc — Data Proc.
  • data-streams — Data Streams.
  • data-transfer — Data Transfer.
  • iam — Identity and Access Management.
  • interconnect — Cloud Interconnect.
  • kms — Key Management Service.
  • logging — Cloud Logging.
  • managed-clickhouse — Managed Service for ClickHouse.
  • managed-elasticsearch — Managed Service for Elasticsearch.
  • managed-greenplum — Managed Service for Greenplum®.
  • managed-kafka — Managed Service for Apache Kafka®.
  • managed-kubernetes — Managed Service for Kubernetes.
  • managed-mongodb — Managed Service for MongoDB.
  • managed-mysql — Managed Service for MySQL.
  • managed-postgresql — Managed Service for PostgreSQL.
  • managed-redis — Managed Service for Redis.
  • managed-sqlserver — Managed Service for SQL Server.
  • message-queue — Message Queue.
  • monitoring — Yandex Monitoring.
  • network-load-balancer — Network Load Balancer.
  • serverless-apigateway — API Gateway.
  • serverless-containers — Serverless Containers.
  • serverless-functions — Cloud Functions.
  • speechkit — SpeechKit.
  • storage — Object Storage.
  • translate — Translate.
  • vision — Vision.
  • ydb — Managed Service for YDB.

Configuration for prometheus

global:
  scrape_interval: 1m

scrape_configs:
  - job_name: "compute"
    scrape_interval: 1m
    metrics_path: "/metrics/compute"
    static_configs:
    - targets: ["exporter_ip:9000"]
  - job_name: "audit-trails"
    scrape_interval: 1m
    metrics_path: "/metrics/audit-trails"
    static_configs:
    - targets: ["exporter_ip:9000"]
  - job_name: "all"
    scrape_interval: 1m
    metrics_path: "/metrics/all"
    static_configs:
    - targets: ["exporter_ip:9000"]


Grafana Dashboard for audit trail

Example of dashboard you can find in configs/dashboards/yandex_cloud_audit.json

Tag summary

Content type

Image

Digest

sha256:fb3e600b1

Size

350.4 MB

Last updated

about 4 years ago

docker pull kennyopennix/prometheus-exporter-yandex-cloud