{"id":20354561,"url":"https://github.com/pluralsight/hydra-notifications","last_synced_at":"2025-10-16T03:28:50.192Z","repository":{"id":25295281,"uuid":"103669277","full_name":"pluralsight/hydra-notifications","owner":"pluralsight","description":"A generic RESTful API to send notifications to different systems through an HTTP endpoint.","archived":false,"fork":false,"pushed_at":"2024-08-28T11:50:06.000Z","size":192,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-04T20:30:09.606Z","etag":null,"topics":["akka","notifications","opsgenie","scala","slack"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/pluralsight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-15T14:55:40.000Z","updated_at":"2024-04-25T07:11:44.000Z","dependencies_parsed_at":"2024-04-01T05:21:40.773Z","dependency_job_id":"3872efc4-b901-4d46-9611-a736303e0d1f","html_url":"https://github.com/pluralsight/hydra-notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pluralsight/hydra-notifications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2Fhydra-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2Fhydra-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2Fhydra-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2Fhydra-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pluralsight","download_url":"https://codeload.github.com/pluralsight/hydra-notifications/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2Fhydra-notifications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279145336,"owners_count":26113638,"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","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"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":["akka","notifications","opsgenie","scala","slack"],"created_at":"2024-11-14T23:09:01.292Z","updated_at":"2025-10-16T03:28:50.155Z","avatar_url":"https://github.com/pluralsight.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hydra Notifications\n\n[![Build Status](https://travis-ci.org/pluralsight/hydra-notifications.svg?branch=master)](https://travis-ci.org/pluralsight/hydra-notifications)\n[![codecov](https://codecov.io/gh/pluralsight/hydra-notifications/branch/master/graph/badge.svg)](https://codecov.io/gh/pluralsight/hydra-notifications)\n[![Join the chat at https://gitter.im/pluralsight/hydra](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pluralsight/hydra-notifications?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\nA generic HTTP container that sends events to underlying services.\n\n# Supported Services\n\nCurrently, two services are supported: Slack and OpsGenie.\n\nOthers forthcoming.\n\n## Adding a new service\n\n#### Create the service actor\n\nLook at any of the service classes under services/hydra/notifications/services.\n\nFor instance:\n\n`hydra.notifications.services.Slack`\n\nServices are Akka actors tagged with the `HydraNotificationService` trait, which allows them to be loaded dynamically at \nstart up time.\n\n\u003e The lower case short name of the service class becomes the service name. For instance, `hydra.notifications.services.Slack` will be available as \"slack\"\n\n\n#### Create the service notification case class \n\nCreate the class in the client module and make sure it extends from `http.hydra.notifications.HydraNotification`\n\nExamples: SlackNotification and OpsGenieNotification in hydra.notifications.client\n\n\n#### Add the case class to the SprayJsonFormat \n\nModify `http.hydra.notifications.http.NotificationsFormat.scala` and add your service name to the pattern match statements\n\n# Example calls\n\n## Slack\n\n```bash\n curl -X POST localhost:8080/notify -d '{\"channel\":\"hydra-ops\",\"message\":\"an error occured\",\"service\":\"slack\"}'  -H \"Content-Type:application/json\"\n```\n \n## Ops Genie\n \n```bash\n  curl -X POST localhost:8080/notify -d '{\"source\":\"source\",\"description\":\"description\",\"tags\":[\"tag1\",\"tag2\"],\"service\":\"opsgenie\",\"alias\":\"alias\",\"note\":\"note\",\"team\":\"team\",\"entity\":\"entity\",\"message\":\"message\",\"user\":\"user\"}' -H \"Content-Type:application/json\"\n``` \n\n# Building\n `sbt universal:packageBin`\n \n The generated zip file will contain both the assembled jar and the run script.\n \n# Running the App\n\nSupply authentication tokens for Slack and OpsGenie by using one of these methods:\n- Modify `reference.conf` to add authentication tokens for Slack and OpsGenie.\n- Supply environment variables `OPSGENIE_TOKEN` and `SLACK_TOKEN`\n- Add the tokens to `/etc/hydra/hydra-notifications.conf`\n\nUnzip the executable generated by sbt and run ./bin/hydra-notifications.\n\nBy default, the container binds to port 8080.  To change that, supply this configuration property:\n\n`container.http.port=$PORT_NUMBER`\n\n# Configuration\n\nhydra-notifications makes use of environment variables to configure the application.  Environment variables make it easy to configure an application for different environments, i.e., stage and prod.  Take a look at the env.example for a list of the parameters you can specify with environment variables.  If you're running locally, copy the `env.example` to `.env`.  Sbt will pick up the values in `.env` and load them into the environment using `sbt-dotenv`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralsight%2Fhydra-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluralsight%2Fhydra-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralsight%2Fhydra-notifications/lists"}