Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gounity

Dell EMC Unity package that provides API bindings for Go.

Examples

Initialize a new Unity session

server := "myunity.example.com"
insecure := true
username := "myuser"
password := "mypassword"

session, err := gounity.NewSession(server, insecure, username, password)
if err != nil {
    log.Fatal(err)
}

Get Unity's DNS configuration

err = session.GetDNSServer()
if err != nil {
    log.Fatal(err)
}

Create a realtime metric's query

// metric paths
paths := []string{
    "sp.*.cpu.summary.busyTicks",
    "sp.*.cpu.uptime",
    "sp.*.storage.pool.*.sizeFree",
    "sp.*.storage.pool.*.sizeSubscribed",
    "sp.*.storage.pool.*.sizeTotal",
    "sp.*.storage.pool.*.sizeUsed",
    "sp.*.storage.pool.*.sizeUsedBlocks",
    "sp.*.memory.summary.totalBytes",
    "sp.*.memory.summary.totalUsedBytes",
}

// metric interval in second
var interval uint32
interval = 60

Metric, err := session.NewMetricRealTimeQuery(paths, interval)
if err != nil {
    log.Fatal(err)
}

Author

Erwan Quélin

License

Copyright 2017 Erwan Quelin and the community.

Licensed under the MIT License.

About

Dell EMC Unity package that provides API bindings for Go

Resources

Stars

8 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages