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
How can I read the yaml config file from python, and run the python with each variable (name,period id)? For each correlation, I want to get the variables set in python.
if __name__ == "__main__":
try:
name = "my-custom-name"
period = 5m
id = ["550", "551", "552", "887"]
if alert_id == id: