{"id":15813825,"url":"https://github.com/ethanc/leash","last_synced_at":"2025-10-16T12:30:45.268Z","repository":{"id":233759755,"uuid":"785038148","full_name":"EthanC/Leash","owner":"EthanC","description":"Monitor the OPNsense DHCPv4 service and notify about new leases.","archived":true,"fork":false,"pushed_at":"2024-08-25T04:23:37.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-05T04:05:57.710Z","etag":null,"topics":["api","bot","device","dhcp","dhcpv4","discord","ip","ip-address","lease","leases","mac","mac-address","monitor","notification","notify","opnsense","python","script","watcher","webhook"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/ethanchrisp/leash","language":"Python","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/EthanC.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://cash.app/$EthanChrisp","https://venmo.com/u/Mxtive"]}},"created_at":"2024-04-11T04:10:50.000Z","updated_at":"2024-09-01T07:42:58.000Z","dependencies_parsed_at":"2024-04-17T09:58:22.698Z","dependency_job_id":"a6282903-ec83-48c6-841b-0ad439685beb","html_url":"https://github.com/EthanC/Leash","commit_stats":null,"previous_names":["ethanc/leash"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanC%2FLeash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanC%2FLeash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanC%2FLeash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanC%2FLeash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EthanC","download_url":"https://codeload.github.com/EthanC/Leash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219870042,"owners_count":16555391,"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":["api","bot","device","dhcp","dhcpv4","discord","ip","ip-address","lease","leases","mac","mac-address","monitor","notification","notify","opnsense","python","script","watcher","webhook"],"created_at":"2024-10-05T04:06:28.641Z","updated_at":"2025-10-16T12:30:39.955Z","avatar_url":"https://github.com/EthanC.png","language":"Python","funding_links":["https://cash.app/$EthanChrisp","https://venmo.com/u/Mxtive"],"categories":[],"sub_categories":[],"readme":"# Leash\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/EthanC/Leash/ci.yaml?branch=main) ![Docker Pulls](https://img.shields.io/docker/pulls/ethanchrisp/leash?label=Docker%20Pulls) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/ethanchrisp/leash/latest?label=Docker%20Image%20Size)\n\nLeash monitors the OPNsense DHCPv4 service and notifies about new leases via Discord.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/iYiKFBS.png\" draggable=\"false\"\u003e\n\u003c/p\u003e\n\n## Setup\n\nAlthough not required, a [Discord Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) is recommended for notifications.\n\nRegardless of your chosen setup method, Leash is intended for use with a task scheduler, such as [cron](https://crontab.guru/).\n\n**Environment Variables:**\n\n-   `LOG_LEVEL`: [Loguru](https://loguru.readthedocs.io/en/stable/api/logger.html) severity level to write to the console.\n-   `LOG_DISCORD_WEBHOOK_URL`: [Discord Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) URL to receive log events.\n-   `LOG_DISCORD_WEBHOOK_LEVEL`: Minimum [Loguru](https://loguru.readthedocs.io/en/stable/api/logger.html) severity level to forward to Discord.\n-   `OPNSENSE_ADDRESS` (Required): IP or URL for the local OPNsense instance.\n-   `OPNSENSE_KEY` (Required): Key for the local OPNsense instance.\n-   `OPNSENSE_SECRET` (Required): Secret for the local OPNsense instance.\n-   `DISCORD_WEBHOOK_URL`: [Discord Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) URL to receive OPNsense DHCPv4 Lease notifications.\n\n### Docker (Recommended)\n\nModify the following `compose.yaml` example file, then run `docker compose up`.\n\n```yml\nservices:\n  leash:\n    container_name: leash\n    image: ethanchrisp/leash:latest\n    environment:\n      LOG_LEVEL: INFO\n      LOG_DISCORD_WEBHOOK_URL: https://discord.com/api/webhooks/YYYYYYYY/YYYYYYYY\n      LOG_DISCORD_WEBHOOK_LEVEL: WARNING\n      OPNSENSE_ADDRESS: https://192.168.1.1\n      OPNSENSE_KEY: XXXXXXXX\n      OPNSENSE_SECRET: XXXXXXXX\n      DISCORD_WEBHOOK_URL: https://discord.com/api/webhooks/XXXXXXXX/XXXXXXXX\n```\n\n### Standalone\n\nLeash is built for [Python 3.12](https://www.python.org/) or greater.\n\n1. Install required dependencies using [uv](https://github.com/astral-sh/uv): `uv sync`\n2. Rename `.env.example` to `.env`, then provide the environment variables.\n3. Start Leash: `python leash.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanc%2Fleash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanc%2Fleash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanc%2Fleash/lists"}