Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axsuul/nomad-event-streamer
Streams HashiCorp Nomad events to your favorite destinations
https://github.com/axsuul/nomad-event-streamer
hashicorp nomad
Last synced: 3 months ago
JSON representation
Streams HashiCorp Nomad events to your favorite destinations
- Host: GitHub
- URL: https://github.com/axsuul/nomad-event-streamer
- Owner: axsuul
- License: mit
- Created: 2022-01-06T10:36:37.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T16:23:11.000Z (about 1 year ago)
- Last Synced: 2024-05-18T23:03:32.756Z (6 months ago)
- Topics: hashicorp, nomad
- Language: Ruby
- Homepage:
- Size: 438 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-nomad - axsuul/nomad-event-streamer - A tool for sending Nomad events to your favorite destinations like Discord and Slack. (Utilities)
README
# Nomad Event Streamer
Streams HashiCorp Nomad events to your favorite destinations.
### Discord
![Discord](assets/discord.png)
### Slack
![Slack](assets/slack.png)
## Usage
Refer to [app.rb](./app.rb) for supported environment variables.
## Docker
Each commit has a [Docker image](https://github.com/axsuul/nomad-event-streamer/pkgs/container/nomad-event-streamer) built for it or use `ghcr.io/axsuul/nomad-event-streamer:latest`.
## Development
`bundle` then run tests with
```shell
bundle exec rspec
```## Testing
Below are some job files to test failure and success states.
```terraform
job "oom-killed" {
datacenters = ["dc1"]
type = "service"group "oom-killed" {
task "oom-task" {
driver = "docker"env {
NODE_NAME = "${node.unique.name}"
}config {
image = "zyfdedh/stress"
command = "sh"
args = [
"-c",
"sleep 10; stress --vm 1 --vm-bytes 50M",
]
}resources {
memory = 15
}
}
}
}
``````terraform
job "exit-zero" {
datacenters = ["dc1"]
type = "batch"group "exit-zero" {
task "exit-task" {
driver = "docker"config {
image = "bash"
command = "bash"
args = [
"-c",
"sleep 10; exit 0",
]
}
}
}
}
```