From 66826d9f4912cd9ee32de5d3d8e372bbf26a6ad3 Mon Sep 17 00:00:00 2001 From: amreo Date: Thu, 5 Sep 2019 17:24:17 +0200 Subject: [PATCH] Added hostType field --- config/config.go | 4 ++++ main.go | 1 + model/hostdata.go | 1 + 3 files changed, 6 insertions(+) diff --git a/config/config.go b/config/config.go index 257f14e..2a42a41 100644 --- a/config/config.go +++ b/config/config.go @@ -29,6 +29,7 @@ type Configuration struct { Hostname string Envtype string Location string + HostType string Serverurl string Serverusr string Serverpsw string @@ -73,6 +74,9 @@ func ReadConfig() Configuration { if conf.Oratab == "" { conf.Oratab = "/etc/oratab" } + if conf.HostType == "" { + conf.HostType = "oracledb" + } return conf } diff --git a/main.go b/main.go index b09b724..711f026 100644 --- a/main.go +++ b/main.go @@ -161,6 +161,7 @@ func buildData(configuration config.Configuration) { } hostData.Environment = configuration.Envtype hostData.Location = configuration.Location + hostData.HostType = configuration.HostType hostData.Version = version // Fill index fields diff --git a/model/hostdata.go b/model/hostdata.go index a522291..30de08d 100644 --- a/model/hostdata.go +++ b/model/hostdata.go @@ -20,6 +20,7 @@ type HostData struct { Hostname string Environment string Location string + HostType string Version string Databases string Schemas string