GoLang collector of host relevante metrics and overall information
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
balhau ce67835bd7
Bugfixing
2 years ago
cmd DnsSpy bugfixing 2 years ago
pkg Bugfixing 2 years ago
resources/dns Updated readme and domains.yml configuration file 2 years ago
.gitignore Removed vendor 2 years ago
Makefile More on arm compilation 2 years ago
README.md Readme.md 2 years ago
go.mod More on dyndns 2 years ago
go.sum More on dyndns 2 years ago

README.md

go-monitor

What?

Monitoring collector tools golang.

Running

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

Components

DnsSpy

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)
}