mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
0ba86fe87e
* YC service discovery https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1386 * Fixed linter suggestions * fixed golint errors
2.2 KiB
2.2 KiB
Yandex Cloud Service Discovery Configs
Yandex Cloud SD configurations allow retrieving scrape targets from accessible folders.
Only compute instances currently supported and the following meta labels are available on targets during relabeling:
__meta_yandexcloud_instance_name
: the name of instance__meta_yandexcloud_instance_id
: the id of instance__meta_yandexcloud_instance_fqdn
: generated FQDN for instance__meta_yandexcloud_instance_status
: the status of instance__meta_yandexcloud_instance_platform_id
: instance platform ID (i.e. "standard-v3")__meta_yandexcloud_instance_resources_cores
: instance vCPU cores__meta_yandexcloud_instance_resources_core_fraction
: instance core fraction__meta_yandexcloud_instance_resources_memory
: instance memory__meta_yandexcloud_folder_id
: instance folder ID__meta_yandexcloud_instance_label_<label name>
: each label from instance__meta_yandexcloud_instance_private_ip_<interface index>
: private IP of network interface__meta_yandexcloud_instance_public_ip_<interface index>
: public (NAT) IP of network interface__meta_yandexcloud_instance_private_dns_<record number>
: if configured DNS records for private IP__meta_yandexcloud_instance_public_dns_<record number>
: if configured DNS records for public IP
Yandex Cloud SD support both user OAuth token and instance service account if OAuth is omitted.
---
global:
scrape_interval: 10s
scrape_configs:
- job_name: YC_with_oauth
yandexcloud_sd_configs:
- service: "compute"
yandex_passport_oauth_token: "AQAAAAAsfasah<...>7E10SaotuL0"
relabel_configs:
- source_labels: [__meta_yandexcloud_instance_public_ip_0]
target_label: __address__
replacement: "$1:9100"
- job_name: YC_with_Instance_service_account
yandexcloud_sd_configs:
- service: "compute"
relabel_configs:
- source_labels: [__meta_yandexcloud_instance_private_ip_0]
target_label: __address__
replacement: "$1:9100"