Skip to content

Commit

Permalink
Added country information to Mentix (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-WWU-IT authored Jul 1, 2020
1 parent 2f6cc60 commit 9585aa7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/mentix/connectors/gocdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func (connector *GOCDBConnector) querySites(meshData *meshdata.MeshData) error {
Homepage: site.Homepage,
Email: site.Email,
Description: site.Description,
Country: site.Country,
CountryCode: site.CountryCode,
Services: nil,
Properties: properties,
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/mentix/connectors/gocdb/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ type Site struct {
Homepage string `xml:"HOME_URL"`
Email string `xml:"CONTACT_EMAIL"`
Domain string `xml:"DOMAIN>DOMAIN_NAME"`
Country string `xml:"COUNTRY"`
CountryCode string `xml:"COUNTRY_CODE"`
Extensions Extensions `xml:"EXTENSIONS"`
}

Expand Down
1 change: 1 addition & 0 deletions pkg/mentix/exporters/promfilesd.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func (exporter *PrometheusFileSDExporter) createScrapeConfigs() []*prometheus.Sc
func (exporter *PrometheusFileSDExporter) createScrapeConfig(site *meshdata.Site, host string, endpoint *meshdata.ServiceEndpoint) *prometheus.ScrapeConfig {
labels := map[string]string{
"site": site.Name,
"country": site.CountryCode,
"service_type": endpoint.Type.Name,
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/mentix/meshdata/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ type Site struct {
Homepage string
Email string
Description string
Country string
CountryCode string
Location string

Services []*Service
Properties map[string]string
Expand Down

0 comments on commit 9585aa7

Please sign in to comment.