Skip to content

davemay99/nomad-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Event Sinks

This reproduction is for registering an event sink and testing that it has been configured correctly.

Requirements

  • Nomad
  • Go (to run the included webhook_server.go)

Start Nomad

$ nomad agent -dev

Register an event sink

$ cat all-jobs-sink.json
{
  "ID": "all-jobs",
  "Address": "http://127.0.0.1:8080",
  "Topics": {
    "Job": [
      "*"
    ]
  },
  "Type": "webhook"
}
$ nomad event sink register all-jobs-sink.json

Start the webhook server

# in a separate terminal
$ go run webhook_server.go 8080 # this port comes from the Address in all-jobs-sink.json

Run an example job

$ nomad job run example.nomad

See the event in the webhook server output

$ go run webhook_server.go 8080
{"Index":15,"Events":[{"Topic":"Job","Type":"JobRegistered","Key":"example"...

About

Nomad event-sink bridge to MQTT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages