Documentation ¶
Index ¶
- type APISampler
- type APIStreamsSampler
- type Attribute
- type CollectionAgent
- type DBConnection
- type Data
- type DataOrVar
- type Dataview
- type DataviewAddition
- type DataviewAdditions
- type DynamicEntities
- type EmptyStruct
- type Environment
- type EnvironmentGroup
- type EnvironmentVariable
- type Environments
- type FTMAdditionalPaths
- type FTMFile
- type FTMSampler
- type FloatingProbe
- type GWSQLColumn
- type GWSQLView
- type Gateway
- type GatewaySQLSampler
- type GatewaySQLTable
- type Gateways
- type Macro
- type ManagedEntities
- type ManagedEntity
- type MonitoringPeriodAlias
- type MonitoringPeriodStart
- type MySQL
- type Netprobe
- type Parameter
- type PlainType
- type Query
- type Rule
- type RuleGroups
- type Rules
- type SAManagedEntity
- type SQLServer
- type SQLToolkitSampler
- type Sampler
- type SamplerPostfix
- type Samplers
- type SelfAnnounce
- type SingleLineString
- type Streams
- type StringList
- type Sybase
- type ToolkitSampler
- type Type
- type TypeRef
- type Types
- type Var
- type VarRef
- type Vars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APISampler ¶
type APISampler struct { Sampler Parameters []Parameter `xml:"plugin>api>parameters>parameter"` SummaryView *SingleLineString `xml:"plugin>api>showSummaryView>always>viewName,omitempty"` SamplerPostfix }
type APIStreamsSampler ¶
type APIStreamsSampler struct { Sampler Streams *Streams `xml:"plugin>api-streams>streams"` CreateView *DataOrVar `xml:"plugin>api-streams>createView,omitempty"` SamplerPostfix }
type CollectionAgent ¶
type DBConnection ¶
type DBConnection struct { MySQL *MySQL `xml:"database>mysql,omitempty"` SQLServer *SQLServer `xml:"database>sqlServer,omitempty"` Sybase *Sybase `xml:"database>sybase,omitempty"` UsernameVar VarRef `xml:"var-userName>var"` PasswordVar VarRef `xml:"password>var"` CloseConnectionAfterQuery *DataOrVar `xml:"closeConnectionAfterQuery,omitempty"` }
type DataOrVar ¶
type DataOrVar struct {
Parts []interface{}
}
DataOrVar is a struct that contains either a Var or a Data type depending on the usage.
func NewDataOrVar ¶
func NewDataOrVar(in interface{}) (n *DataOrVar)
NewDataOrVar takes a string argument and 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. This allows `xml:",omixempty"“ to leave out VarData fields that contain no data.
type Dataview ¶
type Dataview struct { XMLName xml.Name `xml:"dataview"` Name string `xml:"name,attr"` Additions DataviewAdditions }
type DataviewAddition ¶
type DataviewAddition struct { XMLName xml.Name `xml:"data"` Name *SingleLineString `xml:"headline,omitempty"` }
type DataviewAdditions ¶
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,omitempty"` Name string `xml:"name,attr"` Environments []Environment `xml:"environment,omitempty"` Vars []Vars }
type EnvironmentGroup ¶
type EnvironmentGroup struct { XMLName xml.Name `xml:"environmentGroup"` Name string `xml:"name,attr"` Environments []Environment }
type EnvironmentVariable ¶
type EnvironmentVariable struct { Name string `xml:"name"` Value *SingleLineString `xml:"value"` }
type Environments ¶
type Environments struct { XMLName xml.Name `xml:"environments"` Groups []EnvironmentGroup Environments []Environment }
type FTMAdditionalPaths ¶
type FTMAdditionalPaths struct {
Paths []*SingleLineString `xml:"additionalPath"`
}
type FTMFile ¶
type FTMFile struct { XMLName xml.Name `xml:"file"` Path *SingleLineString `xml:"path"` AdditionalPaths *FTMAdditionalPaths `xml:"additionalPaths,omitempty"` ExpectedArrival *DataOrVar `xml:"expectedArrival,omitempty"` ExpectedPeriod *struct { Period string `xml:",innerxml"` } `xml:"expectedPeriod,omitempty"` TZOffset *DataOrVar `xml:"tzOffset,omitempty"` MonitoringPeriod interface{} `xml:"monitoringPeriod"` Alias *SingleLineString `xml:"alias"` }
type FTMSampler ¶
type FTMSampler struct { Sampler Files []FTMFile `xml:"plugin>ftm>files>file"` ConsistentDateStamps *DataOrVar `xml:"plugin>ftm>consistentDateStamps,omitempty"` DisplayTimeInISO8601Format *DataOrVar `xml:"plugin>ftm>displayTimeInIso8601Format,omitempty"` ShowActualFilename *DataOrVar `xml:"plugin>ftm>showActualFilename,omitempty"` DelayUnit string `xml:"plugin>ftm>delayUnit"` SizeUnit string `xml:"plugin>ftm>sizeUnit"` SamplerPostfix }
type FloatingProbe ¶
type GWSQLColumn ¶
type GWSQLColumn struct { Name *SingleLineString `xml:"name"` XPath string `xml:"xpath"` Type string `xml:"type"` }
type GWSQLView ¶
type GWSQLView struct { XMLName xml.Name `xml:"view"` 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 ManagedEntities *ManagedEntities Types *Types Samplers *Samplers Environments *Environments }
type GatewaySQLSampler ¶
type GatewaySQLSampler struct { Sampler Setup *SingleLineString `xml:"plugin>Gateway-sql>setupSql>sql"` Tables []GatewaySQLTable `xml:"plugin>Gateway-sql>tables>xpath"` Views []GWSQLView `xml:"plugin>Gateway-sql>views>view"` SamplerPostfix }
type GatewaySQLTable ¶
type GatewaySQLTable struct { XMLName xml.Name `xml:"xpath"` Name *SingleLineString `xml:"tableName"` XPaths []string `xml:"xpaths>xpath"` Columns []GWSQLColumn `xml:"columns>column"` }
type Macro ¶
type Macro struct { InsecureGatewayPort *EmptyStruct `xml:"insecureGatewayPort,omitempty"` GatewayName *EmptyStruct `xml:"gatewayName,omitempty"` NetprobeName *EmptyStruct `xml:"netprobeName,omitempty"` NetprobeHost *EmptyStruct `xml:"netprobeHost,omitempty"` NetprobePort *EmptyStruct `xml:"netprobePort,omitempty"` ManagedEntitiesName *EmptyStruct `xml:"managedEntityName,omitempty"` SamplerName *EmptyStruct `xml:"samplerName,omitempty"` SecureGatewayPort *EmptyStruct `xml:"secureGatewayPort,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 ManagedEntity ¶
type ManagedEntity struct { XMLName xml.Name `xml:"managedEntity"` Name string `xml:"name,attr"` Probe struct { Name string `xml:"ref,attr"` Timezone *time.Location `xml:"-"` } `xml:"probe"` Attributes []Attribute `xml:",omitempty"` AddTypes struct { XMLName xml.Name `xml:"addTypes"` Types []TypeRef `xml:",omitempty"` } Vars []Vars `xml:",omitempty"` }
type MonitoringPeriodAlias ¶
type MonitoringPeriodAlias struct {
Alias string `xml:"periodAlias"`
}
type MonitoringPeriodStart ¶
type MonitoringPeriodStart struct {
PeriodStart *DataOrVar `xml:"periodStart,omitempty"`
}
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 FloatingProbe *FloatingProbe `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 Query ¶
type Query struct { Name *SingleLineString `xml:"name"` SQL *SingleLineString `xml:"sql"` }
type RuleGroups ¶
type SAManagedEntity ¶
type SQLToolkitSampler ¶
type SQLToolkitSampler struct { Sampler Queries []Query `xml:"plugin>sql-toolkit>queries>query"` Connection DBConnection `xml:"plugin>sql-toolkit>connection"` SamplerPostfix }
type Sampler ¶
type Sampler struct { XMLName xml.Name `xml:"sampler"` Name string `xml:"name,attr"` Comment string `xml:",comment"` Group *SingleLineString `xml:"var-group,omitempty"` Interval *DataOrVar `xml:"sampleInterval,omitempty"` }
The Sampler type is the common parts of all samplers
type SamplerPostfix ¶
type SamplerPostfix struct {
Dataviews []Dataview `xml:"dataviews>dataview,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.
type Streams ¶
type Streams struct { XMLName xml.Name `xml:"streams"` Stream []*SingleLineString `xml:"stream"` }
type StringList ¶
type StringList struct {
Strings []string `xml:"string"`
}
type ToolkitSampler ¶
type ToolkitSampler struct { Sampler SamplerScript *SingleLineString `xml:"plugin>toolkit>samplerScript"` EnvironmentVariables []EnvironmentVariable `xml:"plugin>toolkit>environmentVariables>variable"` SamplerPostfix }
type Vars ¶
type Vars struct { XMLName xml.Name `xml:"var"` Name string `xml:"name,attr"` Boolean *bool `xml:"boolean,omitempty"` Double *float64 `xml:"double,omitempty"` Integer *int64 `xml:"integer,omitempty"` String string `xml:"string,omitempty"` StringList *StringList `xml:"stringList,omitempty"` Macro *Macro `xml:"macro,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.