san

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 14 Imported by: 0

README

geneos Self-Announcing Netprobe Comopnents

A Self-Announcing Netprobe (SAN) uses the standard Netprobe installation package but announces itself to the Gateway and carries much of it's own configuration in a local setup XML file. Multiple SANs can connect to a Gateway as long as each has it's own, unique name.

  • San general

  • San templates

  • San variables for templates

    Like for Gateways, SANs get a default configuration file when they are created. By default this is from the template(s) in san/templates. Unlike for the Gateway these configuration files are rebuilt by the rebuild command by default. This allows the administrator to maintain SANs using only command line tools and avoid having to edit XML directly. Setting configrebuild to never in the instance configuration prevents this rebuild. To aid this, SANs support the following special parameters:

    • Attributes

    Attributes can be added via set, add or init using the -a flag in the form NAME=VALUE and also removed using unset in the same way but just with a NAME

    • Gateways

    As for Attributes, the -g flag can specify Gateways to connect to in the form HOSTNAME:PORT

    • Types

    Types can be specified using -t

    • Variables

    Variables can be set using -v but there is only support for a limited number of types, specifically those that have values that can be give in plain string format.

Selecting the underlying Netprobe type (For Fix Analyser 2 below) A San instance will normally be built to use the general purpose Netprobe package. To use an alternative package, such as the Fix Analyser 2 Netprobe, add the instance with the special format name fa2:example[@REMOTE] - this configures the instance to use the fa2 as the underlying package. Any future special purpose Netprobes can also be supported in this way.

  • Secure Connections

If a "certificate", a "chainfile" or the "secure" parameters exist then the default template will build Gateway connections using TLS.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var San = geneos.Component{
	Initialise:   Init,
	Name:         "san",
	Aliases:      []string{"sans"},
	LegacyPrefix: "san",
	ParentType:   &netprobe.Netprobe,
	PackageTypes: []*geneos.Component{&netprobe.Netprobe, &fa2.FA2},
	UsesKeyfiles: true,
	Templates:    []geneos.Templates{{Filename: templateName, Content: template}},
	DownloadBase: geneos.DownloadBases{Resources: "Netprobe", Nexus: "geneos-netprobe"},
	PortRange:    "SanPortRange",
	CleanList:    "SanCleanList",
	PurgeList:    "SanPurgeList",
	LegacyParameters: map[string]string{
		"binsuffix": "binary",
		"sanhome":   "home",
		"sanbins":   "install",
		"sanbase":   "version",
		"sanexec":   "program",
		"sanlogd":   "logdir",
		"sanlogf":   "logfile",
		"sanport":   "port",
		"sanlibs":   "libpaths",
		"sancert":   "certificate",
		"sankey":    "privatekey",
		"sanuser":   "user",
		"sanopts":   "options",
		"santype":   "pkgtype",
	},
	Defaults: []string{
		`binary={{if eq .pkgtype "fa2"}}fix-analyser2-{{end}}netprobe.linux_64`,
		`home={{join .root "netprobe" "sans" .name}}`,
		`install={{join .root "packages" .pkgtype}}`,
		`version=active_prod`,
		`program={{join "${config:install}" "${config:version}" "${config:binary}"}}`,
		`logfile=san.log`,
		`port=7036`,
		`libpaths={{join "${config:install}" "${config:version}" "lib64"}}:{{join "${config:install}" "${config:version}"}}`,
		`sanname={{"${config:name}"}}`,
		`setup={{join "${config:home}" "netprobe.setup.xml"}}`,
		`autostart=true`,
	},
	GlobalSettings: map[string]string{
		"SanPortRange": "7036,7100-",
		"SanCleanList": "*.old",
		"SanPurgeList": "san.log:san.txt:*.snooze:*.user_assignment",
	},
	Directories: []string{
		"packages/netprobe",
		"netprobe/netprobes_shared",
		"netprobe/sans",
		"netprobe/templates",
	},
}

Functions

func Init

func Init(r *geneos.Host, ct *geneos.Component)

Types

type Sans

type Sans instance.Instance

func (*Sans) Add

func (s *Sans) Add(template string, port uint16) (err error)

func (*Sans) Command

func (s *Sans) Command() (args, env []string, home string)

func (*Sans) Config

func (s *Sans) Config() *config.Config

func (*Sans) Home

func (s *Sans) Home() string

func (*Sans) Host

func (s *Sans) Host() *geneos.Host

func (*Sans) Load

func (s *Sans) Load() (err error)

func (*Sans) Loaded

func (s *Sans) Loaded() time.Time

func (*Sans) Name

func (s *Sans) Name() string

func (*Sans) Rebuild

func (s *Sans) Rebuild(initial bool) (err error)

Rebuild the netprobe.setup.xml file

we do a dance if there is a change in TLS setup and we use default ports

func (*Sans) Reload

func (s *Sans) Reload() (err error)

func (*Sans) SetLoaded added in v1.8.0

func (s *Sans) SetLoaded(t time.Time)

func (*Sans) String

func (s *Sans) String() string

func (*Sans) Type

func (s *Sans) Type() *geneos.Component

Return the Component for an Instance

func (*Sans) Unload

func (s *Sans) Unload() (err error)

Jump to

Keyboard shortcuts

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