Quickly generate OpenSLO and Nobl9 yaml so I can stop going and looking at the doc.
- Install using pip
pip install slo_yaml_generator
The script takes a json file containing the fields needed for each template.
Files are currently sent to the ./output/ directory. I plan to add an option to configure this soon.
Example:
slo_yaml_generator --resource_type slo --config_file "example-configs/cloudwatch-slo.json"
{
"resource_name": "My Demo SLO",
"service_name": "Service Name",
"project_name": "Project Name",
"sli_name": "test indicator",
"metric_source": "Dynatrace",
"operation": "lt",
"value": "100",
"target": ".99",
"duration": "28d",
"is_rolling": "True",
"budgeting_method": "Occurrences"
}
For metric_source Cloudwatch please include these fields:
{
"region": "us-east-1",
"aws_service": "AWS/Lambda",
"metric_name": "Errors",
"statistic": "Sum"
}
For metric_source Dynatrace please include these fields:
{
"query": "dynatrace query"
}
{
"resource_name": "This is a test service",
"project_name": "Jack's Project",
"description": "This is a test description for Jack's little tool for SLO consulting"
}
{
"resource_name": "This is a test project",
"description": "This is a test description for Jack's little tool for SLO consulting"
}