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
1 year ago
cmd DnsSpy bugfixing 1 year ago
pkg Bugfixing 1 year ago
resources/dns Updated readme and domains.yml configuration file 1 year ago
.gitignore Removed vendor 1 year ago
Makefile More on arm compilation 1 year ago
README.md Readme.md 1 year ago
go.mod More on dyndns 1 year ago
go.sum More on dyndns 1 year 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)
}