|
2 years ago | |
---|---|---|
cmd | 2 years ago | |
pkg | 2 years ago | |
resources/dns | 2 years ago | |
.gitignore | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago |
Monitoring collector tools golang.
This project uses a makefile
to automate some of the build steps needed.
To build the binaries you need to run
make build
To clean compilation artifacts run
make clean
If you invoke make
the default associated target steps are the equivalent of
make format build
This is a cron based dns updater for bind dns daemon. It consumes a bind.template file, and a yaml domain file and creates bind
dns configuration files. The strategy will issue a bind reboot command.
As example
import (
"log"
"os"
"git.balhau.net/monitor/pkg/dns"
)
const (
DNS_UPDATER_FREQ = 20
)
func main() {
var dnsSpy = dns.NewDnsBindSpy(os.Getenv(dns.DNS_CONFIG_PATH_ENV), DNS_UPDATER_FREQ)
var err = dnsSpy.InitSpy()
if err != nil {
log.Fatal(err)
return
}
dns.StartBlockingSpy(&dnsSpy)
}