Documentation
¶
Index ¶
- func Decrypt(data []byte, passphrase string) ([]byte, error)
- func Encrypt(data []byte, passphrase string) ([]byte, error)
- func GenTemplate(tags []string, Age time.Duration, tplate string) error
- func SensorWarn(inErr error, er bool)
- type Check
- type Client
- func (c *Client) DsSummary(name, moid string, lim *LimitsStruct, js bool) (err error)
- func (c *Client) DynTemplate(tags []string, Age time.Duration, tplate string) error
- func (c *Client) HostSummary(name, moid string, js bool) (err error)
- func (c *Client) Logout() error
- func (c *Client) Metascan(tags []string, tm *TagMap, Age time.Duration) (err error)
- func (c *Client) Metrics(mor types.ManagedObjectReference, pr *prtgData, str []string, interval int32) (err error)
- func (c *Client) SnapShotsOlderThan(f property.Filter, tagIds []string, lim *LimitsStruct, age time.Duration, ...) (err error)
- func (c *Client) VMSummary(name, moid string, lim *LimitsStruct, age time.Duration, txt bool, ...) error
- func (c *Client) VdsSummary(name, moid string, js bool) (err error)
- type Createdata
- type Devicetemplate
- type Item
- type LimitsStruct
- type Metadata
- type TagMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTemplate ¶
GenTemplate creates a template for use with single time ingestion / manual reset
func SensorWarn ¶
SensorWarn is used to return an error via PRTG message
Types ¶
type Check ¶
type Check struct {
ID string `xml:"id,attr,omitempty"`
Kind string `xml:"kind,attr,omitempty"`
Meta string `xml:"meta,attr,omitempty"`
Requires string `xml:"requires,attr,omitempty"`
Metadata Metadata `xml:"metadata,omitempty"`
Createdata Createdata `xml:"createdata,omitempty"`
Displayname string `xml:"displayname,attr,omitempty"`
}
Check xml template
type Client ¶
type Client struct {
Cached bool
// contains filtered or unexported fields
}
Client holds the connections we need to query the remote system
func (*Client) DsSummary ¶
func (c *Client) DsSummary(name, moid string, lim *LimitsStruct, js bool) (err error)
DsSummary stats for a datastore
func (*Client) DynTemplate ¶
DynTemplate creates a template for regular ingestion by PRTG
func (*Client) HostSummary ¶
HostSummary stats for a host system
func (*Client) Metrics ¶
func (c *Client) Metrics(mor types.ManagedObjectReference, pr *prtgData, str []string, interval int32) (err error)
Metrics returns metrics for a given object
func (*Client) SnapShotsOlderThan ¶
func (c *Client) SnapShotsOlderThan(f property.Filter, tagIds []string, lim *LimitsStruct, age time.Duration, txt bool) (err error)
SnapShotsOlderThan tag focused snapshot reporting
type Createdata ¶
type Createdata struct {
Priority string `xml:"priority,omitempty"`
Position string `xml:"position,omitempty"`
Interval string `xml:"interval,omitempty"`
Count string `xml:"count,omitempty"`
Errorintervalsdown string `xml:"errorintervalsdown,omitempty"`
Autoacknowledge string `xml:"autoacknowledge,omitempty"`
Tags string `xml:"tags,omitempty"`
Timeout string `xml:"timeout,omitempty"`
Exefile string `xml:"exefile,omitempty"`
Exeparams string `xml:"exeparams,omitempty"`
Name string `xml:"name,omitempty"`
Mutex string `xml:"mutexname,omitempty"`
Decimaldigits string `xml:"decimaldigits,omitempty"`
}
Createdata xml template
type Devicetemplate ¶
type Devicetemplate struct {
XMLName xml.Name `xml:"devicetemplate"`
Text string `xml:",chardata"`
ID string `xml:"id,attr"`
Name string `xml:"name,attr"`
Priority string `xml:"priority,attr"`
Check Check `xml:"check,omitempty"`
Create []Check `xml:"create,omitempty"`
}
Devicetemplate xml template
func NewDeviceTemplate ¶
func NewDeviceTemplate(Age time.Duration, Tags string) *Devicetemplate
NewDeviceTemplate creates a new base template
type Item ¶
type Item struct {
Name string `xml:"name,omitempty"`
ID string `xml:"id,omitempty"`
Exefile string `xml:"exefile"`
Params string `xml:"params"`
Displayname string `xml:"displayname,attr,omitempty"`
Autoacknowledge string `xml:"autoacknowledge,attr,omitempty"`
}
Item is used in templates
type LimitsStruct ¶
type LimitsStruct struct {
MinWarn, MaxWarn, MinErr, MaxErr, WarnMsg, ErrMsg string
}
LimitsStruct is used to set error and warning levels
Click to show internal directories.
Click to hide internal directories.