{"id":20338379,"url":"https://github.com/alerta/sensu-alerta-handler","last_synced_at":"2025-04-11T23:12:09.973Z","repository":{"id":14509800,"uuid":"17223375","full_name":"alerta/sensu-alerta-handler","owner":"alerta","description":"Use Alerta as a dashboard for Sensu","archived":false,"fork":false,"pushed_at":"2021-11-09T21:47:10.000Z","size":1327,"stargazers_count":21,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T23:12:02.379Z","etag":null,"topics":["alerta","golang","sensu","sensu-go","sensu-handler"],"latest_commit_sha":null,"homepage":"http://alerta.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alerta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-26T20:01:58.000Z","updated_at":"2024-11-07T15:51:46.000Z","dependencies_parsed_at":"2022-08-25T16:01:55.777Z","dependency_job_id":null,"html_url":"https://github.com/alerta/sensu-alerta-handler","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alerta%2Fsensu-alerta-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alerta%2Fsensu-alerta-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alerta%2Fsensu-alerta-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alerta%2Fsensu-alerta-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alerta","download_url":"https://codeload.github.com/alerta/sensu-alerta-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492876,"owners_count":21113163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alerta","golang","sensu","sensu-go","sensu-handler"],"created_at":"2024-11-14T21:12:58.368Z","updated_at":"2025-04-11T23:12:09.955Z","avatar_url":"https://github.com/alerta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sensu Go Alerta Handler\n\n[![Bonsai Asset Badge](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967\u0026logo=sensu)](https://bonsai.sensu.io/assets/alerta/sensu-alerta-handler) [![build-test](https://github.com/alerta/sensu-alerta-handler/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/alerta/sensu-alerta-handler/actions/workflows/test.yml)\n\nForward Sensu events to Alerta.\n\n## Installation\n\nDownload the latest version of the sensu-alerta-handler from [releases][1],\nor create an executable script from this source.\n\nFrom the local path of the sensu-alerta-handler repository:\n\n```\ngo build -o /usr/local/bin/sensu-alerta-handler main.go\n```\n\n## Configuration\n\nExample Sensu Go handler definition:\n\n**alerta-handler.json**\n\n```json\n{\n    \"api_version\": \"core/v2\",\n    \"type\": \"Handler\",\n    \"metadata\": {\n        \"namespace\": \"default\",\n        \"name\": \"alerta\"\n    },\n    \"spec\": {\n        \"type\": \"pipe\",\n        \"command\": \"sensu-alerta-handler --endpoint-url https://alerta.example.com/api\",\n        \"env_vars\": [\n            \"ALERTA_API_KEY=G25k9JR2yoZIcHROQGS477nk_Riw4CIghFC6j9NE\"\n        ],\n\n        \"timeout\": 30,\n        \"filters\": [\n            \"is_incident\"\n        ]\n    }\n}\n```\n\nCreate the handler resource:\n\n    $ sensuctl create -f alerta-handler.json\n\nExample Sensu Go check definition:\n\n```\n{\n    \"api_version\": \"core/v2\",\n    \"type\": \"CheckConfig\",\n    \"metadata\": {\n        \"namespace\": \"default\",\n        \"name\": \"dummy-app-healthz\"\n    },\n    \"spec\": {\n        \"command\": \"check-http -u http://localhost:8080/healthz\",\n        \"subscriptions\":[\n            \"dummy\"\n        ],\n        \"publish\": true,\n        \"interval\": 10,\n        \"handlers\": [\n            \"alerta\"\n        ]\n    }\n}\n```\n\n## Usage Examples\n\nHelp:\n\n```\nThe Sensu Go Alerta handler for event forwarding\n\nUsage:\n  sensu-alerta-handler [flags]\n\nFlags:\n  -K, --api-key string        API key for authenticated access\n      --endpoint-url string   API endpoint URL (default \"http://localhost:8080\")\n  -E, --environment string    Environment eg. Production, Development (default \"Entity Namespace\")\n  -h, --help                  help for sensu-alerta-handler\n```\n\n## Contributing\n\nSee https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md\n\n[1]: https://github.com/alerta/sensu-alerta-handler/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falerta%2Fsensu-alerta-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falerta%2Fsensu-alerta-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falerta%2Fsensu-alerta-handler/lists"}