elasticsearch-configuration:
url: localhost
port: 9200
user: elastic
password: password
correlation:
correlations:
name: my-custom-name
period: 5m
id:
- 550
- 551
- 552
- 887
name: my-custom-name2
period: 1m
id:
- 6550
- 7551
- 8552
Как я могу прочитать файл конфигурации yaml из python и запустить python с каждой переменной (имя, идентификатор периода)? Для каждой корреляции я хочу получить переменные, установленные в python.
if __name__ == "__main__":
try:
name = "my-custom-name"
period = 5m
id = ["550", "551", "552", "887"]
if alert_id == id: