Monitor Job events
and add time to Nomad event monitoring.
This commit is contained in:
@ -181,6 +181,7 @@ func (nc *nomadAPIClient) EventStream(ctx context.Context) (<-chan *nomadApi.Eve
|
||||
// As Poseidon uses no such token, the request will return a permission denied error.
|
||||
"*",
|
||||
},
|
||||
nomadApi.TopicJob: {"*"},
|
||||
},
|
||||
0,
|
||||
nc.queryOptions())
|
||||
|
@ -235,6 +235,7 @@ func dumpNomadEventToInflux(event *nomadApi.Event) {
|
||||
p.AddTag("type", event.Type)
|
||||
p.AddTag("key", event.Key)
|
||||
p.AddField("payload", event.Payload)
|
||||
p.AddTag("time", time.Now().Format("03:04:05.000000000"))
|
||||
monitoring.WriteInfluxPoint(p)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user