{"id":19080660,"url":"https://github.com/valeriansaliou/vigil-local","last_synced_at":"2025-04-30T06:11:51.330Z","repository":{"id":43597483,"uuid":"281673108","full_name":"valeriansaliou/vigil-local","owner":"valeriansaliou","description":"🕯 Vigil Local daemon. Used as a slave service to monitor hosts behind a firewall and report their status to Vigil.","archived":false,"fork":false,"pushed_at":"2025-01-06T21:19:23.000Z","size":219,"stargazers_count":23,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T06:11:42.539Z","etag":null,"topics":["daemon","infrastructure","slave","slave-nodes","statuspage","vigil"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/vigil-local","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valeriansaliou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-07-22T12:36:41.000Z","updated_at":"2025-04-03T08:02:34.000Z","dependencies_parsed_at":"2024-11-09T02:25:01.640Z","dependency_job_id":"62acd679-4032-4216-938f-bfd873b37236","html_url":"https://github.com/valeriansaliou/vigil-local","commit_stats":{"total_commits":85,"total_committers":1,"mean_commits":85.0,"dds":0.0,"last_synced_commit":"d9b11b4b325c6a6c595926e7847007264dc18067"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valeriansaliou%2Fvigil-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valeriansaliou%2Fvigil-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valeriansaliou%2Fvigil-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valeriansaliou%2Fvigil-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valeriansaliou","download_url":"https://codeload.github.com/valeriansaliou/vigil-local/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651231,"owners_count":21621716,"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":["daemon","infrastructure","slave","slave-nodes","statuspage","vigil"],"created_at":"2024-11-09T02:24:53.227Z","updated_at":"2025-04-30T06:11:51.312Z","avatar_url":"https://github.com/valeriansaliou.png","language":"Rust","funding_links":["https://www.buymeacoffee.com/valeriansaliou"],"categories":[],"sub_categories":[],"readme":"Vigil Local\n===========\n\n[![Test and Build](https://github.com/valeriansaliou/vigil-local/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/valeriansaliou/vigil-local/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/valeriansaliou/vigil-local/workflows/Build%20and%20Release/badge.svg)](https://github.com/valeriansaliou/vigil-local/actions?query=workflow%3A%22Build+and+Release%22) [![dependency status](https://deps.rs/repo/github/valeriansaliou/vigil-local/status.svg)](https://deps.rs/repo/github/valeriansaliou/vigil-local) [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/valeriansaliou)\n\n**Vigil Local daemon. Used as a slave service to monitor hosts behind a firewall and report their status to Vigil.**\n\nVigil Local is an (optional) slave daemon that you can use to report internal service health to your [Vigil-powered status page](https://github.com/valeriansaliou/vigil) master server. It is designed to be used behind a firewall, and _**to monitor hosts bound to a local loop or LAN network, that are not available to your main Vigil status page**_. It can prove useful as well if you want to fully isolate your Vigil status page from your internal services.\n\nInstall Vigil Local on a server of yours and configure it with your Vigil endpoint URL and token; it will then start monitoring all configured nodes and report them to Vigil. Make sure that you pre-configure all local nodes as `local` in Vigil, and then as `poll` or `script` in Vigil Local, accordingly. The service identifier and node identifier must match on either sides, as they will be used to identify the replica status being reported from the Vigil Local slave to the Vigil master.\n\nMultiple slave daemons can run on separate servers or networks, and report a group of services and nodes to the same Vigil master. Make sure that multiple slaves are not double-reporting replicas on the same monitored service/node pair.\n\n_Tested at Rust version: `rustc 1.62.0 (a8314ef7d 2022-06-27)`_\n\n**🇧🇬 Crafted in Sofia, Bulgaria.**\n\n## What is Vigil?\n\n[Vigil is an open-source Status Page](https://github.com/valeriansaliou/vigil) you can host on your infrastructure, used to monitor all your servers and apps, and visible to your users.\n\nIt lets you monitor your critical systems using a variety of methods: `push` for applications using a Vigil Reporter library, `poll` for Vigil-reachable HTTP, TCP \u0026 ICMP services, `script` to execute custom probes, and `local` for non-Vigil-reachable private services.\n\nVigil Local lets you monitor nodes that are configured in `local` mode (in Vigil), aside other monitoring methods that do not require the Vigil Local utility (and thus can run on Vigil itself right away).\n\n## How to use it?\n\n### Installation\n\n**Install from binary:**\n\nA pre-built binary of Vigil Local is shared in the releases on GitHub. You can simply download the latest binary version from the [releases page](https://github.com/valeriansaliou/vigil-local/releases), and run it on your server.\n\nYou will still need to provide the binary with the configuration file, so make sure you have a Vigil Local `config.cfg` file ready somewhere.\n\n_The binary provided is statically-linked, which means that it will be able to run on any Linux-based server. Still, it will not work on MacOS or Windows machines._\n\n👉 _Each release binary comes with an `.asc` signature file, which can be verified using [@valeriansaliou](https://github.com/valeriansaliou) GPG public key: [:key:valeriansaliou.gpg.pub.asc](https://valeriansaliou.name/files/keys/valeriansaliou.gpg.pub.asc)._\n\n**Install from packages:**\n\nVigil Local provides [pre-built packages](https://packagecloud.io/valeriansaliou/vigil-local) for Debian-based systems (Debian, Ubuntu, etc.).\n\n**Important: Vigil Local only provides 64 bits packages targeting Debian 10, 11 \u0026 12 for now (codenames: `buster`, `bullseye` \u0026 `bookworm`). You will still be able to use them on other Debian versions, as well as Ubuntu.**\n\nFirst, add the Vigil Local APT repository (eg. for Debian `bookworm`):\n\n```bash\necho \"deb [signed-by=/usr/share/keyrings/valeriansaliou_vigil-local.gpg] https://packagecloud.io/valeriansaliou/vigil-local/debian/ bookworm main\" \u003e /etc/apt/sources.list.d/valeriansaliou_vigil-local.list\n```\n\n```bash\ncurl -fsSL https://packagecloud.io/valeriansaliou/vigil-local/gpgkey | gpg --dearmor -o /usr/share/keyrings/valeriansaliou_vigil-local.gpg\n```\n\n```bash\napt-get update\n```\n\nThen, install the Vigil Local package:\n\n```bash\napt-get install vigil-local\n```\n\nThen, edit the pre-filled Vigil Local configuration file:\n\n```bash\nnano /etc/vigil-local.cfg\n```\n\nFinally, restart Vigil Local:\n\n```\nservice vigil-local restart\n```\n\n**Install from Cargo:**\n\nIf you prefer managing `vigil-local` via Rust's Cargo, install it directly via `cargo install`:\n\n```bash\ncargo install vigil-local\n```\n\nEnsure that your `$PATH` is properly configured to source the Crates binaries, and then run Vigil Local using the `vigil-local` command.\n\n**Install from source:**\n\nThe last option is to pull the source code from Git and compile Vigil Local via `cargo`:\n\n```bash\ncargo build --release\n```\n\nYou can find the built binaries in the `./target/release` directory.\n\n**Install from Docker Hub:**\n\nYou might find it convenient to run Vigil Local via Docker. You can find the pre-built Vigil Local image on Docker Hub as [valeriansaliou/vigil-local](https://hub.docker.com/r/valeriansaliou/vigil-local/).\n\nFirst, pull the `valeriansaliou/vigil-local` image:\n\n```bash\ndocker pull valeriansaliou/vigil-local:v1.2.0\n```\n\nThen, seed it a configuration file and run it (replace `/path/to/your/vigil-local/config.cfg` with the path to your configuration file):\n\n```bash\ndocker run -v /path/to/your/vigil-local/config.cfg:/etc/vigil-local.cfg valeriansaliou/vigil-local:v1.2.0\n```\n\n### Configuration\n\nUse the sample [config.cfg](https://github.com/valeriansaliou/vigil-local/blob/master/config.cfg) configuration file and adjust it to your own environment.\n\nYou can also use environment variables with string interpolation in your configuration file, eg. `token = ${VIGIL_TOKEN}`.\n\n**Available configuration options are commented below, with allowed values:**\n\n**[server]**\n\n* `log_level` (type: _string_, allowed: `debug`, `info`, `warn`, `error`, default: `error`) — Verbosity of logging, set it to `error` in production\n\n**[report]**\n\n* `endpoint` (type: _string_, allowed: URL, no default) — Vigil status page master reporting URL (can be public via eg. HTTPS, or private over LAN; without trailing slash, eg. `https://status.example.com`)\n* `token` (type: _string_, allowed: any string, no default) — Your master Vigil Reporter token (as configured in Vigil)\n\n**[metrics]**\n\n* `interval` (type: _integer_, allowed: seconds, default: `120`) — Interval for which to probe nodes in `poll` and `script` mode (ie. all nodes)\n* `poll_retry` (type: _integer_, allowed: seconds, default: `2`) — Interval after which to try probe for a second time nodes in `poll` mode (only when the first check fails)\n* `poll_delay_dead` (type: _integer_, allowed: seconds, default: `10`) — Delay after which a node in `poll` mode is to be considered `dead` (ie. check response delay)\n* `poll_delay_sick` (type: _integer_, allowed: seconds, default: `1`) — Delay after which a node in `poll` mode is to be considered `sick` (ie. check response delay)\n\n**[probe]**\n\n**[[probe.service]]**\n\n* `id` (type: _string_, allowed: any unique lowercase string, no default) — Unique identifier of the probed service\n\n**[[probe.service.node]]**\n\n* `id` (type: _string_, allowed: any unique lowercase string, no default) — Unique identifier of the probed service node\n* `mode` (type: _string_, allowed: `poll`, `script`, no default) — Probe mode for this node (ie. `poll` is direct HTTP, TCP or ICMP poll to the URLs set in `replicas`, while `script` is used to execute a shell script)\n* `replicas` (type: _array[string]_, allowed: TCP, ICMP or HTTP URLs, default: empty) — Node replica URLs to be probed (only used if `mode` is `poll`)\n* `scripts` (type: _array[string]_, allowed: shell scripts as source code, default: empty) — Shell scripts to be executed on the system as a Vigil Local sub-process; they are handy to build custom probes (only used if `mode` is `script`)\n\n### Run\n\nVigil Local can be run as such:\n\n`./vigil-local -c /path/to/config.cfg`\n\n## :fire: Report A Vulnerability\n\nIf you find a vulnerability in Vigil Local, you are more than welcome to report it directly to [@valeriansaliou](https://github.com/valeriansaliou) by sending an encrypted email to [valerian@valeriansaliou.name](mailto:valerian@valeriansaliou.name). Do not report vulnerabilities in public GitHub issues, as they may be exploited by malicious people to target production servers running an unpatched Vigil Local daemon.\n\n**:warning: You must encrypt your email using [@valeriansaliou](https://github.com/valeriansaliou) GPG public key: [:key:valeriansaliou.gpg.pub.asc](https://valeriansaliou.name/files/keys/valeriansaliou.gpg.pub.asc).**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaleriansaliou%2Fvigil-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaleriansaliou%2Fvigil-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaleriansaliou%2Fvigil-local/lists"}