go-consul-cleanup

module
v0.0.0-...-a9badaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2020 License: GPL-3.0

README

go-consul-cleanup Go

Go Application for cleaning up Failing health checks and Redundant Services in Consul

I've Written this application to allow cleanup of Services with failing Healtcheks in consul. This application also cleans up Redundant Checks and Services that come up in Consul.

Usage

  • To build the Binary-
cd cmd
go build .
  • To run the Binary
./cmd -config <configFilePath>

Configuration

  • A sample config File looks like this-
logging:
  logfile: "/Users/kashishsoni/go/logs/consul_cleanup.log"
  level: "INFO"
  logToStdout: true

defaults:
  port: 8600

bootstrap:
  node:
    address: ""
    port: 8400
  datacenter: ""

  1. I have tried to keep only the necessary params in config
  2. The logging config in the configuration Defines the Defaults for logging
  3. The defaults subsection deals with default consul node ports when not specified in the IP
  4. The bootstrap subsection defines the bootstrap datacenter and the bootstrap node that will be used to start cleanup in the configuration.
    1. Bootstrap Node: This Defines the Ip and Port of the consul node from which the script will fetch the Address of all the other nodes to connect to. This will also be the first node the program will connect to.
    2. Bootstrap Datacenter: This Defines the current Datacenter on which the cleanup is being performed. This Cleanup will be performed only on the nodes in this specified Datacenter. This done in order to prevent unexpected behaviour.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL