geneos

package
v1.0.20-pre Latest Latest
Warning

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

Go to latest
Published: Aug 10, 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 APISampler

type APISampler struct {
	XMLName    xml.Name    `xml:"sampler"`
	Name       string      `xml:"name,attr"`
	Comment    string      `xml:",comment"`
	Group      string      `xml:"var-group>data"`
	Interval   *DataOrVar  `xml:"sampleInterval,omitempty"`
	Parameters []Parameter `xml:"plugin>api>parameters>parameter"`
}

type APIStreamsSampler

type APIStreamsSampler struct {
	XMLName    xml.Name   `xml:"sampler"`
	Name       string     `xml:"name,attr"`
	Comment    string     `xml:",comment"`
	Group      string     `xml:"var-group>data"`
	Interval   *DataOrVar `xml:"sampleInterval,omitempty"`
	Streams    *Streams   `xml:"plugin>api-streams>streams"`
	CreateView *DataOrVar `xml:"plugin>api-streams>createView"`
}

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 Column

type Column struct {
	Name  string `xml:"name>data"`
	XPath string `xml:"xpath"`
	Type  string `xml:"type"`
}

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 bool       `xml:"closeConnectionAfterQuery>data"`
}

type Data

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

type DataOrVar

type DataOrVar struct {
	Part interface{}
}

DataOrVar is a struct that contains either a Var or a Data type depending on the usage.

func NewDataOrVar

func NewDataOrVar(s string) (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 DataviewAdditions

type DataviewAdditions struct {
	XMLName   xml.Name           `xml:"additions"`
	Headlines []DataviewHeadline `xml:"var-headlines>data,omitempty"`
}

type DataviewHeadline

type DataviewHeadline struct {
	Name string `xml:"headline>data,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,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 SingleLineStringVar `xml:"value"`
}

type Environments

type Environments struct {
	XMLName      xml.Name `xml:"environments"`
	Groups       []EnvironmentGroup
	Environments []Environment
}

type FTMAdditionalPath

type FTMAdditionalPath struct {
	Path string `xml:"data"`
}

type FTMAdditionalPaths

type FTMAdditionalPaths struct {
	Paths []FTMAdditionalPath `xml:"additionalPath"`
}

type FTMFile

type FTMFile struct {
	XMLName         xml.Name            `xml:"file"`
	Path            string              `xml:"path>data"`
	AdditionalPaths *FTMAdditionalPaths `xml:"additionalPaths,omitempty"`
	ExpectedArrival string              `xml:"expectedArrival>data"`
	ExpectedPeriod  *struct {
		Period string `xml:",innerxml"`
	} `xml:"expectedPeriod,omitempty"`
	TZOffset         string      `xml:"tzOffset>data"`
	MonitoringPeriod interface{} `xml:"monitoringPeriod"`
	Alias            string      `xml:"alias>data"`
}

type FTMSampler

type FTMSampler struct {
	XMLName                    xml.Name   `xml:"sampler"`
	Name                       string     `xml:"name,attr"`
	Comment                    string     `xml:",comment"`
	Group                      string     `xml:"var-group>data"`
	Interval                   *DataOrVar `xml:"sampleInterval,omitempty"`
	Files                      []FTMFile  `xml:"plugin>ftm>files>file"`
	ConsistentDateStamps       bool       `xml:"plugin>ftm>consistentDateStamps>data,omitempty"`
	DisplayTimeInISO8601Format bool       `xml:"plugin>ftm>displayTimeInIso8601Format>data,omitempty"`
	ShowActualFilename         bool       `xml:"plugin>ftm>showActualFilename>data,omitempty"`
	DelayUnit                  string     `xml:"plugin>ftm>delayUnit"`
	SizeUnit                   string     `xml:"plugin>ftm>sizeUnit"`
	Dataviews                  []Dataview `xml:"dataviews>dataview,omitempty"`
}

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 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 {
	XMLName   xml.Name          `xml:"sampler"`
	Name      string            `xml:"name,attr"`
	Comment   string            `xml:",comment"`
	Group     string            `xml:"var-group>data"`
	Interval  *DataOrVar        `xml:"sampleInterval,omitempty"`
	Setup     string            `xml:"plugin>Gateway-sql>setupSql>sql>data"`
	Tables    []GatewaySQLTable `xml:"plugin>Gateway-sql>tables>xpath"`
	Views     []View            `xml:"plugin>Gateway-sql>views>view"`
	Dataviews []Dataview        `xml:"dataviews>dataview,omitempty"`
}

type GatewaySQLTable

type GatewaySQLTable struct {
	XMLName xml.Name `xml:"xpath"`
	Name    string   `xml:"tableName>data"`
	XPaths  []string `xml:"xpaths>xpath"`
	Columns []Column `xml:"columns>column"`
}

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"`
	ManagedEntityGroup struct {
		XMLName    xml.Name        `xml:"managedEntityGroup"`
		Name       string          `xml:"name,attr"`
		Attributes []Attribute     `xml:",omitempty"`
		Vars       []Vars          `xml:",omitempty"`
		Entities   []ManagedEntity `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"`
	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 string `xml:"periodStart>data"`
}

type MySQL

type MySQL struct {
	ServerNameVar VarRef `xml:"var-serverName>var"`
	DBNameVar     VarRef `xml:"var-databaseName>var"`
	PortVar       VarRef `xml:"var-port>var"`
}

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 SingleLineStringVar `xml:"value"`
}

type PlainType

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

type Query

type Query struct {
	Name string              `xml:"name>data"`
	SQL  SingleLineStringVar `xml:"sql"`
}

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 {
	ServerNameVar VarRef `xml:"var-serverName>var"`
	DBNameVar     VarRef `xml:"var-databaseName>var"`
	PortVar       VarRef `xml:"var-port>var"`
}

type SQLToolkitSampler

type SQLToolkitSampler struct {
	XMLName    xml.Name     `xml:"sampler"`
	Name       string       `xml:"name,attr"`
	Comment    string       `xml:",comment"`
	Group      string       `xml:"var-group>data"`
	Interval   *DataOrVar   `xml:"sampleInterval,omitempty"`
	Queries    []Query      `xml:"plugin>sql-toolkit>queries>query"`
	Connection DBConnection `xml:"plugin>sql-toolkit>connection"`
}

type Samplers

type Samplers struct {
	XMLName      xml.Name `xml:"samplers"`
	SamplerGroup struct {
		Name          string `xml:"name,attr"`
		SamplerGroups []interface{}
		Samplers      []interface{}
	} `xml:"samplerGroup"`
}

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 SingleLineStringVar added in v1.6.3

type SingleLineStringVar struct {
	Parts []interface{}
}

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 SingleLineStringVar `xml:"fieldname"`
}

func blah() {
	x := MyContainer{
		VarField: geneos.NewSingleLineString(geneos.Data{Data: "hello"}, geneos.Var{Var: "world"}, geneos.Data{Data: "!"})
	}
	...
}

func ExpandSingleLineStringVar

func ExpandSingleLineStringVar(in string) (s SingleLineStringVar)

ExpandSingleLineStringVar 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 NewSingleLineStringVar

func NewSingleLineStringVar(parts ...interface{}) (s SingleLineStringVar)

type Streams

type Streams struct {
	XMLName xml.Name              `xml:"streams"`
	Stream  []SingleLineStringVar `xml:"stream"`
}

type StringList

type StringList struct {
	Strings []string `xml:"string"`
}

type Sybase

type Sybase struct {
	InstanceNameVar VarRef `xml:"var-instanceName>var"`
	DBNameVar       VarRef `xml:"var-databaseName>var"`
}

type ToolkitSampler

type ToolkitSampler struct {
	XMLName              xml.Name              `xml:"sampler"`
	Name                 string                `xml:"name,attr"`
	Comment              string                `xml:",comment"`
	Group                string                `xml:"var-group>data"`
	Interval             *DataOrVar            `xml:"sampleInterval,omitempty"`
	SamplerScript        string                `xml:"plugin>toolkit>samplerScript>data"`
	EnvironmentVariables []EnvironmentVariable `xml:"plugin>toolkit>environmentVariables>variable"`
}

type Type

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

type TypeRef added in v1.4.1

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

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 Var

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

type VarRef

type VarRef struct {
	Name 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"`
	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.

type View

type View struct {
	XMLName  xml.Name            `xml:"view"`
	ViewName SingleLineStringVar `xml:"name"`
	SQL      string              `xml:"sql>data"`
}

Jump to

Keyboard shortcuts

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