vmetrics // vmagent setup for yandex cloud

setup

vi /opt/vmutils/scrape.yml

global:
  scrape_interval: 5s

scrape_configs:

  - job_name: 'yc-monitoring-export'
    metrics_path: '/monitoring/v2/prometheusMetrics'
    scheme: 'https'
    params:
      folderId:
      - 'FOLDER-ID-HERE' # folder-name
      service:
      - 'compute' # yandex hypervisor metrics
      #- 'custom' # unified agent metrics
    bearer_token: 'TOKEN-HERE' # token-descr
    static_configs:
    - targets: ['monitoring.api.cloud.yandex.net']
      labels:
        folderId: 'FOLDER-ID-HERE'
        service: 'compute'
        #service: 'custom'

fake server to check metrics

vi flb_receive_test.conf

[INPUT]
        name prometheus_remote_write
        tag test_receive
        port 8480
        uri /insert/0/prometheus/api/v1/write

[OUTPUT]
        name file
        match test_receive
        path /var/log
        file fluent-bit.log
cd /var/log/
grep ^2024-XX-XXT fluent-bit.log | sed 's/{.*//' | awk '{print $2}' | sort -u | grep -v ^scrape_

see results in appendix below

resources

https://docs.fluentbit.io/manual/pipeline/inputs/prometheus-remote-write

https://yandex.cloud/en-ru/docs/monitoring/operations/metric/prometheusExport

appendix

cpu_usage
cpu_utilization
disk_io_quota_utilization_percentage
disk_io_quota_utilization_percentage_burst
disk_read_bytes
disk_read_bytes_burst
disk_read_bytes_in_flight
disk_read_bytes_in_flight_burst
disk_read_errors
disk_read_latency_bucket
disk_read_latency_count
disk_read_ops
disk_read_ops_burst
disk_read_ops_in_flight
disk_read_ops_in_flight_burst
disk_read_throttler_delay_bucket
disk_read_throttler_delay_count
disk_write_bytes
disk_write_bytes_burst
disk_write_bytes_in_flight
disk_write_bytes_in_flight_burst
disk_write_errors
disk_write_latency_bucket
disk_write_latency_count
disk_write_ops
disk_write_ops_burst
disk_write_ops_in_flight
disk_write_ops_in_flight_burst
disk_write_throttler_delay_bucket
disk_write_throttler_delay_count
instances_count
instances_count_in_zone
measured_percent_in_zone
network_connections_interface_quota_utilization
network_connections_quota_utilization
network_received_bytes
network_received_packets
network_sent_bytes
network_sent_packets
target_instances_count
target_instances_count_in_zone
up

HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun