{"id":15010102,"url":"https://github.com/3zcurdia/deux","last_synced_at":"2026-03-16T22:01:04.584Z","repository":{"id":57489755,"uuid":"288198886","full_name":"3zcurdia/deux","owner":"3zcurdia","description":"Status monitor for external services","archived":false,"fork":false,"pushed_at":"2020-11-10T21:25:37.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T08:40:43.193Z","etag":null,"topics":["elixir","monitor","otp","status"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/3zcurdia.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":"2020-08-17T14:15:31.000Z","updated_at":"2020-11-10T21:25:39.000Z","dependencies_parsed_at":"2022-08-29T14:11:21.412Z","dependency_job_id":null,"html_url":"https://github.com/3zcurdia/deux","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fdeux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fdeux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fdeux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fdeux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3zcurdia","download_url":"https://codeload.github.com/3zcurdia/deux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243258505,"owners_count":20262300,"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":["elixir","monitor","otp","status"],"created_at":"2024-09-24T19:30:12.692Z","updated_at":"2025-12-28T02:13:03.126Z","avatar_url":"https://github.com/3zcurdia.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deux\n![Elixir CI](https://github.com/3zcurdia/deux/workflows/Elixir%20CI/badge.svg)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/deux.svg?style=flat)](https://hex.pm/packages/deux)\n\nStatus monitor for external services:\n  - Redis: track specific keys values\n  - Ping: track status or body responses\n\n## Installation\n\nThe package can be installed by adding `deux` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:deux, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n## Setup\n\nDeux uses `exredis` to monitor redis services, you will need to configure it with\n\n```\nconfig :exredis,\n  reconnect: :no_reconnect,\n  max_queue: :infinity\n```\n\nif your application already have `exredis` you don't need to change your configuration\n\n## Usage\n\n### Add Redis\n\nTo monitor redis you need to add with\n\n```\n  redis_source = Deux.Redis.add(name: \"localhost\", url: \"redis://127.0.0.1:6379\", filters: [%{filter: \"flag:*\"}])\n```\n\n### Add Ping\n\nTo monitor ping you need to add with\n\n```\n  ping_source = Deux.Ping.add(name: \"localhost\", request: [method: :get, url: \"http://127.0.0.1:3000\"], mode: :body)\n```\n\n### Load sources\n\nTo load all sources reports\n\n```\n  {:ok, sources} = Deux.list_sources()\n```\n\nYou also can fetch an specific source with a given id\n\n```\n  {:ok, source} = Deux.get_source(\"213243546576\")\n```\n\n## Load on boot with config\n\nYou can also set your monitors to through the config\n\n```\nconfig :deux,\n  redis: [\n    %{\n      name: \"localhost flags\",\n      url: \"redis://127.0.0.1:6379\",\n      filters: [%{filter: \"flag:*\"}]\n    },\n    %{\n      name: \"Another source\",\n      url: \"redis://services.example.com:6379\",\n      filters: [%{regex: ~r/category_.*/}]\n    }\n  ],\n  ping: [\n    %{\n      name: \"Example pingdown\",\n      request: [\n        method: :get,\n        url: \"https://example.com/\",\n      ],\n      mode: :status\n    },\n    %{\n      name: \"Config endpoint\",\n      request: [\n        method: :get,\n        url: \"https://example.com/api/v2/config\",\n      ],\n      mode: :body\n    }\n  ]\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/deux](https://hexdocs.pm/deux).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3zcurdia%2Fdeux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3zcurdia%2Fdeux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3zcurdia%2Fdeux/lists"}