geneos

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 APIStreamsPlugin struct {
	Streams    *Streams `xml:"api-streams>streams"`
	CreateView *Value   `xml:"api-streams>createView,omitempty"`
}

type Attribute

type Attribute struct {
	XMLName xml.Name `xml:"attribute"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:",innerxml"`
}

type CollectionAgent

type CollectionAgent struct {
	Start        bool   `xml:"start,omitempty"`
	JVMArgs      string `xml:"jvmArgs,omitempty"`
	HealthPort   int    `xml:"healthPort,omitempty"`
	ReporterPort int    `xml:"reporterPort,omitempty"`
	Detached     bool   `xml:"detached"`
}

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 Data

type Data struct {
	XMLName xml.Name `xml:"data"`
	Data    string   `xml:",chardata"`
}

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 DataviewAdditions struct {
	XMLName   xml.Name `xml:"additions"`
	Headlines *Value   `xml:"var-headlines,omitempty"`
	Columns   *Value   `xml:"var-columns,omitempty"`
	Rows      *Value   `xml:"var-rows,omitempty"`
}

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 EnvironmentRef struct {
	XMLName xml.Name `xml:"environment"`
	Ref     string   `xml:"ref,attr"`
}

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 FKMIgnoreKey struct {
	XMLName xml.Name `xml:"ignoreKey"`
	Match   FKMMatch `xml:"match"`
}

type FKMKey

type FKMKey struct {
	XMLName  xml.Name  `xml:"key"`
	SetKey   FKMSetKey `xml:"setKey"`
	ClearKey *FKMMatch `xml:"clearKey,omitempty"`
	Message  *Value    `xml:"message,omitempty"`
	Severity string    `xml:"severity,omitempty"`
}

type FKMKeyData

type FKMKeyData struct {
	XMLName xml.Name `xml:"data"`
	Keys    FKMKeys
}

type FKMKeyTable

type FKMKeyTable struct {
	XMLName xml.Name `xml:"fkmTable"`
	Name    string   `xml:"ref,attr"`
}

type FKMKeys

type FKMKeys struct {
	XMLName xml.Name      `xml:"keys"`
	Keys    []interface{} // should be FKMIgnoreKey or FKMKey
}

func NewFKMKeys

func NewFKMKeys(keys ...string) (out FKMKeys)

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

func (FKMKeys) Append

func (in FKMKeys) Append(key string) (out FKMKeys)

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 FKMSetKey

type FKMSetKey struct {
	Match        *FKMMatch `xml:"match,omitempty"`
	NotUpdatedIn *Value    `xml:"notUpdatedIn>timePeriodInSeconds,omitempty"`
	Updated      string    `xml:"updated,omitempty"`
}

type FKMStaticKeyTable

type FKMStaticKeyTable struct {
	XMLName xml.Name `xml:"fkmTable"`
	Name    string   `xml:"name,attr"`
	Keys    FKMKeys
}

type FKMTable

type FKMTable struct {
	XMLName  xml.Name `xml:"table"`
	Severity string   `xml:"severity"`
	KeyTable *Value   `xml:"keyTable"`
}

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 FTMWeekdays struct {
	Monday    bool `xml:"monday"`
	Tuesday   bool `xml:"tuesday"`
	Wednesday bool `xml:"wednesday"`
	Thursday  bool `xml:"thursday"`
	Friday    bool `xml:"friday"`
	Saturday  bool `xml:"saturday"`
	Sunday    bool `xml:"sunday"`
}

type FloatingProbe

type FloatingProbe struct {
	Enabled                  bool       `xml:"enabled"`
	RetryInterval            int        `xml:"retryInterval,omitempty"`
	RequireReverseConnection bool       `xml:"requireReverseConnection,omitempty"`
	ProbeName                string     `xml:"probeName"`
	Gateways                 []Gateways `xml:"gateways"`
}

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 Gateways

type Gateways struct {
	XMLName  xml.Name `xml:"gateway"`
	Hostname string   `xml:"hostname"`
	Port     int      `xml:"port,omitempty"`
	Secure   bool     `xml:"secure,omitempty"`
}

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 NameValue

type NameValue struct {
	Name  string `xml:"name"`
	Value string `xml:"value"`
}

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 PlainType

type PlainType struct {
	Type string `xml:"type"`
}

type Query

type Query struct {
	Name *SingleLineString `xml:"name"`
	SQL  *SingleLineString `xml:"sql"`
}

type Reference

type Reference struct {
	Ref string `xml:"ref,attr"`
}

type Rule

type Rule struct {
	XMLName      xml.Name `xml:"rule"`
	Name         string   `xml:"name,attr"`
	Targets      []string `xml:"targets>target"`
	Priority     int      `xml:"priority"`
	Ifs          []interface{}
	Transactions []interface{}
}

type RuleGroups

type RuleGroups struct {
	XMLName xml.Name `xml:"ruleGroup"`
	Name    string   `xml:"name,attr"`
}

type Rules

type Rules struct {
	XMLName    xml.Name `xml:"rules"`
	RuleGroups []interface{}
	Rules      []interface{}
}

type SAManagedEntity

type SAManagedEntity struct {
	XMLName    xml.Name    `xml:"managedEntity"`
	Name       string      `xml:"name"`
	Attributes []Attribute `xml:"attributes,omitempty"`
	Vars       []Vars      `xml:"variables,omitempty"`
	Types      []PlainType `xml:"types,omitempty"`
}

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 Type

type Type struct {
	XMLName      xml.Name    `xml:"type"`
	Name         string      `xml:"name,attr"`
	Environments []Reference `xml:"environment,omitempty"`
	Vars         []Vars      `xml:",omitempty"`
	Samplers     []Reference `xml:"sampler,omitempty"`
}

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 Types

type Types struct {
	XMLName xml.Name `xml:"types"`
	Group   struct {
		XMLName xml.Name `xml:"typeGroup"`
		Name    string   `xml:"name,attr"`
		Types   []Type
	}
}

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 Var

type Var struct {
	XMLName xml.Name `xml:"var"`
	Var     string   `xml:"ref,attr"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL