Zagent is a small/simple library for getting values from a zabbix agent running on a remote machine.
Zagent is licensed under the MIT license.
go get github.com/sfreiberg/zagent
package main
import (
"github.com/sfreiberg/zagent"
"fmt"
)
func main() {
agent := zagent.NewAgent("127.0.0.1")
res, err := agent.Query("agent.ping", 0)
if err != nil {
panic(err)
}
fmt.Printf("%s\n", res.Data)
}