Documentation
¶
Overview ¶
Package cordial is a collection of tools, packages and integrations for Geneos written primarily in Go
Package cordial is a collection of tools, packages and integrations for Geneos written primarily in Go
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( LogLevel slog.LevelVar Logger *slog.Logger = slog.Default() LogHandler slog.Handler )
var VERSION string
VERSION is a semi-global string variable
Functions ¶
func ExecutableName ¶ added in v1.11.0
ExecutableName returns a processed executable name. Symlinks are resolved and the basename of the resulting file has, at most, one extension removed and then if there is a '-' followed by the matching cordial version string. Note this final version string must match first version argument or the cordial one compiled into the binary.
For example:
`geneos.exe` -> `geneos` `dv2email-v1.10.0` -> `dv2email`
func LogInit ¶
LogInit is called to set-up logging with our chosen defaults. The default is to log to STDERR.
If logfile is passed and the first element is not empty, then use that as the log file unless it is either "-" (which means use STDOUT (not STDERR) or equal to the os.DevNull value, in which case is io.Discard.
The environment variable `CORDIAL_LOG_OUTPUT` can be used to override the logfile option. If `CORDIAL_LOG_OUTPUT` is set, then the cordial.SetLogfile option is ignored.
The environment variable `CORDIAL_LOG_FORMAT` can be used to set the log format. If `CORDIAL_LOG_FORMAT` is set to "json", then the log format is JSON, otherwise the format is a human readable format, with colouring enabled if the output is a termial according to `term.IsTerminal()`.
func RenderHelpAsMD ¶ added in v1.7.0
RenderHelpAsMD sets the help template of the given cobra.Command to render the long description and short description as Markdown, using the src.elv.sh/pkg/md package.
Types ¶
type LogOption ¶ added in v1.27.0
type LogOption func(*logOpts)
func LumberjackOptions ¶ added in v1.14.0
func LumberjackOptions(lj *lumberjack.Logger) LogOption
LumberJackOptions set the log writer to the configured lumberjack settings but only if the lj.Filename field is not empty, otherwise it is ignored.
func RotateOnStart ¶ added in v1.14.0
func SetLogLevel ¶ added in v1.28.0
SetLogLevel takes a slog debug level to use as a default
func SetLogfile ¶ added in v1.14.0
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
api
command
|
|
|
api2
command
|
|
|
cliauth
command
|
|
|
dockerlogs
command
|
|
|
integrations
|
|
|
pagerduty
command
Standalone pagerduty integration executable
|
Standalone pagerduty integration executable |
|
servicenow
command
|
|
|
servicenow2
command
|
|
|
libraries
|
|
|
libalert
command
|
|
|
libemail
command
|
|
|
pkg
|
|
|
certs
The certs package provides functions for handling TLS certificates and keys.
|
The certs package provides functions for handling TLS certificates and keys. |
|
config
Package config adds local extensions to viper as well as supporting Geneos encryption key files and basic encryption and decryption.
|
Package config adds local extensions to viper as well as supporting Geneos encryption key files and basic encryption and decryption. |
|
email
The email package provides Geneos specific email processing to support libemail and other email senders using Geneos formatted parameters.
|
The email package provides Geneos specific email processing to support libemail and other email senders using Geneos formatted parameters. |
|
geneos/commands
Package commands wraps the Geneos Gateway REST Command API in Go
|
Package commands wraps the Geneos Gateway REST Command API in Go |
|
geneos/xpath
Package to handle Geneos Gateway specific XPaths
|
Package to handle Geneos Gateway specific XPaths |
|
host
Provides remote file and command functions
|
Provides remote file and command functions |
|
icp
Package icp provides binding the the ITRS Capacity Planner data model
|
Package icp provides binding the the ITRS Capacity Planner data model |
|
ims
package ims provides basic support for Incident Management System (IMS) integration, such as ServiceDesk Plus, ServiceNow, etc.
|
package ims provides basic support for Incident Management System (IMS) integration, such as ServiceDesk Plus, ServiceNow, etc. |
|
reporter
The reporter package provides a simple interface to generating Geneos dataviews, with headlines and a data table, either though the XML-RPC API, as Toolkit compatible CSV, XLSX workbooks or a number of other formats.
|
The reporter package provides a simple interface to generating Geneos dataviews, with headlines and a data table, either though the XML-RPC API, as Toolkit compatible CSV, XLSX workbooks or a number of other formats. |
|
tools
|
|
|
dv2email
command
|
|
|
files2dv
command
|
|
|
gateway-reporter
command
|
|
|
geneos
command
|
|
|
geneos/cmd
Package cmd contains all the main commands for the `geneos` program
|
Package cmd contains all the main commands for the `geneos` program |
|
geneos/cmd/aescmd
Package aescmd groups related AES256 keyfile and crypto commands
|
Package aescmd groups related AES256 keyfile and crypto commands |
|
geneos/cmd/cfgcmd
Package cfgcmd groups config commands in their own package
|
Package cfgcmd groups config commands in their own package |
|
geneos/cmd/hostcmd
Package hostcmd contains all the host subsystem commands
|
Package hostcmd contains all the host subsystem commands |
|
geneos/cmd/initcmd
Package initcmd contains all the init subsystem commands
|
Package initcmd contains all the init subsystem commands |
|
geneos/cmd/pkgcmd
Package pkgcmd contains all the package subsystem commands
|
Package pkgcmd contains all the package subsystem commands |
|
geneos/cmd/tlscmd
Package tlscmd contains all the TLS subsystem commands
|
Package tlscmd contains all the TLS subsystem commands |
|
geneos/internal/component/ac2
Package ac2 supports installation and control of the Active Console
|
Package ac2 supports installation and control of the Active Console |
|
geneos/internal/geneos
Package geneos provides internal features to manage a typical `Best Practice` installation layout and the conventions that have formed around that structure over many years.
|
Package geneos provides internal features to manage a typical `Best Practice` installation layout and the conventions that have formed around that structure over many years. |
|
geneos/utils/docs
command
The docs utility builds markdown documentation from the geneos program sources and writes to the `docs` directory.
|
The docs utility builds markdown documentation from the geneos program sources and writes to the `docs` directory. |
|
ims-gateway
command
|
|
|
ims-gateway/internal/snow
package snow provides the ServiceNow integration for the IMS Gateway.
|
package snow provides the ServiceNow integration for the IMS Gateway. |
|
san-config
command
|
|
|
sso-diag
command
|
|
|
utils
|
|
|
docs
command
docs creates documentation from the tools and integrations in the repo (except `geneos` which has it's own copy of this with custom mods)
|
docs creates documentation from the tools and integrations in the repo (except `geneos` which has it's own copy of this with custom mods) |