Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Add DataCenterLookupValues setting #857

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sjmudd
Copy link
Collaborator

@sjmudd sjmudd commented Apr 3, 2019

See: #856

This PR provides a patch to add a new configuration setting: DataCenterLookupValues which would be applied after applying DataCenterPattern on the instance hostname.

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports)
  • code is built via ./build.sh # this currently fails as you only support up to go 1.10. I'm using go 1.12.
  • code is tested via go test ./go/...

Please let me know if this looks reasonable.

@sjmudd
Copy link
Collaborator Author

sjmudd commented Apr 3, 2019

I'll make a PR to support a higher version of Go.

@sjmudd
Copy link
Collaborator Author

sjmudd commented Jun 28, 2019

Perhaps I should provide some context:

The term "datacentre" used in orchestrator is good but in some cases you may want to group more than one datacentre (located close by) into a single availability zone. Orchestrator doesn't have a way to reference availability zones as such so an easy way to resolve this is to map parts of a hostname which include a datacentre into a AZ definition, after which orchestrator colouring in the GUI will treat the servers as being in the same "area". This looks better than seeing them mixed when logically they should be considered together.

This change handles the mangling based on the server's hostname which is simpler than doing a more complex if(...) type SQL query against each instance being monitored. Doing this against each instance being monitored is an extra query and that increases latency of the time to poll a server so is not ideal if the number of servers being monitored is large.

@shlomi-noach shlomi-noach self-requested a review June 29, 2019 05:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant