-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b48022
commit fec5bf2
Showing
13 changed files
with
158 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
* **BREAKING** http server is not started unless --p is provided | ||
* **BREAKING** migrated to new API /api/v1/events -> /api/events | ||
* if one of the threads exit, the whole program will exit | ||
* moved to [email protected], will migrated incident_key -> alert_key in code and db | ||
* moved to [email protected], will migrate incident_key -> alert_key in code and db | ||
* added event mapping keys to map mqtt payloads to event api | ||
* added event filter keys to filter mqtt payloads | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,25 +25,35 @@ The ilert agent comes in a single binary with a small footprint and helps you to | |
|
||
### Docker image | ||
|
||
You can grab the latest release from [Docker hub](https://hub.docker.com/r/ilert/ilagent) | ||
You can grab the latest official image from [Docker hub](https://hub.docker.com/r/ilert/ilagent) | ||
|
||
```shell script | ||
```sh | ||
docker run ilert/ilagent | ||
``` | ||
|
||
### Install script | ||
|
||
For MacOS and Linux we also provide this one-liner to automatically install the agent: | ||
### Compile the binary from source | ||
|
||
> Note: default prebuild support stopped at version 0.3.0 if you cannot use the docker image or compile yourself and need new builds please open an issue | ||
> Note: requires Rust to be installed, see https://rustup.rs | ||
```shell script | ||
curl -sL https://raw.githubusercontent.com/iLert/ilagent/master/install.sh | bash - | ||
```sh | ||
git clone [email protected]:iLert/ilagent.git | ||
cd ilagent | ||
cargo build --release | ||
cd ./target/release | ||
./ilagent --help | ||
``` | ||
|
||
### Pre-build releases | ||
|
||
> Note: default prebuild support stopped at version 0.3.0 if you cannot use the docker image or compile yourself and need new builds please open an issue | ||
> 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 | ||
#### Install script | ||
|
||
For MacOS and Linux we also provide this one-liner to automatically install the agent: | ||
|
||
```shell script | ||
curl -sL https://raw.githubusercontent.com/iLert/ilagent/master/install.sh | bash - | ||
``` | ||
|
||
We provide pre compiled binaries for every major OS on the [release page of this repository](https://github.com/iLert/ilagent/releases). | ||
|
||
|
@@ -166,6 +176,13 @@ ilagent daemon -v -v \ | |
--filter_val 'ALARM' | ||
``` | ||
|
||
## Liveness probes | ||
|
||
When providing the `-p 8977` port argument the agent will start its http server. | ||
Providing both a `GET /ready` and a `GET /health` endpoint, these are currently static, but will be dynamic in the future. | ||
Additionally, we recommend providing the `-b il1hbt123...` heartbeat argument with the integration key of a heartbeat alert source | ||
to periodically ping the source. | ||
|
||
## Getting help | ||
|
||
We are happy to respond to [GitHub issues][issues] as well. | ||
|
@@ -177,7 +194,7 @@ We are happy to respond to [GitHub issues][issues] as well. | |
### Cross-Compiling | ||
|
||
Of course, you can also grab the source code and compile it yourself. | ||
Requires cross (`cargo install cross`) to be installed. | ||
Requires cross (`cargo install cross` for Apple Silicon support: `cargo install cross --git https://github.com/cross-rs/cross`) to be installed. | ||
|
||
- Mac (or your host): `cargo build --release` | ||
- Linux: `cross build --release --target x86_64-unknown-linux-gnu` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
cargo run -- daemon -p 8977 -v -v | ||
cargo run -- daemon -p 8977 -v -v -b 123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
cargo run -- daemon -v -v \ | ||
--kafka_brokers localhost:9092 --kafka_group_id ilagent -e 'test-topic' \ | ||
--event_key 'il1api123...' \ | ||
--map_key_alert_key 'mCode' \ | ||
--map_key_summary 'comment' \ | ||
--map_key_etype 'state' \ | ||
--map_val_etype_alert 'SET' \ | ||
--map_val_etype_accept 'ACK' \ | ||
--map_val_etype_resolve 'CLR' \ | ||
--filter_key 'type' \ | ||
--filter_val 'ALARM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
cargo run -- daemon -v -v \ | ||
-m 127.0.0.1 -q 1883 -n ilagent -e '#' \ | ||
--mqtt_event_key 'il1api112115xxx' \ | ||
--mqtt_map_key_alert_key 'mCode' \ | ||
--mqtt_map_key_summary 'comment' \ | ||
--mqtt_map_key_etype 'state' \ | ||
--mqtt_map_val_etype_alert 'SET' \ | ||
--mqtt_map_val_etype_accept 'ACK' \ | ||
--mqtt_map_val_etype_resolve 'CLR' \ | ||
--mqtt_filter_key 'type' \ | ||
--mqtt_filter_val 'ALARM' | ||
--event_key 'il1api123...' \ | ||
--map_key_alert_key 'mCode' \ | ||
--map_key_summary 'comment' \ | ||
--map_key_etype 'state' \ | ||
--map_val_etype_alert 'SET' \ | ||
--map_val_etype_accept 'ACK' \ | ||
--map_val_etype_resolve 'CLR' \ | ||
--filter_key 'type' \ | ||
--filter_val 'ALARM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.