{"id":21722075,"url":"https://github.com/ilert/ilagent","last_synced_at":"2026-02-16T04:31:00.596Z","repository":{"id":46279687,"uuid":"202614311","full_name":"iLert/ilagent","owner":"iLert","description":"The ilert Agent :crab: :package: is a program that lets you easily integrate your on premise system with ilert.","archived":false,"fork":false,"pushed_at":"2025-12-21T00:32:09.000Z","size":1864,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-22T22:06:24.356Z","etag":null,"topics":["agent","alerting","ilert","linux","monitoring","onpremise","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iLert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2019-08-15T21:33:40.000Z","updated_at":"2025-12-21T00:29:31.000Z","dependencies_parsed_at":"2025-04-12T21:37:10.331Z","dependency_job_id":"d4b2ebf3-de3f-411b-bdbe-fd61db68999f","html_url":"https://github.com/iLert/ilagent","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/iLert/ilagent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLert%2Filagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLert%2Filagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLert%2Filagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLert%2Filagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iLert","download_url":"https://codeload.github.com/iLert/ilagent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLert%2Filagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29500297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["agent","alerting","ilert","linux","monitoring","onpremise","rust"],"created_at":"2024-11-26T02:20:58.058Z","updated_at":"2026-02-16T04:31:00.590Z","avatar_url":"https://github.com/iLert.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ilagent \n\n![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/ilert/ilagent?sort=date)\n![Docker Image Version (latest by date)](https://img.shields.io/docker/v/ilert/ilagent?sort=date)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/iLert/ilagent/docker-release.yml)\n\nThe ilert Agent 🦀 📦 is a program that lets you easily integrate your on premise system with ilert - a swiss army knife.\n\n## ilert agent\n\nThe ilert agent comes in a single binary with a small footprint and helps you to\n\n* Send events from the command line `ilagent event -k il1api123... -t ALERT -s 'a summary from the shell'`\n* Send heartbeat pings from the command line `ilagent heartbeat -k il1hbt123...`\n* Monitor a host with regular heartbeats `ilagent daemon -b il1hbt123...`\n* Run a proxy server with retry-queue for HTTP events and heartbeats on premise `ilagent daemon -p 8977`\n* Run a proxy server with retry-queue for MQTT events and heartbeats on premise `ilagent daemon -m 192.168.1.14`\n* Run a proxy server with retry behaviour for Apache Kafka messages on premise `ilagent daemon --kafka_brokers localhost:9092`\n* Map and filter your MQTT or Kafka events to alerts [see](#mapping-consumer-messages-to-events)\n* Clean-up your open alerts (mass resolve) `ilagent cleanup -k your-api-key --resource alerts`\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"/docs/misc/froggo.png?raw=true\"/\u003e\u003c/p\u003e\n\n## Downloading / Installing\n\n### Docker image\n\nYou can grab the latest official image from [Docker hub](https://hub.docker.com/r/ilert/ilagent)\n\n```sh\ndocker run ilert/ilagent\n```\n\n### Compile the binary from source\n\n\u003e Note: requires Rust to be installed, see https://rustup.rs\n\n```sh\ngit clone git@github.com:iLert/ilagent.git\ncd ilagent\ncargo build --release\ncd ./target/release\n./ilagent --help\n```\n\n### Pre-build releases\n\n\u003e Note: default prebuild support stopped at version 0.3.0 if you cannot use the docker image or cant compile yourself and need new builds please open an issue\n\n#### Install script\n\nFor MacOS and Linux we also provide this one-liner to automatically install the agent:\n\n```shell script\ncurl -sL https://raw.githubusercontent.com/iLert/ilagent/master/install.sh | bash -\n```\n\nWe provide pre compiled binaries for every major OS on the [release page of this repository](https://github.com/iLert/ilagent/releases).\n\nGrab your version\n\n- [Linux x86_64](https://github.com/iLert/ilagent/releases/download/0.3.0/ilagent_linux)\n- [Windows x86_64](https://github.com/iLert/ilagent/releases/download/0.3.0/ilagent.exe)\n- [Mac x86_64](https://github.com/iLert/ilagent/releases/download/0.3.0/ilagent_mac)\n- [ARM (gnueabihf)](https://github.com/iLert/ilagent/releases/download/0.3.0/ilagent_arm)\n- [Others][issues]\n\n## Quick gimmicks\n\n- The proxy exposes the exact same API as our public `https://api.ilert.com/api` you can therefore use our [API Docs](https://api.ilert.com/api-docs/#tag/Events)\n- When running in `daemon` mode, it is always possible to provide a `-b il1hbt123...` heartbeat api key\nto monitor the uptime of the agent\n- To adjust the log level you can provide multiple `-v -v #info` verbose flags, default is error\n- The event command supports additional args to add an image `-g 'url'`, link `-l 'url'` or priority `-o 'LOW'`\n- You can adjust the MQTT topics that the proxy is listening on `-e 'ilert/events'` or `-r 'ilert/heartbeats'`\n- Per default the `daemon` mode will not start an HTTP server, however you can provide a port with `-p 8977` to start it\n- The agent will buffer events locally (except in kafka mode) using SQLite3 it will therefore require file system access in `daemon` mode\n- Running detached: `nohup sh -c 'ilagent daemon -m 192.168.1.14 -b il1hbt123... -v -v'  \u003e ./ilagent.log 2\u003e\u00261 \u0026`\n\nYou can always run `ilagent --help` or take a look at our [documentation](https://docs.ilert.com/developer-docs/client-libraries/ilagent)) for help.\n\n# Consumers\n\n\u003e Note: we expect your message payloads to be in JSON format\n\nA minimal event payload `{\n  \"summary\": \"Hey from Kafka\",\n  \"eventType\": \"ALERT\",\n  \"apiKey\": \"il1awx123...\"\n}`\n\nA minimal heartbeat payload `{\n  \"apiKey\": \"il1awx123...\"\n}`\n\n## MQTT\n\n### Connection\n\nAfter connecting to your MQTT broker or proxy using `-m 127.0.0.1 -q 1883 -n ilagent`\nyou may specify the MQTT topic that should be listened to for events with `-e 'ilert/events'`.\n\n#### Providing credentials\n\nIn case you need to provide credentials to your MQTT broker you can do so by passing the two arguments `--mqtt_username 'my-user'`\nand `--mqtt_password 'my-pass'`, there is no default provided otherwise.\n\n### At least once delivery\n\nIn MQTT mode events are buffered in SQLite3 to enable re-tries and guarantee delivery. If running the agent in Kubernetes make\nsure to provide it with an attached volume for the ilagent3.db file in case you need delivery guarantee.\n\n### Subscribing to wildcards\n\nYou may subscribe to wildcard topics like `-e 'ilert/+'` or `-e '#'`.\n\n## Apache Kafka\n\n### Connection\n\nAfter connecting to your bootstrap broker(s) using `--kafka_brokers localhost:9092 --kafka_group_id ilagent`\nyou may specify the topic that should be subscribed to for events with `-e 'test-topic-events'` and for heartbeats `-r 'test-topic-hbts'`.\n\n### At least once delivery\n\nIn Kafka mode events are NOT buffered in SQLite3, as the consumer offset is used to keep track and guarantee at least once delivery.\nIf an event cannot be delivered the offset is not committed and the agent will exit after 5 seconds. We recommend running the agent\nin such a way that it is automatically restarted on exit e.g. `docker run ilert/ilagent --restart always`\n\n## Mapping consumer messages to events\n\n### Filtering messages\n\nFor a certain JSON key `--filter_key 'type'` or value of the key `--filter_val 'ALERT'`.\nThe above example will only process message payloads that fit `{ \"type\": \"ALERT\" }`.\n\n### Setting a fixed API key\n\nMost likely when mapping custom events from MQTT topics, you will not be able to 1:1 map an apiKey field.\nThis is why the `--event_key 'il1api123...'` option allows you to set a fixed ilert alert source API key\nthat is automatically used for every mapped event.\n\n### Mapping required event fields\n\n- You may map the `alertKey` field using `--map_key_alert_key 'mCode'` e.g. `{ \"mCode\": \"123\" }` -\u003e 123\n- You may map the `summary` field using `--map_key_summary 'comment'` e.g. `{ \"comment\": \"A comment\" }` -\u003e \"A comment\"\n- You may map the `eventType` field using `--map_key_etype 'state'` e.g. `{ \"state\": \"ACK\" }` -\u003e \"ACK\"\n\n\u003e Note: if you are using custom mapping and fail to set the required field summary for ALERT events, the summary will be generated using the MQTT topic name of the message\n\u003e Note: if you fail to map the required event properties such as apiKey or eventType the event call will fail\n\n### Mapping values of the eventType field\n\nIn case the property values of your eventType field do not match to ilert's API fields `ALERT, ACCEPT and RESOLVE` you may map these values as well.\n\n- map `ALERT` value with `--map_val_etype_alert 'SET'` e.g. SET -\u003e ALERT\n- map `ACCEPT` value with `--map_val_etype_accept 'ACK'` e.g. ACK -\u003e ACCEPT\n- map `RESOLVE` value with `--map_val_etype_resolve 'CLR'` e.g. CLR -\u003e RESOLVE\n\n\u003e Note: you may increase the log verbosity to understand why and how events are mapped by providing multiple `-v` depending on the loglevel\n\n### Complete sample command\n\n```sh\nilagent daemon -v -v \\\n    -m 127.0.0.1 -q 1883 -n ilagent -e '#' \\\n    --mqtt_username 'my-user' --mqtt_password 'my-pass' \\\n    --event_key 'il1api112115xxx' \\\n    --map_key_alert_key 'mCode' \\\n    --map_key_summary 'comment' \\\n    --map_key_etype 'state' \\\n    --map_val_etype_alert 'SET' \\\n    --map_val_etype_accept 'ACK' \\\n    --map_val_etype_resolve 'CLR' \\\n    --filter_key 'type' \\\n    --filter_val 'ALARM'\n```\n\n## Liveness probes\n\nWhen providing the `-p 8977` port argument the agent will start its http server.\nProviding both a `GET /ready` and a `GET /health` endpoint, these are currently static, but will be dynamic in the future.\nAdditionally, we recommend providing the `-b il1hbt123...` heartbeat argument with the integration key of a heartbeat alert source\nto periodically ping the source.\n\n## Getting help\n\nWe are happy to respond to [GitHub issues][issues] as well.\n\n\u003cbr\u003e\n\n## Developing\n\n### Cross-Compiling\n\nOf course, you can also grab the source code and compile it yourself.\nRequires cross (`cargo install cross` for Apple Silicon support: `cargo install cross --git https://github.com/cross-rs/cross`) to be installed.\n\n- Mac (or your host): `cargo build --release`\n- Linux: `cross build --release --target x86_64-unknown-linux-gnu`\n- Windows: `cross build --release --target x86_64-pc-windows-gnu`\n- ARM: `cross build --release --target arm-unknown-linux-gnueabihf`\n- All `cargo build --release \u0026\u0026 cross build --release --target x86_64-unknown-linux-gnu \u0026\u0026 cross build --release --target x86_64-pc-windows-gnu \u0026\u0026 cross build --release --target arm-unknown-linux-gnueabihf`\n\n\n#### License\n\n\u003csup\u003e\nLicensed under \u003ca href=\"LICENSE\"\u003eApache License, Version 2.0\u003c/a\u003e\nNote that, depending on the usage of ilagent, it bundles SQLite and other libraries which might have different licenses\nyou can read more about them [here](https://github.com/rusqlite/rusqlite#license)\n\u003c/sup\u003e\n\n[issues]: https://github.com/iLert/ilagent/issues/new\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filert%2Filagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filert%2Filagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filert%2Filagent/lists"}