Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MetricsPath = kingpin.Flag( "web.telemetry-path", "Path under which to expose metrics.", ).Default("/metrics").String() DisableExporterMetrics = kingpin.Flag( "web.disable-exporter-metrics", "Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).", ).Envar("OPNSENSE_EXPORTER_DISABLE_EXPORTER_METRICS").Bool() MaxProcs = kingpin.Flag( "runtime.gomaxprocs", "The target number of CPUs that the Go runtime will run on (GOMAXPROCS)", ).Envar("GOMAXPROCS").Default("2").Int() InstanceLabel = kingpin.Flag( "exporter.instance-label", "Label to use to identify the instance in every metric. "+ "If you have multiple instances of the exporter, you can differentiate them by using "+ "different value in this flag, that represents the instance of the target OPNsense.", ).Envar("OPNSENSE_EXPORTER_INSTANCE_LABEL").Required().String() WebConfig = kingpinflag.AddFlags(kingpin.CommandLine, ":8080") )
Functions ¶
Types ¶
type CollectorsDisableSwitch ¶ added in v0.0.4
type CollectorsDisableSwitch struct { ARP bool Cron bool Wireguard bool Unbound bool OpenVPN bool Firewall bool }
CollectorsDisableSwitch hold the enabled/disabled state of the collectors
func CollectorsSwitches ¶
func CollectorsSwitches() CollectorsDisableSwitch
CollectorsSwitches returns configured instances of CollectorsDisableSwitch
type OPNSenseConfig ¶
type OPNSenseConfig struct { Protocol string Host string APIKey string APISecret string Insecure bool }
OPNSenseConfig holds the configuration for the OPNsense API.
func OPNSense ¶
func OPNSense() (*OPNSenseConfig, error)
func (*OPNSenseConfig) Validate ¶
func (c *OPNSenseConfig) Validate() error
Validate checks if the configuration is valid. returns an error on any missing value
Click to show internal directories.
Click to hide internal directories.