zabbix sender golang package
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3c6a95e Jan 17, 2017
Permalink
Failed to load latest commit information.
LICENSE Initial commit Feb 26, 2015
README.md Add README.md Feb 26, 2015
zabbix.go error handling added Jan 11, 2017
zabbix_test.go a test added Jan 11, 2017

README.md

go-zabbix

Golang package, implement zabbix sender protocol for send metrics to zabbix.

Example:

package main

import (
    "time"
    . "github.com/blacked/go-zabbix"
)

const (
    defaultHost  = `localhost`
    defaultPort  = 10051
)

func main() {
    var metrics []*Metric
    metrics = append(metrics, NewMetric("localhost", "cpu", "1.22", time.Now().Unix()))
    metrics = append(metrics, NewMetric("localhost", "status", "OK"))

    // Create instance of Packet class
    packet := NewPacket(metrics)

    // Send packet to zabbix
    z := NewSender(defaultHost, defaultPort)
    z.Send(packet)
}