Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶ added in v1.0.2
Migrate applies schema migrations (util.MigrateDatabase) and nothing else. Runtime commands connect with util.ConnectDatabase and must not call this as a side effect: migrating while factum2-web is serving will rewrite tables out from under the GUI. Stop the web process, run migrate, start it again. Uses Params (factum2.yaml with db:) even when the parent binary is otherwise a ParamsAgent API client.
func Run ¶ added in v1.0.4
Run executes a boa command without dumping cobra usage/help on error. boa.Cmd.Run always prints UsageString() before the error — including for runtime failures from RunFuncE — which dumps every config flag on crash. --help still works. Failures print "Error: ..." to stderr and exit 1.
func SetupLog ¶
func SetupLog(c CommonParams) error
func ShowConfig ¶
func ShowConfigAgent ¶
ShowConfigAgent is the show-config subcommand for binaries that embed ParamsAgent (factum/worker sections only) rather than the full Params - keeps show-config's required flags matching what the binary's other subcommands actually need.
fetchRemote is optional: services that pull their database-backed settings from the primary over REST (dns, icinga, librenms, oxidized, prometheus) pass their FetchRemoteConfig, and its result is printed after the local config. A fetch failure is logged and the command still exits 0 - show-config should always report what it can, even with the primary unreachable, rather than have the whole command fail from a single missing section.
Types ¶
type CommonParams ¶
type Params ¶
type Params struct {
ConfigFile string `short:"f" configfile:"true" optional:"false" default:"/etc/factum2/factum2.yaml"`
Config util.ConfigRoot `yaml:",inline"`
CommonParams
}
type ParamsAgent ¶
type ParamsAgent struct {
ConfigFile string `short:"f" configfile:"true" optional:"false" default:"/etc/factum2/factum2-worker.yaml"`
Config util.ConfigAgentRoot `yaml:",inline"`
CommonParams
}
Directories
¶
| Path | Synopsis |
|---|---|
|
factum2-icinga-notifications is the Icinga2 NotificationCommand invoked directly by icinga2 whenever a host/service alarm fires.
|
factum2-icinga-notifications is the Icinga2 NotificationCommand invoked directly by icinga2 whenever a host/service alarm fires. |
|
Web backend for factumn2
|
Web backend for factumn2 |