Aleksey
версионирование экспортера не хотите сделать через квери параметры ?
Напиши FR, не совсем понял что предлагаешь и зачем.
Илья | 😶☮️🐸
Напиши FR, не совсем понял что предлагаешь и зачем.
Каких-то метрик ведь может не быть на старых/новых релизах. Как пример: https://github.com/openstack-exporter/openstack-exporter/issues/191 Предлагаю в query параметры добавить возможность выбора версии релиза чтобы не тратить время на сбор неподдерживаемых метрик
Илья | 😶☮️🐸
Как доберусь до ноута ещё раз гляну.
Ещё как вариант может в конфиг передавать ключ-значение в духе Название метрики - путь для сбора Естественно, из конфига приоритет перед тем, что захардкожено
Aleksey
Хотя тут надо идти как в темпесте, мин макс
Aleksey
@frct1 запилишь PR?
Илья | 😶☮️🐸
Илья | 😶☮️🐸
погляжу что да как, попробую
Илья | 😶☮️🐸
Хотя тут надо идти как в темпесте, мин макс
Я предлагаю сделать как: Храним список метрик и в объекте два поля: min: 2.55, max: 3.22
Илья | 😶☮️🐸
Ну а перед непосредственным фетчем метрик просто проверять входит ли оно в версию или нет
Илья | 😶☮️🐸
не превратилось бы это всё в кашу, если делать алиасы для метрик под разные версии... Вот насчёт этого сомнения
Илья | 😶☮️🐸
metric_name_rocky например и тд
Aleksey
Я предлагаю сделать как: Храним список метрик и в объекте два поля: min: 2.55, max: 3.22
Тогда для каждой метрики должны быть значения min max microversion ну и да проверка перед фетчем. Есть проблема в том что за одну функцию собирается несколько метрик. Т.е. проверку микроверсии надо делать в 2х местах
Илья | 😶☮️🐸
И единый враппер, который будет доставить метрику, проверять версии и запускать фетч
Илья | 😶☮️🐸
Ты код смотрел?
неа, мельком только
Aleksey
неа, мельком только
Ну вот посмотри, а потом можем даже созвониться
Илья | 😶☮️🐸
Ну вот посмотри, а потом можем даже созвониться
глянул, для каждого сервиса как раз подобное
Илья | 😶☮️🐸
ну, тогда проверку версии придётся в каждую функцию-экспортер закинуть (NewNovaExporter, например)
Vyacheslav
Можно форсить старую версию api
Aleksey
Можно форсить старую версию api
Можно, для этого мин Макс и возможность задать через параметры
Aleksey
Посмотрел код и что-то добавлять в каждую метрику поддерживаемые микроверсии выглядит стрёмно, полюбому продолбается депрекейшен
Aleksey
как вариант добавить возможность передачи через OS_COMPUTE_API_VERSION микроверсию
Vyacheslav
Она по идеи возвращается от каждого сервиса
Vyacheslav
ты про min max microversion ?
Какая версия доступна в api
Vyacheslav
Или просто забить и сделать плейстхолдер не доступно в версии api, а в описание метрики добавить min max
Aleksey
Какая версия доступна в api
это есть, это как раз не проблема, скорее проблема следить какая метрика в какой версии пропала или изменилась,
Vyacheslav
У метрики Прометея
Aleksey
А в дескрипшине отметить эту информацию
а кто будет эти дескрипшены актуализировать?
Aleksey
Джорд сегодня очень быстрый, PR c env для Nova уже вмёржили 😂
Maksimus Ulibikus
Буду признателен за помощь. Не могу понять в Description https://github.com/openstack-exporter/openstack-exporter#description A Legacy mode (targetting one cloud) in where the openstack_exporter serves on port 0.0.0.0:9180 at the /metrics URL. Откуда взялся порт 9180? Из прослушиваемых у меня 9090 и 9100.
Илья | 😶☮️🐸
Собственно пром обращается к каждому порту и собирает метрики
Maksimus Ulibikus
Всё понял, спасибо.
Maksimus Ulibikus
Что ему надо от 10-й строки? [root@controller openstack-exporter]# ./openstack-exporter --os-client-config /etc/openstack/clouds.yaml controller INFO[0000] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:62" INFO[0000] openstack exporter started in legacy mode source="main.go:86" INFO[0000] Starting HTTP server on :9180 source="main.go:101" INFO[0003] Starting openstack exporter version (version=1.4.0, branch=master, revision=9e071f6aaae78dd33bde01e7efeb9ed59b8f5f4f) for cloud: controller source="main.go:154" INFO[0003] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:155" ERRO[0003] enabling exporter for service load-balancer failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service dns failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service baremetal failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service gnocchi failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service orchestration failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service volume failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service object-store failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service database failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service placement failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service image failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service container-infra failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service network failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service compute failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] enabling exporter for service identity failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0003] No exporter has been enabled, exiting source="main.go:179" 1 clouds: 2 default: 3 region_name: RegionOne 4 identity_api_version: 3 5 identity_interface: internal 6 auth: 7 username: admin 8 password: qwerty 9 project_name: admin 10 project_domain_name: 'Default' 11 user_domain_name: 'Default' 12 auth_url: http://controller:5000/v3
Maksimus Ulibikus
Какой он подразумевает ключ? did not find expected key
Den
попробуй просто domain_name в 10 строке
Maksimus Ulibikus
Тоже самое
Maksimus Ulibikus
[root@controller openstack-exporter]# ./openstack-exporter --os-client-config /etc/openstack/clouds.yaml controller INFO[0000] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:62" INFO[0000] openstack exporter started in legacy mode source="main.go:86" INFO[0000] Starting HTTP server on :9180 source="main.go:101" INFO[0004] Starting openstack exporter version (version=1.4.0, branch=master, revision=9e071f6aaae78dd33bde01e7efeb9ed59b8f5f4f) for cloud: controller source="main.go:154" INFO[0004] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:155" ERRO[0004] enabling exporter for service volume failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service object-store failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service dns failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service database failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service network failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service image failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service container-infra failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service baremetal failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service orchestration failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service identity failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service compute failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service load-balancer failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service gnocchi failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service placement failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] No exporter has been enabled, exiting source="main.go:179"
Maksimus Ulibikus
Да он упоротый. Поменял в yaml всё, что смог все равно ругается на строку 10. оставил спецом всего 9 строк, запускаю и опять ошибка в 10-й строке
Denis
var DEFAULT_OS_CLIENT_CONFIG = "/etc/openstack/clouds.yaml" Вроде дефолтный путь
Den
11 user_domain_name: 'Default' - удали, 12 auth_url: http://controller:5000/v3 - controller резольвится?
Denis
вруби дебаг, судя по main.go там будет чуть больше понятной инфы что с конфигом
Aleksey
[root@controller openstack-exporter]# ./openstack-exporter --os-client-config /etc/openstack/clouds.yaml controller INFO[0000] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:62" INFO[0000] openstack exporter started in legacy mode source="main.go:86" INFO[0000] Starting HTTP server on :9180 source="main.go:101" INFO[0004] Starting openstack exporter version (version=1.4.0, branch=master, revision=9e071f6aaae78dd33bde01e7efeb9ed59b8f5f4f) for cloud: controller source="main.go:154" INFO[0004] Build context (go=go1.15.14, user=root@controller, date=20210823-06:47:16) source="main.go:155" ERRO[0004] enabling exporter for service volume failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service object-store failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service dns failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service database failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service network failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service image failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service container-infra failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service baremetal failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service orchestration failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service identity failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service compute failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service load-balancer failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service gnocchi failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] enabling exporter for service placement failed: unable to load clouds.yaml: failed to unmarshal yaml: yaml: line 10: did not find expected key source="main.go:169" ERRO[0004] No exporter has been enabled, exiting source="main.go:179"
ну там же написано что надо указать имя облака, с которого собираешсья снимать метрики. Ты в cli пишешь controller, а в конфиге у тебя default
Maksimus Ulibikus
вруби дебаг, судя по main.go там будет чуть больше понятной инфы что с конфигом
Значит бы его как врубить дебаг. Я так понял в go дебаг врубить?
Maksimus Ulibikus
ну там же написано что надо указать имя облака, с которого собираешсья снимать метрики. Ты в cli пишешь controller, а в конфиге у тебя default
Сделал так: clouds: controller: region_name: RegionOne identity_api_version: 3 identity_interface: internal auth: username: admin password: qwerty project_name: admin auth_url: http://controller:5000/v3 Всё равно
Maksimus Ulibikus
Жду с нетерпением )
Denis
logLevel = kingpin.Flag("log.level", "Log level: [debug, info, warn, error, fatal]").Default("info").String()
Denis
logLevel = kingpin.Flag("log.level", "Log level: [debug, info, warn, error, fatal]").Default("info").String()
https://github.com/openstack-exporter/openstack-exporter/blob/master/main.go#L24
Den
clouds: prometheus: auth_type: password identity_api_version: 3 interface: internal endpoint_type: internal region_name: "RegionOne" auth: auth_url: "http://192.168.0.100:5000/v3" username: "prometheus" password: "qwerty" project_name: "service" domain_name: "Default"
Илья | 😶☮️🐸
Жду с нетерпением )
global: scrape_interval: 10s scrape_configs: - job_name: 'kekstack' metrics_path: /probe params: cloud: ['your-name'] static_configs: - targets: ['192.168.1.10:9180'] clouds: kekstack: auth: auth_url: http://192.168.1.137/identity password: '123' project_domain_id: default project_name: admin user_domain_id: default username: admin identity_api_version: '3' region_name: RegionOne volume_api_version: '3'
Илья | 😶☮️🐸
В probe режиме как-то прикольнее, чем легаси, ибо через ?cloud=anotheronecloud можешь из коробки по сути получить данные по другому облаку
Илья | 😶☮️🐸
Ctrl+Shift+m
какая-то уличная магия
Denis
какая-то уличная магия
да когда хоткей запоминаешь сильно легче с этими ` символами)
Aleksey
Ctrl+Shift+m
хреново жить на маке 🙁 там такого нет
Denis
Aleksey
есть!
э… я вот ` спасаюсь. Куда смотреть?
Denis
э… я вот ` спасаюсь. Куда смотреть?
как на скрине, правой мышкой на выделенном тексте нажми
Aleksey
Aleksey
блеать
Илья | 😶☮️🐸
но это выделять сначала, бгг
Denis
Denis
или на пустом сообщении...
Denis
оно правда сизое будет, не активное
Aleksey
strikethrough
Aleksey
хера се
Denis
yamllint
Илья | 😶☮️🐸
@yatakoim Ещё экспортер и пром в докер запихать, чтобы стильно-модно-молодёжно