Skip to content

Commit

Permalink
Verbose Health Check Names (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
burdandrei authored Jul 15, 2018
1 parent 6ed5747 commit 8248960
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.4.2 (July 15. 2018)

FEATURES:

* Verbose Health Check names giving the option to distinguish checks of multiple Resec instances running on the same node

## 0.4.1 (May 16, 2018)

FEATURES:
Expand Down
8 changes: 7 additions & 1 deletion consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,14 @@ func (rc *resec) registerService() error {
log.Printf("[INFO] Registered service [%s](id [%s]) with address [%s:%d]", serviceInfo.Name, serviceInfo.ID, serviceInfo.Address, serviceInfo.Port)
log.Printf("[DEBUG] Adding TTL Check with id %s to service %s with id %s", rc.consul.checkID, nameToRegister, serviceInfo.ID)

checkNameToRegister := rc.consul.serviceName

if checkNameToRegister == "" {
checkNameToRegister = rc.consul.serviceNamePrefix
}

check := &consulapi.AgentCheckRegistration{
Name: rc.redis.replicationStatus + " replication status",
Name: "Resec: " + checkNameToRegister + " " + rc.redis.replicationStatus + " replication status",
ID: rc.consul.checkID,
ServiceID: rc.consul.serviceID,
AgentServiceCheck: consulapi.AgentServiceCheck{
Expand Down

0 comments on commit 8248960

Please # to comment.