outposts: include hostname in outpost heartbeat

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-12-28 16:02:16 +01:00
parent a148e611f3
commit 2b2323fae7
6 changed files with 38 additions and 11 deletions

View File

@ -167,6 +167,19 @@ func (a *APIController) OnRefresh() error {
return err
}
func (a *APIController) getWebsocketArgs() map[string]interface{} {
args := map[string]interface{}{
"version": constants.VERSION,
"buildHash": constants.BUILD("tagged"),
"uuid": a.instanceUUID.String(),
}
hostname, err := os.Hostname()
if err == nil {
args["hostname"] = hostname
}
return args
}
func (a *APIController) StartBackgroundTasks() error {
OutpostInfo.With(prometheus.Labels{
"outpost_name": a.Outpost.Name,