{"id":20138522,"url":"https://github.com/thiagobarradas/http-alert","last_synced_at":"2025-03-02T23:15:12.709Z","repository":{"id":94891517,"uuid":"199073894","full_name":"ThiagoBarradas/http-alert","owner":"ThiagoBarradas","description":"A simple service  to do alerts in slack or pushover based on Json response","archived":false,"fork":false,"pushed_at":"2023-07-22T11:56:55.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T10:08:51.682Z","etag":null,"topics":["alert","alerting","api","docker","http","http-alert","monitoring","notification","pushover","rest","slack"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/thiagobarradas/http-alert","language":"C#","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/ThiagoBarradas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/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}},"created_at":"2019-07-26T20:05:40.000Z","updated_at":"2019-07-30T22:15:35.000Z","dependencies_parsed_at":"2023-07-29T19:01:45.450Z","dependency_job_id":null,"html_url":"https://github.com/ThiagoBarradas/http-alert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fhttp-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fhttp-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fhttp-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fhttp-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThiagoBarradas","download_url":"https://codeload.github.com/ThiagoBarradas/http-alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582552,"owners_count":19985845,"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":["alert","alerting","api","docker","http","http-alert","monitoring","notification","pushover","rest","slack"],"created_at":"2024-11-13T21:38:32.999Z","updated_at":"2025-03-02T23:15:12.692Z","avatar_url":"https://github.com/ThiagoBarradas.png","language":"C#","readme":"# Http Alert\n\nService to make HTTP requests, enforce rules and alert if conditions are not met;\n\n## Running with Docker\n\nCustomize your `http_alert.yml` and mount in volume\n\n```\ndocker run --name http-alert -v ./http_alert.yml:/app/http_alert.yml -d thiagobarradas/http-alert:latest\n```\n\nhttps://hub.docker.com/r/thiagobarradas/http-alert\n\n## http_alert.yml\n\n```\n# notification channels \nnotifications:\n  - name: team_a_channels \n    slack:\n      url: https://hooks.slack.com/services/XXXXXXX\n    pushover:\n      token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n  - name: team_b_channels \n    slack:\n      url: https://hooks.slack.com/services/YYYYYY\n    pushover:\n      token: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n      user: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n  - name: all_company \n    slack:\n      url: https://hooks.slack.com/services/ZZZZZZZ\n\n# monitoring config collection\nhttp_configs:\n  # first config\n  - code: xxx-monitor\n    url: http://xxx.yyy.com/resource\n    user: my-basic-auth-user\n    pass: my-basic-auth-pass\n    timeout_seconds: 60\n    headers:\n      Application: HttpMonitoring\n    stop_in_first_alert: false\n    alert_in:\n    - team_a_channels\n    - all_company\n    alert_when_exception: true\n\n    # rules to validate http response\n    rules:\n    - condition: '\"{state}\" = \"running\"'\n      error_title: 'Very high messages count for {vhost}/{name} '\n      error_message: 'Messages is very high ({messages} messages) with publish rate {message_stats.publish_details.rate}/s and deliver rate {message_stats.deliver_get_details.rate}/s'\n      alert_in:\n      - team_a_channels\n      alert_when_exception: true\n    - condition: '\"{state}\" = \"idle\"'\n      error_title: 'Very low messages count for {vhost}/{name} '\n      error_message: 'Messages is very low ({messages} messages) with publish rate {message_stats.publish_details.rate}/s and deliver rate {message_stats.deliver_get_details.rate}/s'\n      alert_in:\n      - team_b_channels\n      alert_when_exception: true\n  \n  # second config\n  - code: yyy-monitor\n    url: http://xxx.yyy.com/resource\n    user: my-basic-auth-user\n    pass: my-basic-auth-pass\n    timeout_seconds: 60\n    headers:\n      Application: HttpMonitoring\n    stop_in_first_alert: false\n    alert_in:\n    - team_a_channels\n    - all_company\n    alert_when_exception: true\n\n    # rules to validate http response\n    rules:\n    - condition: '\"{state}\" = \"running\"'\n      error_title: 'Very high messages count for {vhost}/{name} '\n      error_message: 'Messages is very high ({messages} messages) with publish rate {message_stats.publish_details.rate}/s and deliver rate {message_stats.deliver_get_details.rate}/s'\n      alert_in:\n      - team_a_channels\n      alert_when_exception: true\n    - condition: '\"{state}\" = \"idle\"'\n      error_title: 'Very low messages count for {vhost}/{name} '\n      error_message: 'Messages is very low ({messages} messages) with publish rate {message_stats.publish_details.rate}/s and deliver rate {message_stats.deliver_get_details.rate}/s'\n      alert_in:\n      - team_b_channels\n      alert_when_exception: true\n```\n\nsee here: [http_alert.yml](HttpAlerts/http_alert.yml);\n\n## Conditions /  Rules\n\nWe use [Flee](https://github.com/mparlak/Flee/wiki) to parser conditions expressions. Write conditions in your format using any json property path;\n\nSamples:\n\n- `\"{state}\" = \"running\"` string equals \n- `\"{state}\" != \"running\"` string not equals \n- `{messages.count} \u003e 10` number gt\n- `{messages.count} = 10` number equals\n- `{messages.count} \u003e= 10` number gte\n- `{messages.count} \u003c 10` number lt\n- `{messages.count} \u003c= 10` number lte\n- `\"{state}\" = \"running\" OR {count} \u003e 10` or operation\n- `\"{state}\" = \"running\" AND {count} \u003e 10` and operation\n\n## How can I contribute?\n\nPlease, refer to [CONTRIBUTING](.github/CONTRIBUTING.md)\n\n## Found something strange or need a new feature?\n\nOpen a new Issue following our issue template [ISSUE_TEMPLATE](.github/ISSUE_TEMPLATE.md)\n\n## Did you like it? Please, make a donate :)\n\nif you liked this project, please make a contribution and help to keep this and other initiatives, send me some Satochis.\n\nBTC Wallet: `1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX`\n\n![1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX](https://i.imgur.com/mN7ueoE.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagobarradas%2Fhttp-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagobarradas%2Fhttp-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagobarradas%2Fhttp-alert/lists"}