Documentation ¶
Index ¶
- type APIPlugin
- type APIStreamsPlugin
- type Attribute
- type CollectionAgent
- type DBConnection
- type Data
- type Dataview
- type DataviewAddition
- type DataviewAdditions
- type DynamicEntities
- type EmptyStruct
- type Environment
- type EnvironmentGroup
- type EnvironmentRef
- type EnvironmentVariable
- type Environments
- type FKMDisplay
- type FKMFile
- 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 FloatingProbe
- type GWSQLColumn
- type GWSQLView
- type Gateway
- type GatewaySQLPlugin
- type GatewaySQLTableDataview
- type GatewaySQLTableHeadline
- type GatewaySQLTableXPath
- type GatewaySQLTables
- type Gateways
- type Macro
- type ManagedEntities
- type ManagedEntity
- type ManagedEntityGroup
- type MonitoringPeriodAlias
- type MonitoringPeriodStart
- type MySQL
- type NameValue
- type NameValueList
- type Netprobe
- type Parameter
- type PlainType
- type Query
- type Reference
- type Rule
- type RuleGroups
- type Rules
- type SAManagedEntity
- type SQLServer
- type SQLToolkitPlugin
- type Sampler
- type SamplerGroup
- type Samplers
- type SelfAnnounce
- type SingleLineString
- type Streams
- type StringList
- type Sybase
- type ToolkitPlugin
- type Type
- type TypeRef
- type Types
- type Value
- type Var
- type Vars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIPlugin ¶
type APIPlugin struct { Parameters []Parameter `xml:"api>parameters>parameter"` SummaryView *SingleLineString `xml:"api>showSummaryView>always>viewName,omitempty"` }
type APIStreamsPlugin ¶
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"` 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 }
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"` 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 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"` Groups []EnvironmentGroup Environments []Environment }
type FKMDisplay ¶
type FKMDisplay struct {
TriggerMode string `xml:"triggerMode,omitempty"`
}
type FKMFile ¶
type FKMFile struct { XMLName xml.Name `xml:"file"` Filename *SingleLineString `xml:"source>filename,omitempty"` Stream *SingleLineString `xml:"source>stream,omitempty"` Tables []FKMTable `xml:"tables>table,omitempty"` ClearTime *Value `xml:"clearTime"` DefaultKeyClearTime *Value `xml:"defaultKeyClearTime"` Rewind *Value `xml:"rewind"` Alias *Value `xml:"alias"` }
type FKMIgnoreKey ¶
type FKMKeyData ¶
type FKMKeyTable ¶
type FKMKeys ¶
type FKMKeys struct { XMLName xml.Name `xml:"keys"` 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"` Files []FKMFile `xml:"fkm>files>file,omitempty"` }
type FKMStaticKeyTable ¶
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 *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"` 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 FloatingProbe ¶
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"` 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 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"` }
type GatewaySQLTableDataview ¶
type GatewaySQLTableDataview struct { XMLName xml.Name `xml:"dataview"` Name *SingleLineString `xml:"tableName"` XPath string `xml:"xpath"` Columns *[]GWSQLColumn `xml:"columns>column,omitempty"` }
type GatewaySQLTableHeadline ¶
type GatewaySQLTableHeadline struct { XMLName xml.Name `xml:"headlines"` Name *SingleLineString `xml:"tableName"` XPath string `xml:"xpath"` }
type GatewaySQLTableXPath ¶
type GatewaySQLTableXPath struct { XMLName xml.Name `xml:"xpath"` Name *SingleLineString `xml:"tableName"` XPaths []string `xml:"xpaths>xpath"` Columns []GWSQLColumn `xml:"columns>column"` }
type GatewaySQLTables ¶
type GatewaySQLTables struct {
Tables []interface{}
}
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 ManagedEntities struct { XMLName xml.Name `xml:"managedEntities"` Entities []ManagedEntity `xml:",omitempty"` ManagedEntityGroups []ManagedEntityGroup `xml:",omitempty"` }
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"` Environment *EnvironmentRef `xml:",omitempty"` Attributes []Attribute `xml:",omitempty"` AddTypes struct { XMLName xml.Name `xml:"addTypes"` Types []TypeRef `xml:",omitempty"` } Vars []Vars `xml:",omitempty"` Samplers []Reference `xml:"sampler,omitempty"` }
type ManagedEntityGroup ¶ added in v1.3.0
type ManagedEntityGroup struct { XMLName xml.Name `xml:"managedEntityGroup"` Name string `xml:"name,attr"` Attributes []Attribute `xml:",omitempty"` Vars []Vars `xml:",omitempty"` Entities []ManagedEntity `xml:",omitempty"` ManagedEntityGroups []ManagedEntityGroup `xml:",omitempty"` }
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"`
}
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 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"` }
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 *Value `xml:"sampleInterval,omitempty"` SampleOnStartup bool `xml:"sampleOnStartup"` Plugin interface{} `xml:"plugin"` Dataviews *[]Dataview `xml:"dataviews>dataview,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"` Name string `xml:"name,attr"` Samplers []Sampler `xml:",omitempty"` SamplerGroups []SamplerGroup `xml:",omitempty"` }
type Samplers ¶
type Samplers struct { XMLName xml.Name `xml:"samplers"` Samplers []Sampler `xml:",omitempty"` SamplerGroups []SamplerGroup `xml:",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 Sybase ¶
type Sybase struct { InstanceName *SingleLineString `xml:"var-instanceName"` DBName *SingleLineString `xml:"var-databaseName"` }
type ToolkitPlugin ¶
type ToolkitPlugin struct { SamplerScript *SingleLineString `xml:"toolkit>samplerScript"` EnvironmentVariables *[]EnvironmentVariable `xml:"toolkit>environmentVariables>variable"` }
type TypeRef ¶ added in v1.4.1
type TypeRef struct { XMLName xml.Name `xml:"type"` Type string `xml:"ref,attr"` Environment *EnvironmentRef `xml:"environment"` }
type Value ¶
type Value struct {
Parts []interface{}
}
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:",omixempty"“ to leave out VarData fields that contain no data.
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"` NameValueList *NameValueList `xml:"nameValueList,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.