Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.85 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.85 KB

golang-prtg-api-wrapper

Build Status Coverage Status Go Report Card GoDoc GoDoc
PRTG API WRAPPER for Golang Developer

Status

Experimental

Motivation

To be used by developers in my team, to fetch data from PRTG. Freely used by others according to the LICENSE.

How to Start

$ go get github.com/haidlir/golang-prtg-api-wrapper

Example

package main

import (
	"log"

	"github.com/haidlir/golang-prtg-api-wrapper/prtg-api"
)

func main() {
	// Configuration
	server := "https://prtg.paessler.com"
	username := "demo"
	password := "demodemo"

	client := prtg.NewClient(server, username, password)
	prtgVersion, err := client.GetPrtgVersion()
	if err != nil {
		log.Println(err)
	} else {
		log.Printf("The version of PRTG on %v is %v.", server, prtgVersion)
	}
}

More Example...

License

It is released under the MIT license. See LICENSE.