Documentation ¶
Index ¶
- Constants
- func FlattenEntities(in *ManagedEntities, types map[string]Type) (entities map[string]ManagedEntity)
- func FlattenProbes(in *Probes) (probes map[string]Probe)
- func FlattenSamplers(in *Samplers) (samplers map[string]Sampler)
- func FlattenTypes(in *Types) (types map[string]Type)
- func GetPlugin(plugin *Plugin) interface{}
- func RemoveDuplicates[T KeyedObject](kvs []T) []T
- type APIPlugin
- type APIStreamsPlugin
- type AddTypes
- type Attribute
- type CollectionAgent
- type ControlMPlugin
- type DBConnection
- type Data
- type Dataview
- type DataviewAddition
- type DataviewAdditionColumns
- type DataviewAdditionHeadlines
- type DataviewAdditionRows
- type DataviewAdditions
- type DataviewSchema
- type DynamicEntities
- type EmptyStruct
- type Environment
- type EnvironmentGroup
- type EnvironmentRef
- type EnvironmentVariable
- type Environments
- type FKMDisplay
- type FKMFile
- type FKMFileSource
- type FKMFiles
- type FKMIgnoreKey
- type FKMKey
- type FKMKeyData
- type FKMKeyTable
- type FKMKeys
- type FKMMatch
- type FKMMatchRules
- type FKMPlugin
- type FKMSetKey
- type FKMStaticKeyTable
- type FKMTable
- type FTMAdditionalPaths
- type FTMFile
- type FTMHolidaysVars
- type FTMPlugin
- type FTMWeekdays
- type FloatingNetprobe
- type FloatingProbe
- type GWSQLColumn
- type GWSQLView
- type Gateway
- type GatewayOut
- type GatewaySQLPlugin
- type GatewaySQLTableDataview
- type GatewaySQLTableHeadline
- type GatewaySQLTableXPath
- type GatewaySQLTables
- type Gateways
- type KeyedObject
- type Macro
- type ManagedEntities
- type ManagedEntity
- type ManagedEntityGroup
- type ManagedEntityInfo
- type MonitoringPeriodAlias
- type MonitoringPeriodStart
- type MySQL
- type NameValue
- type NameValueList
- type Netprobe
- type Parameter
- type PlainType
- type Plugin
- type Probe
- type ProbeGroup
- type ProbeInfo
- type ProbeInfoWithoutPort
- type Probes
- type Process
- type ProcessDescriptor
- type ProcessDescriptorGroup
- type ProcessDescriptorRef
- type ProcessDescriptors
- type ProcessesPlugin
- type Query
- type Reference
- type Regex
- type RegexFlags
- type RemoveSamplers
- type RemoveTypes
- type Rule
- type RuleGroups
- type Rules
- type SAManagedEntity
- type SQLServer
- type SQLToolkitPlugin
- type Sampler
- type SamplerGroup
- type SamplerGroupOut
- type SamplerOut
- type SamplerRef
- type SamplerWithType
- type Samplers
- type SamplersOut
- type Schema
- type SchemaTypedItem
- type Schemas
- type SelfAnnounce
- type SingleLineString
- type StandardisedFormatting
- type StandardisedFormattingApplicability
- type StandardisedFormattingCell
- type StandardisedFormattingDataview
- type StandardisedFormattingDateTime
- type StandardisedFormattingType
- type StandardisedFormattingVariable
- type StateTrackerPlugin
- type Streams
- type StringList
- type Sybase
- type ToolkitPlugin
- type Type
- type TypeGroup
- type TypeRef
- type TypeRefWithEnv
- type Types
- type UOM
- type UnitOfMeasure
- type Value
- type Var
- type Vars
- type VirtualProbe
- type XPingPlugin
Constants ¶
const ( ProbeTypeProbe int = iota ProbeTypeFloating ProbeTypeVirtual )
Variables ¶
This section is empty.
Functions ¶
func FlattenEntities ¶ added in v1.6.1
func FlattenEntities(in *ManagedEntities, types map[string]Type) (entities map[string]ManagedEntity)
FlattenEntities func
func FlattenProbes ¶ added in v1.6.1
FlattenProbes takes the top level geneos.Probes struct and returns a map of probe name to geneos.Probe objects while setting the Type field to the type of probe
func FlattenSamplers ¶ added in v1.6.1
func FlattenTypes ¶ added in v1.6.1
func GetPlugin ¶ added in v1.6.2
func GetPlugin(plugin *Plugin) interface{}
GetPlugin searches plugin for the first non-nil/non-empty field and returns it, using reflection
func RemoveDuplicates ¶ added in v1.6.1
func RemoveDuplicates[T KeyedObject](kvs []T) []T
RemoveDuplicates iterates over any slice that satisfies KeyedObject and returns a slice of the same type but with duplicates removed. The first item is kept in all cases.
Types ¶
type APIPlugin ¶
type APIPlugin struct { Parameters []Parameter `xml:"api>parameters>parameter"` SummaryView *SingleLineString `xml:"api>showSummaryView>always>viewName,omitempty"` }
type APIStreamsPlugin ¶
type APIStreamsPlugin struct { XMLName xml.Name `xml:"api-streams"` Streams *Streams `xml:"api-streams>streams"` CreateView *Value `xml:"api-streams>createView,omitempty"` }
func (*APIStreamsPlugin) String ¶ added in v1.6.2
func (f *APIStreamsPlugin) String() string
type AddTypes ¶ added in v1.6.1
type AddTypes struct { XMLName xml.Name `xml:"addTypes" json:"-" yaml:"-"` Types []TypeRefWithEnv `xml:"type,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"type"` }
type Attribute ¶
type CollectionAgent ¶
type ControlMPlugin ¶ added in v1.6.2
type ControlMPlugin struct {
Rest string `xml:",any"`
}
func (*ControlMPlugin) String ¶ added in v1.6.2
func (f *ControlMPlugin) String() string
type DBConnection ¶
type DBConnection struct { MySQL *MySQL `xml:"database>mysql,omitempty"` SQLServer *SQLServer `xml:"database>sqlServer,omitempty"` Sybase *Sybase `xml:"database>sybase,omitempty"` Username *SingleLineString `xml:"var-userName"` Password *SingleLineString `xml:"password"` CloseConnectionAfterQuery *Value `xml:"closeConnectionAfterQuery,omitempty"` }
type Dataview ¶
type Dataview struct { Name string `xml:"name,attr"` Additions DataviewAdditions `xml:"additions,omitempty" json:",omitempty" yaml:",omitempty"` }
type DataviewAddition ¶
type DataviewAddition struct { XMLName xml.Name `xml:"data" json:"-" yaml:"-"` Name *SingleLineString `xml:"headline,omitempty"` }
type DataviewAdditionColumns ¶ added in v1.6.1
type DataviewAdditionColumns struct { Var *Var `xml:"var,omitempty"` Headlines []SingleLineString `xml:"data>column,omitempty"` }
type DataviewAdditionHeadlines ¶ added in v1.6.1
type DataviewAdditionHeadlines struct { Var *Var `xml:"var,omitempty"` Headlines []SingleLineString `xml:"data>headline,omitempty"` }
type DataviewAdditionRows ¶ added in v1.6.1
type DataviewAdditionRows struct { Var *Var `xml:"var,omitempty"` Headlines []SingleLineString `xml:"data>rows,omitempty"` }
type DataviewAdditions ¶
type DataviewAdditions struct { XMLName xml.Name `xml:"additions" json:"-" yaml:"-"` Headlines DataviewAdditionHeadlines `xml:"var-headlines,omitempty"` Columns DataviewAdditionColumns `xml:"var-columns,omitempty"` Rows DataviewAdditionRows `xml:"var-rows,omitempty"` }
type DataviewSchema ¶ added in v1.4.3
type DynamicEntities ¶
type DynamicEntities struct {
MappingType []string `xml:"mappingType,omitempty"`
}
type EmptyStruct ¶
type EmptyStruct struct{}
EmptyStruct is an empty struct used to indicate which macro VarMacro refers to.
type Environment ¶
type Environment struct { XMLName xml.Name `xml:"environment" json:"-" yaml:"-"` Name string `xml:"name,attr"` Environments []Environment `xml:"environment,omitempty" json:",omitempty" yaml:",omitempty"` Vars []Vars `xml:"var,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"var"` }
type EnvironmentGroup ¶
type EnvironmentGroup struct { XMLName xml.Name `xml:"environmentGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Environments []Environment `xml:"environment,omitempty" json:",omitempty" yaml:",omitempty"` }
type EnvironmentRef ¶ added in v1.4.1
type EnvironmentVariable ¶
type EnvironmentVariable struct { Name string `xml:"name"` Value *SingleLineString `xml:"value"` }
type Environments ¶
type Environments struct { XMLName xml.Name `xml:"environments" json:"-" yaml:"-"` Groups []EnvironmentGroup `xml:"environmentGroup,omitempty" json:",omitempty" yaml:",omitempty"` Environments []Environment `xml:"environment,omitempty" json:",omitempty" yaml:",omitempty"` }
type FKMDisplay ¶
type FKMDisplay struct {
TriggerMode string `xml:"triggerMode,omitempty" json:",omitempty" yaml:",omitempty"`
}
type FKMFile ¶
type FKMFile struct { XMLName xml.Name `xml:"file" json:"-" yaml:"-"` Source *FKMFileSource `xml:"source"` Tables []FKMTable `xml:"tables>table,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"tables"` ClearTime *Value `xml:"clearTime,omitempty" json:",omitempty" yaml:",omitempty"` DefaultKeyClearTime *Value `xml:"defaultKeyClearTime,omitempty" json:",omitempty" yaml:",omitempty"` Rewind *Value `xml:"rewind,omitempty" json:",omitempty" yaml:",omitempty"` Alias *Value `xml:"alias,omitempty" json:",omitempty" yaml:",omitempty"` }
type FKMFileSource ¶ added in v1.6.1
type FKMFileSource struct { Filename *SingleLineString `xml:"filename,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"filename"` Stream *SingleLineString `xml:"stream,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"stream"` }
type FKMIgnoreKey ¶
type FKMKeyData ¶
type FKMKeyTable ¶
type FKMKeys ¶
type FKMKeys struct { XMLName xml.Name `xml:"keys" json:"-" yaml:"-"` Keys []interface{} // should be FKMIgnoreKey or FKMKey }
func NewFKMKeys ¶
Return an FKMKey struct with keys built from the parameters. The keys are interpreted as follows:
* "=" prefixed string - force basic match (can contain embedded Geneos $(var)) * "!" prefixed string - ignore key * "!=" or "=!" prefixed string - force basic ignore key * "/text[/]" - text will be treated as a regexp, trailing '/' optional * any occurrence of non-alpha character (ignoring '.') - treat as regexp, "!" means ignore key * "/i" - as a suffix of a regexp will force case insensitive matches * plain string (see below) - Basic match
type FKMMatch ¶
type FKMMatch struct { SearchString *SingleLineString `xml:"searchString"` Rules FKMMatchRules `xml:"rules,omitempty"` }
type FKMMatchRules ¶
type FKMMatchRules string
const ( Basic FKMMatchRules = "BASIC" Regexp FKMMatchRules = "REGEXP" RegexpIgnoreCase FKMMatchRules = "REGEXP_IGNORE_CASE" )
type FKMPlugin ¶
type FKMPlugin struct { Display *FKMDisplay `xml:"fkm>display,omitempty" json:",omitempty" yaml:",omitempty"` Files FKMFiles `xml:"files,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"files"` }
type FKMStaticKeyTable ¶
type FTMAdditionalPaths ¶
type FTMAdditionalPaths struct {
Paths []*SingleLineString `xml:"additionalPath"`
}
type FTMFile ¶
type FTMFile struct { XMLName xml.Name `xml:"file" json:"-" yaml:"-"` Path *SingleLineString `xml:"path"` AdditionalPaths *FTMAdditionalPaths `xml:"additionalPaths,omitempty"` ExpectedArrival *Value `xml:"expectedArrival,omitempty"` ExpectedPeriod *struct { Period string `xml:",innerxml"` } `xml:"expectedPeriod,omitempty"` TZOffset *Value `xml:"tzOffset,omitempty"` MonitoringPeriod interface{} `xml:"monitoringPeriod"` Alias *SingleLineString `xml:"alias"` }
type FTMHolidaysVars ¶
type FTMHolidaysVars struct { XMLName xml.Name `xml:"holidaysVar" json:"-" yaml:"-"` Holiday []*SingleLineString `xml:"holiday,omitempty"` Day *FTMWeekdays `xml:"day,omitempty"` }
type FTMPlugin ¶
type FTMPlugin struct { Files []FTMFile `xml:"ftm>files>file"` Holidays *FTMHolidaysVars `xml:"ftm>holidaysVar,omitempty"` MonitoredDays *FTMWeekdays `xml:"ftm>monitoredDays,omitempty"` ConsistentDateStamps *Value `xml:"ftm>consistentDateStamps,omitempty"` DisplayTimeInISO8601Format *Value `xml:"ftm>displayTimeInIso8601Format,omitempty"` ShowActualFilename *Value `xml:"ftm>showActualFilename,omitempty"` DelayUnit string `xml:"ftm>delayUnit"` SizeUnit string `xml:"ftm>sizeUnit"` }
type FTMWeekdays ¶
type FloatingNetprobe ¶ added in v1.6.1
type FloatingProbe ¶
type FloatingProbe struct { XMLName xml.Name `xml:"floatingProbe" json:"-" yaml:"-"` Name string `xml:"name.attr" json:"name" yaml:"name"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` ProbeInfoWithoutPort `yaml:",inline" mapstructure:",squash"` }
type GWSQLColumn ¶
type GWSQLColumn struct { Name *SingleLineString `xml:"name"` XPath string `xml:"xpath,omitempty"` Type string `xml:"type,omitempty"` }
type GWSQLView ¶
type GWSQLView struct { XMLName xml.Name `xml:"view" json:"-" yaml:"-"` ViewName *SingleLineString `xml:"name"` SQL *SingleLineString `xml:"sql"` }
type Gateway ¶
type Gateway struct { XMLName xml.Name `xml:"gateway"` Compatibility int `xml:"compatibility,attr"` XMLNs string `xml:"xmlns:xsi,attr"` // http://www.w3.org/2001/XMLSchema-instance XSI string `xml:"xsi:noNamespaceSchemaLocation,attr"` // http://schema.itrsgroup.com/GA5.12.0-220125/gateway.xsd Probes *Probes `xml:"probes"` ManagedEntities *ManagedEntities Types *Types Samplers *Samplers Environments *Environments }
Gateway is for reading a Gateway configuration
type GatewayOut ¶ added in v1.6.1
type GatewayOut struct { XMLName xml.Name `xml:"gateway"` Compatibility int `xml:"compatibility,attr"` XMLNs string `xml:"xmlns:xsi,attr"` // http://www.w3.org/2001/XMLSchema-instance XSI string `xml:"xsi:noNamespaceSchemaLocation,attr"` // http://schema.itrsgroup.com/GA5.12.0-220125/gateway.xsd Probes *Probes `xml:"probes"` ManagedEntities *ManagedEntities Types *Types Samplers *SamplersOut Environments *Environments }
GatewayOut is for outputting a configuration using SamplersOut which in turn uses an interface{} for Plugin
type GatewaySQLPlugin ¶
type GatewaySQLPlugin struct { Setup *SingleLineString `xml:"Gateway-sql>setupSql>sql"` Tables *GatewaySQLTables `xml:"Gateway-sql>tables"` Sample *SingleLineString `xml:"Gateway-sql>sampleSql>sql"` Views []GWSQLView `xml:"Gateway-sql>views>view"` }
func (*GatewaySQLPlugin) String ¶ added in v1.6.2
func (f *GatewaySQLPlugin) String() string
type GatewaySQLTableDataview ¶
type GatewaySQLTableDataview struct { XMLName xml.Name `xml:"dataview" json:"-" yaml:"-"` Name *SingleLineString `xml:"tableName"` XPath string `xml:"xpath"` Columns *[]GWSQLColumn `xml:"columns>column,omitempty"` }
type GatewaySQLTableHeadline ¶
type GatewaySQLTableHeadline struct { XMLName xml.Name `xml:"headlines" json:"-" yaml:"-"` Name *SingleLineString `xml:"tableName"` XPath string `xml:"xpath"` }
type GatewaySQLTableXPath ¶
type GatewaySQLTableXPath struct { XMLName xml.Name `xml:"xpath" json:"-" yaml:"-"` Name *SingleLineString `xml:"tableName"` XPaths []string `xml:"xpaths>xpath"` Columns []GWSQLColumn `xml:"columns>column"` }
type GatewaySQLTables ¶
type GatewaySQLTables struct {
Tables []interface{}
}
type KeyedObject ¶ added in v1.6.1
type KeyedObject interface {
GetKey() string
}
KeyedObject is an interface to structures that have a GetKey() method that returns a string
type Macro ¶
type Macro struct { InsecureGatewayPort *EmptyStruct `xml:"insecureGatewayPort,omitempty" json:",omitempty" yaml:",omitempty"` GatewayName *EmptyStruct `xml:"gatewayName,omitempty" json:",omitempty" yaml:",omitempty"` NetprobeName *EmptyStruct `xml:"netprobeName,omitempty" json:",omitempty" yaml:",omitempty"` NetprobeHost *EmptyStruct `xml:"netprobeHost,omitempty" json:",omitempty" yaml:",omitempty"` NetprobePort *EmptyStruct `xml:"netprobePort,omitempty" json:",omitempty" yaml:",omitempty"` ManagedEntitiesName *EmptyStruct `xml:"managedEntityName,omitempty" json:",omitempty" yaml:",omitempty"` SamplerName *EmptyStruct `xml:"samplerName,omitempty" json:",omitempty" yaml:",omitempty"` SecureGatewayPort *EmptyStruct `xml:"secureGatewayPort,omitempty" json:",omitempty" yaml:",omitempty"` }
Macro is a container for the various macro variable types. Only initialise one field to an empty struct, the rest must be nil pointers. e.g.
macro := geneos.Macro{InsecureGatewayPort: &geneos.EmptyStruct{}}
type ManagedEntities ¶
type ManagedEntities struct { XMLName xml.Name `xml:"managedEntities" json:"-" yaml:"-"` Entities []ManagedEntity `xml:"managedEntity,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"managedentity"` ManagedEntityGroups []ManagedEntityGroup `xml:"managedEntityGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"managedentitygroup"` }
type ManagedEntity ¶
type ManagedEntity struct { XMLName xml.Name `xml:"managedEntity" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Probe *Reference `xml:"probe" json:",omitempty" yaml:",omitempty"` FloatingProbe *Reference `xml:"floatingProbe" json:",omitempty" yaml:",omitempty"` VirtualProbe *Reference `xml:"virtualProbe" json:",omitempty" yaml:",omitempty"` Environment *EnvironmentRef `xml:"environment,omitempty" json:",omitempty" yaml:",omitempty"` ManagedEntityInfo `yaml:",inline" mapstructure:",squash"` Samplers []SamplerRef `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` }
type ManagedEntityGroup ¶ added in v1.3.0
type ManagedEntityGroup struct { XMLName xml.Name `xml:"managedEntityGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` ManagedEntityInfo `yaml:",inline" mapstructure:",squash"` Entities []ManagedEntity `xml:"managedEntity,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"managedentity"` ManagedEntityGroups []ManagedEntityGroup `xml:"managedEntityGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"managedentitygroup"` }
type ManagedEntityInfo ¶ added in v1.6.1
type ManagedEntityInfo struct { Attributes []Attribute `xml:"attribute,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"attribute"` RemoveTypes *RemoveTypes `xml:"removeTypes,omitempty" json:",omitempty" yaml:",omitempty"` RemoveSamplers *RemoveSamplers `xml:"removeSamplers,omitempty" json:",omitempty" yaml:",omitempty"` AddTypes *AddTypes `xml:"addTypes,omitempty" json:",omitempty" yaml:",omitempty"` Vars []Vars `xml:"var,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"var"` ResolvedSamplers map[string]bool `xml:"-" json:",omitempty" yaml:",omitempty"` // map of "type:sampler" that exist at this point }
type MonitoringPeriodAlias ¶
type MonitoringPeriodAlias struct {
Alias string `xml:"periodAlias"`
}
type MonitoringPeriodStart ¶
type MonitoringPeriodStart struct {
PeriodStart *Value `xml:"periodStartTime,omitempty"`
}
type MySQL ¶
type MySQL struct { ServerName *SingleLineString `xml:"var-serverName"` DBName *SingleLineString `xml:"var-databaseName"` Port *SingleLineString `xml:"var-port"` }
type NameValueList ¶
type NameValueList struct {
NameValues []NameValue `xml:"item,omitempty" json:",omitempty" yaml:",omitempty"`
}
func (*NameValueList) UnmarshalText ¶ added in v1.6.1
func (s *NameValueList) UnmarshalText(text []byte) error
UnmarshalText conforms to the mapstructure decode hook to covert an empty tag to a map, not a string (from mxj)
type Netprobe ¶
type Netprobe struct { XMLName xml.Name `xml:"netprobe"` Compatibility int `xml:"compatibility,attr"` // 1 XMLNs string `xml:"xmlns:xsi,attr"` // http://www.w3.org/2001/XMLSchema-instance XSI string `xml:"xsi:noNamespaceSchemaLocation,attr"` // http://schema.itrsgroup.com/GA5.12.0-220125/netprobe.xsd FloatingNetprobe *FloatingNetprobe `xml:"floatingProbe,omitempty"` PluginWhiteList []string `xml:"pluginWhiteList,omitempty"` CommandWhiteList []string `xml:"commandWhiteList,omitempty"` SelfAnnounce *SelfAnnounce `xml:"selfAnnounce,omitempty"` }
type Parameter ¶
type Parameter struct { Name string `xml:"name"` Value *SingleLineString `xml:"value"` }
type Plugin ¶ added in v1.6.1
type Plugin struct { API *APIPlugin `xml:"api,omitempty" json:"api,omitempty" yaml:"api,omitempty"` APIStreams *APIStreamsPlugin `xml:"api-streams,omitempty" json:"api-streams,omitempty" yaml:"api-streams,omitempty"` ControlM *ControlMPlugin `xml:"control-m,omitempty" json:"control-m,omitempty" yaml:"control-m,omitempty"` FKM *FKMPlugin `xml:"fkm,omitempty" json:"fkm,omitempty" yaml:"fkm,omitempty"` FTM *FTMPlugin `xml:"ftm,omitempty" json:"ftm,omitempty" yaml:"ftm,omitempty"` GatewaySQL *GatewaySQLPlugin `xml:"Gateway-sql,omitempty" json:"Gateway-sql,omitempty" yaml:"Gateway-sql,omitempty"` Process *ProcessesPlugin `xml:"processes,omitempty" json:"processes,omitempty" yaml:"processes,omitempty"` SQLToolkit *SQLToolkitPlugin `xml:"sql-toolkit,omitempty" json:"sql-toolkit,omitempty" yaml:"sql-toolkit,omitempty"` StateTracker *StateTrackerPlugin `xml:"stateTracker,omitempty" json:"stateTracker,omitempty" yaml:"stateTracker,omitempty"` Toolkit *ToolkitPlugin `xml:"toolkit,omitempty" json:"toolkit,omitempty" yaml:"toolkit,omitempty"` XPing *XPingPlugin `xml:"x-ping,omitempty" json:"x-ping,omitempty" yaml:"x-ping,omitempty"` Other string `xml:",innerxml" json:",omitempty" yaml:",omitempty"` }
Plugin lists all the plugins we know about
type Probe ¶ added in v1.6.1
type Probe struct { XMLName xml.Name `xml:"probe" json:"-" yaml:"-"` Type int `xml:"-" json:"-" yaml:"-"` Name string `xml:"name,attr" json:"name" yaml:"name"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Hostname string `xml:"hostname" json:"hostname" yaml:"hostname"` ProbeInfo `json:",inline" yaml:",inline" mapstructure:",squash"` }
type ProbeGroup ¶ added in v1.6.1
type ProbeGroup struct { XMLName xml.Name `xml:"probeGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` ProbeInfo `yaml:",inline" mapstructure:",squash"` ProbeGroups []ProbeGroup `xml:"probeGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"probegroup"` Probes []Probe `xml:"probe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"probe"` VirtualProbes []VirtualProbe `xml:"virtualProbe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"virtualprobe"` FloatingProbes []FloatingProbe `xml:"floatingProbe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"floatingprobe"` }
type ProbeInfo ¶ added in v1.6.1
type ProbeInfo struct { Port int `xml:"port,omitempty" json:"port,omitempty" yaml:",omitempty" mapstructure:"port"` Secure *bool `xml:"secure,omitempty" json:"secure,omitempty" yaml:",omitempty" mapstructure:"secure"` ProbeInfoWithoutPort `yaml:",inline" mapstructure:",squash"` }
ProbeInfo is embedded in groups and probes
The mapstructure tags are needed otherwise the embedding uses the structure name, not the field
type ProbeInfoWithoutPort ¶ added in v1.6.1
type ProbeInfoWithoutPort struct { CommandTimeOut int `xml:",omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"commandtimeout"` MaxDatabaseConnections int `xml:",omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"maxdatabaseconnections"` MaxToolkitProcesses int `xml:",omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"maxtoolkitprocesses"` }
type Probes ¶ added in v1.6.1
type Probes struct { XMLName xml.Name `xml:"probes" json:"-" yaml:"-"` ProbeGroups []ProbeGroup `xml:"probeGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"probegroup"` Probes []Probe `xml:"probe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"probe"` VirtualProbes []VirtualProbe `xml:"virtualProbe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"virtualprobe"` FloatingProbes []FloatingProbe `xml:"floatingProbe,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"floatingprobe"` }
type Process ¶ added in v1.6.1
type Process struct { Data *ProcessDescriptor `xml:"data,omitempty" json:",omitempty" yaml:",omitempty"` ProcessDescriptor *ProcessDescriptorRef `xml:"processDescriptor,omitempty" json:",omitempty" yaml:",omitempty"` }
type ProcessDescriptor ¶ added in v1.6.1
type ProcessDescriptor struct {
Alias *SingleLineString `xml:"alias"`
}
type ProcessDescriptorGroup ¶ added in v1.6.1
type ProcessDescriptorGroup struct { XMLName xml.Name `xml:"processDescriptorGroup"` ProcessDescriptors []ProcessDescriptor `xml:"processDescriptor,omitempty" json:",omitempty" yaml:",omitempty"` }
type ProcessDescriptorRef ¶ added in v1.6.1
type ProcessDescriptorRef struct {
Name string `xml:"ref,attr"`
}
type ProcessDescriptors ¶ added in v1.6.1
type ProcessesPlugin ¶ added in v1.6.1
type ProcessesPlugin struct { AdjustForLogicalCPUs *Value `xml:"adjustForLogicalCPUs,omitempty" json:",omitempty" yaml:",omitempty"` Processes []Process `xml:"processes>processes>process,omitempty" json:",omitempty" yaml:",omitempty"` Rest string `xml:",any"` }
func (*ProcessesPlugin) String ¶ added in v1.6.2
func (f *ProcessesPlugin) String() string
type Query ¶
type Query struct { Name *SingleLineString `xml:"name"` SQL *SingleLineString `xml:"sql"` }
type Reference ¶
type Reference struct {
Name string `xml:"ref,attr" json:",omitempty" yaml:",omitempty"`
}
type Regex ¶ added in v1.4.3
type Regex struct { Regex string `xml:"regex"` Flags *[]RegexFlags `xml:"regexFlags,omitempty"` }
type RegexFlags ¶ added in v1.4.3
type RemoveSamplers ¶ added in v1.6.1
type RemoveSamplers struct { XMLName xml.Name `xml:"removeSamplers" json:"-" yaml:"-"` Samplers []SamplerWithType `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty"` }
type RemoveTypes ¶ added in v1.6.1
type RuleGroups ¶
type SAManagedEntity ¶
type SQLServer ¶
type SQLServer struct { ServerName *SingleLineString `xml:"var-serverName"` DBName *SingleLineString `xml:"var-databaseName"` Port *SingleLineString `xml:"var-port"` }
type SQLToolkitPlugin ¶
type SQLToolkitPlugin struct { Queries []Query `xml:"sql-toolkit>queries>query"` Connection DBConnection `xml:"sql-toolkit>connection"` }
func (*SQLToolkitPlugin) String ¶ added in v1.6.2
func (f *SQLToolkitPlugin) String() string
type Sampler ¶
type Sampler struct { XMLName xml.Name `xml:"sampler" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Comment string `xml:",comment" json:",omitempty" yaml:",omitempty"` Group *SingleLineString `xml:"var-group,omitempty" json:",omitempty" yaml:",omitempty"` Interval *Value `xml:"sampleInterval,omitempty" json:",omitempty" yaml:",omitempty"` SampleOnStartup bool `xml:"sampleOnStartup" json:",omitempty" yaml:",omitempty"` Plugin *Plugin `xml:"plugin,omitempty" json:"plugin,omitempty" yaml:"plugin,omitempty"` Dataviews *[]Dataview `xml:"dataviews>dataview,omitempty" json:",omitempty" yaml:",omitempty"` Schemas *Schemas `xml:"schemas,omitempty" json:",omitempty" yaml:",omitempty"` StandardisedFormatting *StandardisedFormatting `xml:"standardisedFormatting,omitempty" json:",omitempty" yaml:",omitempty"` }
A Sampler is a Geneos Sampler structure. The Plugin field should be populated with a pointer to a Plugin struct of the wanted type.
type SamplerGroup ¶ added in v1.3.0
type SamplerGroup struct { XMLName xml.Name `xml:"samplerGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Samplers []Sampler `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` SamplerGroups []SamplerGroup `xml:"samplerGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"samplergroup"` }
type SamplerGroupOut ¶ added in v1.6.1
type SamplerGroupOut struct { XMLName xml.Name `xml:"samplerGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Samplers []SamplerOut `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` SamplerGroups []SamplerGroupOut `xml:"samplerGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"samplergroup"` }
type SamplerOut ¶ added in v1.6.1
type SamplerOut struct { XMLName xml.Name `xml:"sampler" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Comment string `xml:",comment" json:",omitempty" yaml:",omitempty"` Group *SingleLineString `xml:"var-group,omitempty" json:",omitempty" yaml:",omitempty"` Interval *Value `xml:"sampleInterval,omitempty" json:",omitempty" yaml:",omitempty"` SampleOnStartup bool `xml:"sampleOnStartup" json:",omitempty" yaml:",omitempty"` Plugin interface{} `xml:"plugin,omitempty" json:"plugin,omitempty" yaml:"plugin,omitempty"` Dataviews *[]Dataview `xml:"dataviews>dataview,omitempty" json:",omitempty" yaml:",omitempty"` Schemas *Schemas `xml:"schemas,omitempty" json:",omitempty" yaml:",omitempty"` StandardisedFormatting *StandardisedFormatting `xml:"standardisedFormatting,omitempty" json:",omitempty" yaml:",omitempty"` }
A Sampler is a Geneos Sampler structure. The Plugin field should be populated with a pointer to a Plugin struct of the wanted type.
type SamplerRef ¶ added in v1.6.1
type SamplerWithType ¶ added in v1.6.1
type Samplers ¶
type Samplers struct { XMLName xml.Name `xml:"samplers" json:"-" yaml:"-"` Samplers []Sampler `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` SamplerGroups []SamplerGroup `xml:"samplerGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"samplergroup"` }
type SamplersOut ¶ added in v1.6.1
type SamplersOut struct { XMLName xml.Name `xml:"samplers" json:"-" yaml:"-"` Samplers []SamplerOut `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` SamplerGroups []SamplerGroupOut `xml:"samplerGroup,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"samplergroup"` }
SamplerOut is for output of XML. Plugins make it hard to share the same types between marshal and unmarshal
type Schema ¶ added in v1.4.3
type Schema struct { Headlines *[]SchemaTypedItem `xml:"headlines>headline,omitempty"` Columns *[]SchemaTypedItem `xml:"columns>column,omitempty"` Pivot bool `xml:"pivot,omitempty"` Publish bool `xml:"publish"` }
type SchemaTypedItem ¶ added in v1.4.3
type SchemaTypedItem struct { Name string `xml:"name"` String *EmptyStruct `xml:"string,omitempty"` Boolean *EmptyStruct `xml:"boolean,omitempty"` Float32 *UnitOfMeasure `xml:"float32,omitempty"` Float64 *UnitOfMeasure `xml:"float64,omitempty"` Int32 *UnitOfMeasure `xml:"int32,omitempty"` Int64 *UnitOfMeasure `xml:"int64,omitempty"` Date *EmptyStruct `xml:"date,omitempty"` DateTime *EmptyStruct `xml:"dateTime,omitempty"` }
type Schemas ¶ added in v1.4.3
type Schemas struct {
Dataviews *[]DataviewSchema `xml:"dataviews>dataviewSchema,omitempty"`
}
type SelfAnnounce ¶
type SelfAnnounce struct { Enabled bool `xml:"enabled"` RetryInterval int `xml:"retryInterval,omitempty"` RequireReverseConnection bool `xml:"requireReverseConnection,omitempty"` ProbeName string `xml:"probeName"` EncodedPassword string `xml:"encodedPassword,omitempty"` RESTAPIHTTPPort int `xml:"restApiHttpPort,omitempty"` RESTAPIHTTPSPort int `xml:"restApiHttpsPort,omitempty"` CyberArkApplicationID string `xml:"cyberArkApplicationID,omitempty"` CyberArkSDKPath string `xml:"cyberArkSdkPath,omitempty"` ManagedEntity *SAManagedEntity `xml:"managedEntity,omitempty"` ManagedEntities []SAManagedEntity `xml:"managedEntities,omitempty"` CollectionAgent *CollectionAgent `xml:"collectionAgent,omitempty"` DynamicEntities *DynamicEntities `xml:"dynamicEntities,omitempty"` Gateways []Gateways `xml:"gateways"` }
type SingleLineString ¶
type SingleLineString struct {
Parts []interface{}
}
A SingleLineString is a container for a single line string that can be made up of static text and variable references. Use like this:
type MyContainer struct { XMLName xml.Name `xml:"mycontainer"` VarField *SingleLineString `xml:"fieldname"` } func blah() { x := MyContainer{ VarField: geneos.SingleLineString("hello $(var) world!") } ... }
func NewSingleLineString ¶
func NewSingleLineString(in string) (s *SingleLineString)
NewSingleLineString take a plain string and locates any Geneos style variables of the form $(var) - note these are parenthesis and not brackets - and splits the string into Data and Var parts as required so that this can be used directly in the XML encodings.
func (*SingleLineString) MarshalJSON ¶ added in v1.6.1
func (s *SingleLineString) MarshalJSON() (out []byte, err error)
func (*SingleLineString) MarshalYAML ¶ added in v1.6.1
func (s *SingleLineString) MarshalYAML() (out interface{}, err error)
func (*SingleLineString) String ¶ added in v1.6.1
func (s *SingleLineString) String() (out string)
func (*SingleLineString) UnmarshalXML ¶ added in v1.6.1
func (v *SingleLineString) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
type StandardisedFormatting ¶ added in v1.4.3
type StandardisedFormatting struct {
Dataviews *[]StandardisedFormattingDataview `xml:"dataviews>dataview,omitempty" json:",omitempty" yaml:",omitempty"`
}
type StandardisedFormattingApplicability ¶ added in v1.4.3
type StandardisedFormattingApplicability struct { Headlines *[]Regex `xml:"headlines>pattern,omitempty"` Columns *[]Regex `xml:"columns>pattern,omitempty"` Cells *[]StandardisedFormattingCell `xml:"cells>cell,omitempty"` }
type StandardisedFormattingCell ¶ added in v1.4.3
type StandardisedFormattingDataview ¶ added in v1.4.3
type StandardisedFormattingDataview struct { Name string `xml:"name"` // do not omitempty Variables *[]StandardisedFormattingVariable `xml:"variables>variable"` }
type StandardisedFormattingDateTime ¶ added in v1.4.3
type StandardisedFormattingType ¶ added in v1.4.3
type StandardisedFormattingType struct {
DateTime StandardisedFormattingDateTime `xml:"dateTime"`
}
type StandardisedFormattingVariable ¶ added in v1.4.3
type StandardisedFormattingVariable struct { Type StandardisedFormattingType `xml:"type"` Applicability StandardisedFormattingApplicability `xml:"applicability"` }
type StateTrackerPlugin ¶ added in v1.6.2
type StateTrackerPlugin struct { Display *FKMDisplay `xml:"fkm>display,omitempty" json:",omitempty" yaml:",omitempty"` Files FKMFiles `xml:"files,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"files"` }
func (*StateTrackerPlugin) String ¶ added in v1.6.2
func (f *StateTrackerPlugin) String() string
type Streams ¶
type Streams struct { XMLName xml.Name `xml:"streams" json:"-" yaml:"-"` Stream []*SingleLineString `xml:"stream"` }
type StringList ¶
type StringList struct {
Strings []string `xml:"string" mapstructure:"string"`
}
func (*StringList) UnmarshalText ¶ added in v1.6.1
func (s *StringList) UnmarshalText(text []byte) error
UnmarshalText conforms to the mapstructure decode hook to covert an empty tag to a map, not a string (from mxj)
type Sybase ¶
type Sybase struct { InstanceName *SingleLineString `xml:"var-instanceName"` DBName *SingleLineString `xml:"var-databaseName"` }
type ToolkitPlugin ¶
type ToolkitPlugin struct { SamplerScript *SingleLineString `xml:"toolkit>samplerScript"` SamplerTimeout *Value `xml:"toolkit>scriptTimeout,omitempty"` EnvironmentVariables *[]EnvironmentVariable `xml:"toolkit>environmentVariables>variable"` }
func (*ToolkitPlugin) String ¶ added in v1.6.2
func (f *ToolkitPlugin) String() string
type Type ¶
type Type struct { XMLName xml.Name `xml:"type" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Environment *Reference `xml:"environment,omitempty" json:",omitempty" yaml:",omitempty"` Vars []Vars `xml:"var,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"var"` Samplers []SamplerRef `xml:"sampler,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"sampler"` }
type TypeGroup ¶ added in v1.6.1
type TypeGroup struct { XMLName xml.Name `xml:"typeGroup" json:"-" yaml:"-"` Name string `xml:"name,attr"` Disabled bool `xml:"disabled,attr,omitempty" json:",omitempty" yaml:",omitempty"` Types []Type `xml:"type,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"type"` TypeGroups []TypeGroup `json:"typeGroup,omitempty" yaml:",omitempty" mapstructure:"typegroup"` }
type TypeRefWithEnv ¶ added in v1.6.1
type TypeRefWithEnv struct { XMLName xml.Name `xml:"type" json:"-" yaml:"-"` Type string `xml:"ref,attr" json:",omitempty" yaml:",omitempty" mapstructure:"ref"` Environment *EnvironmentRef `xml:",omitempty" json:",omitempty" yaml:",omitempty"` }
type UOM ¶ added in v1.4.3
type UOM string
const ( None UOM = "" Percent UOM = "percent" Seconds UOM = "seconds" Milliseconds UOM = "milliseconds" Microseconds UOM = "microseconds" Nanoseconds UOM = "nanoseconds" Days UOM = "days" PerSecond UOM = "per second" Megahertz UOM = "megahertz" Bytes UOM = "bytes" Kibibytes UOM = "kibibytes" Mebibytes UOM = "mebibytes" Gibibytes UOM = "gibibytes" BytesPerSecond UOM = "bytes per second" Megabits UOM = "megabits" MegabitsPerSecond UOM = "megabits per second" )
type UnitOfMeasure ¶ added in v1.4.3
type UnitOfMeasure struct {
Unit UOM `xml:"unitOfMeasure"`
}
type Value ¶
type Value struct { Data []Data `xml:"data,omitempty" json:",omitempty" yaml:",omitempty"` Var *Var `xml:"var,omitempty" json:",omitempty" yaml:",omitempty"` }
A Value can contain multiple parts. In the most basic and common form it is a mix of text (as "data") and variables
func NewValue ¶
func NewValue(in interface{}) (n *Value)
NewValue takes an argument and if a string removes leading and trailing spaces. If the string is of the form "$(var)" then returns a pointer to a VarData struct containing a Var{} or if a non-empty string returns a Data{}. If the string is empty then a nil pointer is returned. Any other value is copied as is. This allows `xml:",omitempty"“ to leave out VarData fields that contain no data.
func (*Value) UnmarshalXML ¶ added in v1.6.1
type Vars ¶
type Vars struct { XMLName xml.Name `xml:"var" json:"-" yaml:"-"` Name string `xml:"name,attr"` Boolean *bool `xml:"boolean,omitempty" json:",omitempty" yaml:",omitempty"` Double *float64 `xml:"double,omitempty" json:",omitempty" yaml:",omitempty"` Integer *int64 `xml:"integer,omitempty" json:",omitempty" yaml:",omitempty"` String string `xml:"string,omitempty" json:",omitempty" yaml:",omitempty"` StringList *StringList `xml:"stringList,omitempty" json:",omitempty" yaml:",omitempty"` NameValueList *NameValueList `xml:"nameValueList,omitempty" json:",omitempty" yaml:",omitempty"` Macro *Macro `xml:"macro,omitempty" json:",omitempty" yaml:",omitempty"` }
Vars is a container for specific variable types. Only one field should be set at a time. This list is not complete, much like many of the configuration settings.
type VirtualProbe ¶ added in v1.6.1
type XPingPlugin ¶ added in v1.6.2
type XPingPlugin struct { Display *FKMDisplay `xml:"fkm>display,omitempty" json:",omitempty" yaml:",omitempty"` Files FKMFiles `xml:"files,omitempty" json:",omitempty" yaml:",omitempty" mapstructure:"files"` }
func (*XPingPlugin) String ¶ added in v1.6.2
func (f *XPingPlugin) String() string