{"id":25667109,"url":"https://github.com/agaurav/slogen","last_synced_at":"2026-05-14T18:31:59.654Z","repository":{"id":38962503,"uuid":"412330312","full_name":"agaurav/slogen","owner":"agaurav","description":"tool to create and manage content for reliability tracking from logs/event data.","archived":false,"fork":false,"pushed_at":"2023-03-07T00:44:54.000Z","size":1678,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T09:23:18.308Z","etag":null,"topics":["reliability","slo","sumologic","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agaurav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-10-01T04:49:13.000Z","updated_at":"2021-11-17T06:19:15.000Z","dependencies_parsed_at":"2023-09-24T07:16:54.571Z","dependency_job_id":null,"html_url":"https://github.com/agaurav/slogen","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":0.5,"last_synced_commit":"c7b81de243d2cfb70109b736f1f4b3b336898cf9"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/agaurav/slogen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agaurav%2Fslogen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agaurav%2Fslogen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agaurav%2Fslogen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agaurav%2Fslogen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agaurav","download_url":"https://codeload.github.com/agaurav/slogen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agaurav%2Fslogen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33037802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reliability","slo","sumologic","terraform"],"created_at":"2025-02-24T09:21:42.913Z","updated_at":"2026-05-14T18:31:59.635Z","avatar_url":"https://github.com/agaurav.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### slogen\n\nCLI tool to generate SLO dashboards, monitors \u0026 scheduled views\nfrom [OpenSLO](https://github.com/OpenSLO/OpenSLO#specification) configs. Currently only supports sumo as data source\nand target.\n\nFor a given config it will create the following content via sumo terraform provider\n\n- [Scheduled view](https://help.sumologic.com/Manage/Scheduled-Views) to generate the aggregated SLI data\n- [Dashboards](https://help.sumologic.com/Visualizations-and-Alerts/Dashboard_(New)) to track availability, burn rate\n  and budget remaining\n- [monitors](https://help.sumologic.com/Visualizations-and-Alerts/Alerts/Monitors) :  [Multi-Window, Multi-BurnRate](https://sre.google/workbook/alerting-on-slos/)\n- Global dashboard, to track availability across all services in a single view\n- The content are grouped into folders of the service they belong to\n- slice \u0026 dice SLI data in view to create custom reports by metadata (e.g. availability by customers, region)\n\n![panels](misc/slo_panel.png )\n![overview](misc/view_search.png)\n![panels](misc/overview.png)\n![monitors](misc/monitors.png)\n\n#### sample config\n\n```yaml\napiVersion: openslo/v1alpha\nkind: SLO\nmetadata:\n  displayName: SLO descriptive name\n  name: slo-minimal-name   # only '-' is allowed apart from alphanumeric chars, '-' not allowed in start or end\nspec:\n  service: my-service\n  description: slo description to be added in dashboard text panel\n  budgetingMethod: Occurrences\n  objectives:\n    - ratioMetrics:\n        total: # sumo query to filter out all the messages counting requests for this slo\n          source: sumologic\n          queryType: Logs\n          query: '_sourceCategory=my-service | where api_path=\"/login\"'\n        good: # condition to filter out healthy request/events\n          source: sumologic\n          queryType: Logs\n          query: '(responseTime) \u003c 500 and (statusCode matches /[2-3][0-9]{2}/ )'\n        incremental: true\n      displayName: delay less than 350\n      target: 0.98\nfields: # fields from log to retain\n  region: \"aws_region\"    # log field as it is\n  deployment: 'if(isNull(deployment),\"dev\",deployment)' # using an expression\nlabels:\n  tier: 0                 # static labels to include in SLI view, that are not present in the log messages\nburnRateAlerts: # Multiwindow, Multi-Burn-Rate Alerts, explained here https://sre.google/workbook/alerting-on-slos/ \n  - shortWindow: '10m' # the smaller window\n    shortLimit: 14  # limit for the burn rate ratio, 14 denotes the error consumed in the window were 14 times the allowed number  \n    longWindow: '1h'\n    longLimit: 14\n    notifications: # one or more notification channels\n      - connetionType: 'Email'\n        recipients: 'youremailid@email.com'\n        triggerFor:\n          - Warning\n          - ResolvedWarning\n      - connetionType: 'PagerDuty'\n        connectionID: '1234abcd'  # id of pagerduty connection created in sumo\n        triggerFor:\n          - Critical\n          - ResolvedCritical\n\n\n\n```\n\n#### Getting the tool\n\n##### install with go1.17 as `go install github.com/agaurav/slogen@latest`\n\nlatest golang release can be installed by using the directions here : https://github.com/udhos/update-golang#usage.\nAdd `$GOPATH/bin` to your `$PATH`.\n\nIt can be done with\n\n```\nexport PATH=`go env GOPATH`/bin:$PATH\n```\n\n##### Get the latest binary from [release page](https://github.com/agaurav/slogen/releases) and put it in a directory in your `$PATH` (e.g. `$HOME/.local/bin` )\n\n```\nwget -O - https://github.com/agaurav/slogen/releases/download/v0.5.2/slogen_0.5.2_Linux_x86_64.tar.gz | tar xvz -C /path/to/bin\n```\n\n### Using the tool\n\n###### Set the sumologic auth as `ENV` variables as required by the [terraform provider](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs#environment-variables):\n\n--- \n\n###### create the yaml config for the SLO. more [samples](samples/openslo) based on real data.\n\n--- \n\n###### validate the configs as (you can also pass the path to the entire dir to validate the files in it.)\n\n`slogen validate path/to/config`\n\n--- \n\n###### run the tool to generate the terraform files and apply them (you can remove the `--apply` to just generate the files)\n\n`slogen path/to/config --apply`\n\n\n--- \n\n###### for further details run `slogen help`\n\n```\nUsage:\nslogen [paths to yaml config]... [flags]\nslogen [command]\n\nExamples:\nslogen service/search.yaml \nslogen ~/team-a/slo/ ~/team-b/slo ~/core/slo/login.yaml \nslogen ~/team-a/slo/ -o team-a/tf\nslogen ~/team-a/slo/ -o team-a/tf --apply \n\nAvailable sub-commands:\nhelp          Help about any command \nnew           create a sample config from given profile \nvalidate      config is as per OpesSLO standards and has valid values.\ncompletion    generate the autocompletion script for the specified shell \ndocs          A brief description of your command \n\nFlags:\n-o, --out string        :   output directory where to create the terraform files (default \"tf\")\n-d, --dashboardFolder   :   string output directory where to create the terraform files (default \"slogen-tf-dashboards\")\n-m, --monitorFolder     :   string output directory where to create the terraform files (default \"slogen-tf-monitors\")\n-i, --ignoreErrors      :   whether to continue validation even after encountering errors \n-p, --plan              :   show plan output after generating the terraform config \n-a, --apply             :   apply the generated terraform config as well \n-c, --clean             :   clean the old tf files for which openslo config were not found in the path args \n-h, --help              :   help for slogen\n\n\nUse \"slogen [command] --help\" for more information about a command. Example config with inline comment explaining the\nvarious fields\n\n```\n\n#### Where are the content created\n\n- Dashboards by default are created in a folder `slogen-tf-dashboards`. A different folder can be set with the\n  flag `-d or --dashboardFolder` followed by name of the folder. It will take some time for historical data to be\n  calculated for new views for dashboards to be accurate.\n- Monitors by default are created in a folder `slogen-tf-monitors`. A different folder can be set with the\n  flag `-m or --monitorFolder` followed by name of the folder.\n- Scheduled view are created with a prefix `slogen_tf_`, this can't be changed as of now.\n- `SLO Overview` dashboard is created at the root of Dashboard folder specified.\n\n#### Limitations\n\n- as of now only supports Sumologic Logs as data source and content target.\n- Only `Occurrences` based `budgetingMethod` is handled. support for `Timeslices` is work in progress.\n- Alerting on SLO, burn-rate can be configured only up-to `24h`. Tracking them via dashboard is still possible for up-to\n  31 days.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagaurav%2Fslogen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagaurav%2Fslogen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagaurav%2Fslogen/lists"}