{"id":13564532,"url":"https://github.com/foomo/petze","last_synced_at":"2025-07-02T11:38:25.991Z","repository":{"id":56303832,"uuid":"48429565","full_name":"foomo/petze","owner":"foomo","description":"monitor web services and report, if they are not working","archived":false,"fork":false,"pushed_at":"2020-11-25T21:25:57.000Z","size":751,"stargazers_count":6,"open_issues_count":3,"forks_count":6,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-08T13:49:58.660Z","etag":null,"topics":["elk","http-monitor","logrus","prometheus"],"latest_commit_sha":null,"homepage":"","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/foomo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-22T11:58:11.000Z","updated_at":"2024-12-24T00:06:38.000Z","dependencies_parsed_at":"2022-08-15T16:20:26.438Z","dependency_job_id":null,"html_url":"https://github.com/foomo/petze","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foomo%2Fpetze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foomo%2Fpetze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foomo%2Fpetze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foomo%2Fpetze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foomo","download_url":"https://codeload.github.com/foomo/petze/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252408432,"owners_count":21743120,"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":["elk","http-monitor","logrus","prometheus"],"created_at":"2024-08-01T13:01:32.648Z","updated_at":"2025-05-04T22:31:55.977Z","avatar_url":"https://github.com/foomo.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cimg src=\"petze.png\" width=\"300\" height=\"300\"\u003e\n\n[![Travis CI](https://travis-ci.org/foomo/petze.svg?branch=master)](https://travis-ci.org/foomo/petze)\n\n# Petze\n\n**Petze monitors web sites and services**.\n\nIt exports [prometheus](https://prometheus.io) metrics and writes [logrus](https://github.com/sirupsen/logrus) logs.\nAdditionally, petze offers a convenient way to receive notifications via [EMail](#SMTP-Integration), [Slack](#Slack-Integration) or [SMS](#SMS-Integration),\nwithout the need to operate a big enterprise monitoring stack.\n\nOne instance of petze is designed to monitor many services at little cost.\n\n# Motivation\n\nWhile there is a vast amount of monitoring solutions out there I still felt there was something simplistic missing, that would play nicely with [prometheus.io](https://prometheus.io), which I have come to appreciate very much.\n\n# Status\n\nAs of June 2017 we have a first working version and we are trying to get the configs right - feedback and contributions are most welcome!\n\n# Configuration\n\nPetze is configured through a set of yaml configuration files. The path to folder containing the configuration is passed to petze as the first argument on the commandline.\n\n```bash\n$ petze path/to/petzconf\n``` \n\nTake a look at a simple example config: https://github.com/foomo/petze/tree/master/exampleConfig\n\n## Configuration layout\n\nThe configuration file for petze is called: **petze.yml**.\nIt provides information for the petze service, as well the configuration for your notifications.\n\n## Main config file petze.yml\n\n```yaml\n# HTTP endpoint for prometheus metrics\naddress: server-name.net:8080\n\n# optional basic auth\nbasicauthfile: path/to/basic-auth-file\n\n# optional: running with TLS\ntls:\n  address: server-name:8443\n  cert: path/to/cert.pem\n  key: path/to/key.pem\n\n## Notifications\n\n# optional: notification via slack webhooks\nslack: https://hooks.slack.com/services/custom-parameters\n\n# optional: configure SMTP notifications\nsmtp:\n  server: smtp-relay.yourprovider.com\n  user: you@mail.com\n  pass: yourpassword\n  port: 465\n  from: replyto@mail.com\n  to: usertonotify@mail.com \n\n# optional: SMS notifications \nsms:\n  twilioSID: \"yourTwilioSID\"\n  twilioToken: \"yourTwilioToken\"\n  from: \"+49123456789\"\n  to:\n    - \"+491234567891\" # person 1\n    - \"+491234567892\" # person 2\n```\n\n## Service configuration files\n\nAny other files with a .yml suffix will be treated as service configurations. \nIt is strongly encouraged to organize them in folder structures. \nThese will be reflected in the service ids.\n\n```yaml\n# the service base URL\nendpoint: http://www.bestbytes.de\n\n# interval of the health checks\ninterval: 5m\n\n# overwrite the default warning of one week before expiry for this service\ntlsWarning: 128h\n\n# want to get a heads up once things are back to normal?\n# default is false! \n# if you set this to true all configured notification providers \n# will be used to send a status update once the service checks pass again\nnotifyIfResolved: true\n\n# service health check sessions\n# each session will preserve all cookies that have been set during checks\nsession:\n  - uri: \"/\"\n    comment: home page visit\n    check:\n      - statusCode: 200\n      - duration: 200ms\n      - goQuery:\n      \t  \".body div.test\":\n      \t  min: 3\n  \n  - method: POST\n    comment: this is how you perform XHR requests  \n    uri: \"/path/to/a/rest/service?foo=bar\"\n    contentType: application/json\n    headers:\n      \"X-Test\": [\"foo\"]\n    data:\n      foo: bar\n    check:\n      - contentType: application/json\n      - duration: 100ms\n      - headers:\n          \"X-Test\": \"foo\"\n      - jsonPath:\n        # this is a json path expression\n        \"$[0].product.images+\":\n        \tmin: 1\n  - uri: \"/another/path\"\n    check:\n      - duration: 100ms\n      # match the location for checking redirects\n      - redirect: \"https://myservice.com/asdf\"\n      # match the raw response string\n      - matchReply: \"asdf\"\n```\n\n## SMTP Integration\n\nYou can now get notifications by Mail, all you need to provide is an SMTP server!\nA summary email with all errors for a service will be generated, in case a check failed.\n\nAdd the following to your petze.yml:\n\n```yaml\n# configure SMTP notifications\nsmtp:\n  server: smtp-relay.yourprovider.com\n  user: you@mail.com\n  pass: yourpassword\n  port: 465\n  from: replyto@mail.com\n  # enter multiple emails to notify if desired\n  to: \n    - usertonotify1@mail.com\n    - usertonotify2@mail.com \n```\n\n## Slack Integration\n\nUsing slack incoming webhooks, we can post messages to a slack channel\nby simply creating a slack app and enabling the incoming webhook:\nhttps://api.slack.com/messaging/webhooks\n\n1) Add a new App to your Slack workspace\n2) Go to the Apps Settings and enable Webhooks\n3) Select a channel to notify and generate a new webhook URL\n\nThen add your newly generated webhook URL to your petze.yml:\n\n```yaml\nslack: https://hooks.slack.com/services/custom-parameters\n```\n\n## SMS Integration\n\nSMS notifications are also supported, currently we have an integration for [twilio](https://twilio.com) and [sendinblue](https://sendinblue.com).\n\n## Twilio\n\n_petze.yml_:\n```yaml\nsms:\n  twilioSID: \"yourTwilioSID\"\n  twilioToken: \"yourTwilioToken\"\n  from: \"+49123456789\"\n  to:\n    - \"+491234567891\" # person 1\n    - \"+491234567892\" # person 2\n```\n\n## SendInBlue\n\n_petze.yml_:\n```yaml\nsms:\n  sendInBlueAPIKey: \"yourSendInBlueAPIKey\"\n  from: \"+49123456789\"\n    to:\n      - \"+491234567891\" # person 1\n      - \"+491234567892\" # person 2    \n```\n\n## Docker Usage\n\nPrepare your config folder and move it to: /etc/petzconf.\nThe repository contains an example configuration in the _exampleConfig_ folder.\n\nThen pull and start the container, mounting the config folder into the container:\n\n```bash\n$ docker pull foomo/petze\n$ docker run -v /etc/petzconf:/etc/petzconf foomo/petze\n```\n\nHappy monitoring!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoomo%2Fpetze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoomo%2Fpetze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoomo%2Fpetze/lists"}