{"id":15374669,"url":"https://github.com/mrtazz/notify-by-opsgenie","last_synced_at":"2025-03-21T02:28:54.645Z","repository":{"id":12527992,"uuid":"15197899","full_name":"mrtazz/notify-by-opsgenie","owner":"mrtazz","description":"simple program to notify opsgenie from nagios","archived":false,"fork":false,"pushed_at":"2014-01-19T19:35:06.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T23:17:02.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mrtazz.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}},"created_at":"2013-12-15T04:42:14.000Z","updated_at":"2023-07-25T13:50:12.000Z","dependencies_parsed_at":"2022-07-08T00:56:08.328Z","dependency_job_id":null,"html_url":"https://github.com/mrtazz/notify-by-opsgenie","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fnotify-by-opsgenie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fnotify-by-opsgenie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fnotify-by-opsgenie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fnotify-by-opsgenie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtazz","download_url":"https://codeload.github.com/mrtazz/notify-by-opsgenie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244724821,"owners_count":20499490,"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":[],"created_at":"2024-10-01T13:59:27.903Z","updated_at":"2025-03-21T02:28:54.587Z","avatar_url":"https://github.com/mrtazz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notify-by-opsgenie\n\n## Overview\nSimple script to notify about nagios alerts via opsgenie\n\n## Usage\nThe script can be called standalone like this:\n```\n% ./notify-by-opsgenie --help\nUsage of ./notify-by-opsgenie:\n  -H=\"\": the host to alert for\n  -S=\"\": the service to alert for\n  -T=\"\": time and date in long format\n  -c=\"opsgenie_key\": the opsgenie customer key\n  -d=\"\": description of the alert\n  -s=\"\": the state\n  -t=\"\": the alert type\n  -u=\"\": recipient to send to\n```\nBut you probably want to use it in Nagios. For this define commands like this:\n```\ndefine command{\n  command_name\tnotify-host-opsgenie\n  command_line  $USER1$/notify-by-opsgenie -H=\"$HOSTNAME$\" -s=\"$HOSTSTATE$\" -c=\"OPSGENIEKEY\" -t=\"$NOTIFICATIONTYPE$\" -d=\"$HOSTOUTPUT$\" -T=\"$LONGDATETIME$\" -u=\"$CONTACTEMAIL$\"\n}\n\ndefine command{\n  command_name\tnotify-service-opsgenie\n  command_line  $USER1$/notify-by-opsgenie -H=\"$HOSTNAME$\" -S=\"$SERVICEDESC$\" -s=\"$SERVICESTATE$\" -c=\"OPSGENIEKEY\" -t=\"$NOTIFICATIONTYPE$\" -d=\"$SERVICEOUTPUT$\" -T=\"$LONGDATETIME$\" -u=\"$CONTACTEMAIL$\"\n}\n```\nAnd then set up a contact to use the commands for notifications like this:\n```\ndefine contact{\n        contact_name                   opsgenie\n        use                            generic-contact\n        alias                          Opsgenie contact\n        email                          your@email.com\n        service_notification_commands  notify-service-opsgenie\n        host_notification_commands     notify-host-opsgenie\n        }\n```\n\n## How to contribute\n1. Fork the repo\n2. Hack away\n3. Push the branch up to GitHub\n4. Send a pull request\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fnotify-by-opsgenie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtazz%2Fnotify-by-opsgenie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fnotify-by-opsgenie/lists"}