Documentation ¶
Index ¶
- Constants
- type Collector
- type CollectorInstance
- type Option
- type WireguardCollector
- func (c *WireguardCollector) Describe(ch chan<- *prometheus.Desc)
- func (c *WireguardCollector) Name() string
- func (c *WireguardCollector) Register(namespace, instanceLabel string, log log.Logger)
- func (c *WireguardCollector) Update(client *opnsense.Client, ch chan<- prometheus.Metric) *opnsense.APICallError
Constants ¶
View Source
const ArpTableSubsystem = "arp_table"
View Source
const CronTableSubsystem = "cron"
View Source
const GatewaysSubsystem = "gateways"
View Source
const InterfacesSubsystem = "interfaces"
View Source
const OpenVPNSubsystem = "openvpn"
View Source
const ProtocolSubsystem = "protocol"
View Source
const ServicesSubsystem = "services"
View Source
const UnboundDNSSubsystem = "unbound_dns"
View Source
const WireguardSubsystem = "wireguard"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
func New ¶
func New(client *opnsense.Client, log log.Logger, instanceName string, options ...Option) (*Collector, error)
New creates a new Collector instance.
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type CollectorInstance ¶
type CollectorInstance interface { Register(namespace, isntance string, log log.Logger) Name() string Describe(ch chan<- *prometheus.Desc) Update(client *opnsense.Client, ch chan<- prometheus.Metric) *opnsense.APICallError }
CollectorInstance is the interface a service specific collectors must implement.
type Option ¶
func WithoutArpTableCollector ¶
func WithoutArpTableCollector() Option
WithoutArpTableCollector Option removes the arp_table collector from the list of collectors
func WithoutCronCollector ¶
func WithoutCronCollector() Option
WithoutCronCollector Option removes the cron collector from the list of collectors
func WithoutUnboundCollector ¶
func WithoutUnboundCollector() Option
WithoutUnboundCollector Option removes the unbound_dns collector from the list of collectors
func WithoutWireguardCollector ¶
func WithoutWireguardCollector() Option
WithoutWireguardCollector Option removes the wireguard collector from the list of collectors
type WireguardCollector ¶
type WireguardCollector struct { TransferRx *prometheus.Desc TransferTx *prometheus.Desc LatestHandshake *prometheus.Desc // contains filtered or unexported fields }
func (*WireguardCollector) Describe ¶
func (c *WireguardCollector) Describe(ch chan<- *prometheus.Desc)
func (*WireguardCollector) Name ¶
func (c *WireguardCollector) Name() string
func (*WireguardCollector) Register ¶
func (c *WireguardCollector) Register(namespace, instanceLabel string, log log.Logger)
func (*WireguardCollector) Update ¶
func (c *WireguardCollector) Update(client *opnsense.Client, ch chan<- prometheus.Metric) *opnsense.APICallError
Click to show internal directories.
Click to hide internal directories.