Documentation
¶
Index ¶
- type ActiveTunnelReply
- type BGPCollector
- type BoolIfPresent
- type Collector
- type Config
- type EnvCollector
- type EnvTempThreshold
- type EnvTempThresholdInformation
- type Exporter
- type FPCCollector
- type InactiveTunnelReply
- type InterfaceCollector
- type IpsecCollector
- type OSPFCollector
- type OpticsCollector
- type OpticsDiagLanes
- type OpticsDiagnostics
- type PowerCollector
- type RECollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveTunnelReply ¶ added in v0.1.10
type ActiveTunnelReply struct {
XMLName xml.Name `xml:"rpc-reply"`
Text string `xml:",chardata"`
Junos string `xml:"junos,attr"`
IpsecSecurityAssociationsInformation struct {
Text string `xml:",chardata"`
Style string `xml:"style,attr"`
TotalActiveTunnels string `xml:"total-active-tunnels"`
IpsecSecurityAssociationsBlock []struct {
Text string `xml:",chardata"`
SaBlockState string `xml:"sa-block-state"`
IpsecSecurityAssociations struct {
Text string `xml:",chardata"`
SaDirection string `xml:"sa-direction"`
SaTunnelIndex string `xml:"sa-tunnel-index"`
SaSpi string `xml:"sa-spi"`
SaAuxSpi string `xml:"sa-aux-spi"`
SaRemoteGateway string `xml:"sa-remote-gateway"`
SaPort string `xml:"sa-port"`
SaVpnMonitoringState string `xml:"sa-vpn-monitoring-state"`
SaProtocol string `xml:"sa-protocol"`
SaEspEncryptionAlgorithm string `xml:"sa-esp-encryption-algorithm"`
SaHmacAlgorithm string `xml:"sa-hmac-algorithm"`
SaHardLifetime string `xml:"sa-hard-lifetime"`
SaLifesizeRemaining string `xml:"sa-lifesize-remaining"`
SaVirtualSystem string `xml:"sa-virtual-system"`
} `xml:"ipsec-security-associations"`
} `xml:"ipsec-security-associations-block"`
} `xml:"ipsec-security-associations-information"`
Cli struct {
Text string `xml:",chardata"`
Banner string `xml:"banner"`
} `xml:"cli"`
}
type BGPCollector ¶
type BGPCollector struct {
// contains filtered or unexported fields
}
BGPCollector collects BGP metrics, implemented as per the Collector interface.
func NewBGPCollector ¶
func NewBGPCollector(logger log.Logger) *BGPCollector
NewBGPCollector returns a new BGPCollector
func (*BGPCollector) Get ¶ added in v0.1.6
func (c *BGPCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
type BoolIfPresent ¶ added in v1.0.0
type BoolIfPresent bool
func (*BoolIfPresent) UnmarshalXML ¶ added in v1.0.0
func (c *BoolIfPresent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Collector ¶
type Collector interface {
// Returns the name of the collector.
Name() string
// Gets metrics and sends to the Prometheus.Metric channel.
Get(ch chan<- prometheus.Metric, config Config) ([]error, float64)
}
Collector is the interface a collector has to implement.
type Config ¶ added in v0.1.6
type Config struct {
SSHClientConfig *ssh.ClientConfig
SSHTarget string
IfaceDescrKeys []string
IfaceMetricKeys []string
BGPTypeKeys []string
}
Config required by the collectors.
type EnvCollector ¶
type EnvCollector struct {
// contains filtered or unexported fields
}
EnvCollector collects environment metrics, implemented as per the Collector interface.
func NewEnvCollector ¶
func NewEnvCollector(logger log.Logger) *EnvCollector
NewEnvCollector returns a new EnvCollector.
func (*EnvCollector) Get ¶ added in v0.1.6
func (c *EnvCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
type EnvTempThreshold ¶ added in v1.1.0
type EnvTempThreshold struct {
Name envTempThresholdText `xml:"name"`
FanNormalSpeed envTempThresholdText `xml:"fan-normal-speed"`
FanHighSpeed envTempThresholdText `xml:"fan-high-speed"`
BadFanYellowAlarm envTempThresholdText `xml:"bad-fan-yellow-alarm"`
BadFanRedAlarm envTempThresholdText `xml:"bad-fan-red-alarm"`
YellowAlarm envTempThresholdText `xml:"yellow-alarm"`
RedAlarm envTempThresholdText `xml:"red-alarm"`
FireShutdown envTempThresholdText `xml:"fire-shutdown"`
}
type EnvTempThresholdInformation ¶ added in v1.1.0
type EnvTempThresholdInformation struct {
EnvTempThreshold []EnvTempThreshold `xml:"temperature-threshold"`
}
type Exporter ¶ added in v0.1.6
type Exporter struct {
Collectors []Collector
// contains filtered or unexported fields
}
Exporter collects all exporter metrics, implemented as per the prometheus.Collector interface.
func NewExporter ¶
NewExporter returns a new Exporter.
func (*Exporter) Collect ¶ added in v0.1.6
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect implemented as per the prometheus.Collector interface.
func (*Exporter) Describe ¶ added in v0.1.6
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe implemented as per the prometheus.Collector interface.
type FPCCollector ¶ added in v1.4.0
type FPCCollector struct {
// contains filtered or unexported fields
}
FPCCollector collects environment metrics, implemented as per the Collector interface.
func NewFPCCollector ¶ added in v1.4.0
func NewFPCCollector(logger log.Logger) *FPCCollector
NewFPCCollector returns a new FPCCollector.
func (*FPCCollector) Get ¶ added in v1.4.0
func (c *FPCCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
func (*FPCCollector) Name ¶ added in v1.4.0
func (*FPCCollector) Name() string
Name of the collector.
type InactiveTunnelReply ¶ added in v0.1.10
type InactiveTunnelReply struct {
XMLName xml.Name `xml:"rpc-reply"`
Text string `xml:",chardata"`
Junos string `xml:"junos,attr"`
MessageID string `xml:"message-id,attr"`
Xmlns string `xml:"xmlns,attr"`
IpsecUnestablishedTunnelInformation struct {
Text string `xml:",chardata"`
Style string `xml:"style,attr"`
TotalInactiveTunnels string `xml:"total-inactive-tunnels"`
TotalInactiveTunnelsWithEstablishImmediately string `xml:"total-inactive-tunnels-with-establish-immediately"`
IpsecSecurityAssociationsBlock []struct {
Text string `xml:",chardata"`
IpsecSecurityAssociations struct {
Text string `xml:",chardata"`
SaTunnelIndex string `xml:"sa-tunnel-index"`
SaRemoteGateway string `xml:"sa-remote-gateway"`
SaPort string `xml:"sa-port"`
SaTunnelEventTime string `xml:"sa-tunnel-event-time"`
SaTunnelEvent string `xml:"sa-tunnel-event"`
SaTunnelEventNumTimes string `xml:"sa-tunnel-event-num-times"`
} `xml:"ipsec-security-associations"`
} `xml:"ipsec-security-associations-block"`
} `xml:"ipsec-unestablished-tunnel-information"`
}
type InterfaceCollector ¶
type InterfaceCollector struct {
// contains filtered or unexported fields
}
InterfaceCollector collects Iface metrics, implemented as per the Collector iface.
func NewInterfaceCollector ¶
func NewInterfaceCollector(logger log.Logger) *InterfaceCollector
NewInterfaceCollector returns a new InterfaceCollector.
func (*InterfaceCollector) Get ¶ added in v0.1.6
func (c *InterfaceCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
type IpsecCollector ¶ added in v0.1.10
type IpsecCollector struct {
// contains filtered or unexported fields
}
EnvCollector collects environment metrics, implemented as per the Collector interface.
func NewIpsecCollector ¶ added in v0.1.10
func NewIpsecCollector(logger log.Logger) *IpsecCollector
NewEnvCollector returns a new EnvCollector.
func (*IpsecCollector) Get ¶ added in v0.1.10
func (c *IpsecCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
func (*IpsecCollector) Name ¶ added in v0.1.10
func (*IpsecCollector) Name() string
Name of the collector.
type OSPFCollector ¶ added in v1.3.0
type OSPFCollector struct {
// contains filtered or unexported fields
}
EnvCollector collects environment metrics, implemented as per the Collector interface.
func NewOSPFCollector ¶ added in v1.3.0
func NewOSPFCollector(logger log.Logger) *OSPFCollector
NewEnvCollector returns a new EnvCollector.
func (*OSPFCollector) Get ¶ added in v1.3.0
func (c *OSPFCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
func (*OSPFCollector) Name ¶ added in v1.3.0
func (*OSPFCollector) Name() string
Name of the collector.
type OpticsCollector ¶ added in v1.1.0
type OpticsCollector struct {
// contains filtered or unexported fields
}
OpticsCollector collects power metrics, implemented as per the Collector interface.
func NewOpticsCollector ¶ added in v1.1.0
func NewOpticsCollector(logger log.Logger) *OpticsCollector
NewOpticsCollector returns a new OpticsCollector .
func (*OpticsCollector) Get ¶ added in v1.1.0
func (c *OpticsCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
func (*OpticsCollector) Name ¶ added in v1.1.0
func (*OpticsCollector) Name() string
Name of the collector.
type OpticsDiagLanes ¶ added in v1.1.0
type OpticsDiagLanes struct {
LaneIndex opticsText `xml:"lane-index"`
LaserBiasCurrent opticsText `xml:"laser-bias-current"`
LaserOutputPower opticsText `xml:"laser-output-power"`
LaserOutputPowerDbm opticsText `xml:"laser-output-power-dbm"`
LaserRxOpticalPower opticsText `xml:"laser-rx-optical-power"`
LaserRxOpticalPowerDbm opticsText `xml:"laser-rx-optical-power-dbm"`
LaserBiasCurrentHighAlarm opticsText `xml:"laser-bias-current-high-alarm"`
LaserBiasCurrentLowAlarm opticsText `xml:"laser-bias-current-low-alarm"`
LaserBiasCurrentHighWarn opticsText `xml:"laser-bias-current-high-warn"`
LaserBiasCurrentLowWarn opticsText `xml:"laser-bias-current-low-warn"`
LaserRxPowerHighAlarm opticsText `xml:"laser-rx-power-high-alarm"`
LaserRxPowerLowAlarm opticsText `xml:"laser-rx-power-low-alarm"`
LaserRxPowerHighWarn opticsText `xml:"laser-rx-power-high-warn"`
LaserRxPowerLowWarn opticsText `xml:"laser-rx-power-low-warn"`
TxLossOfSignalFunctionalityAlarm opticsText `xml:"tx-loss-of-signal-functionality-alarm"`
RxLossOfSignalAlarm opticsText `xml:"rx-loss-of-signal-alarm"`
TxLaserDisabledAlarm opticsText `xml:"tx-laser-disabled-alarm"`
}
type OpticsDiagnostics ¶ added in v1.1.0
type OpticsDiagnostics struct {
ModuleTemperature opticsTemp `xml:"module-temperature"`
ModuleVoltage opticsText `xml:"module-voltage"`
ModuleTemperatureHighAlarm opticsText `xml:"module-temperature-high-alarm"`
ModuleTemperatureLowAlarm opticsText `xml:"module-temperature-low-alarm"`
ModuleTemperatureHighWarn opticsText `xml:"module-temperature-high-warn"`
ModuleTemperatureLowWarn opticsText `xml:"module-temperature-low-warn"`
ModuleVoltageHighAlarm opticsText `xml:"module-voltage-high-alarm"`
ModuleVoltageLowAlarm opticsText `xml:"module-voltage-low-alarm"`
ModuleVoltageHighWarn opticsText `xml:"module-voltage-high-warn"`
ModuleVoltageLowWarn opticsText `xml:"module-voltage-low-warn"`
ModuleTemperatureHighAlarmThreshold opticsTemp `xml:"module-temperature-high-alarm-threshold"`
ModuleTemperatureLowAlarmThreshold opticsTemp `xml:"module-temperature-low-alarm-threshold"`
ModuleTemperatureHighWarnThreshold opticsTemp `xml:"module-temperature-high-warn-threshold"`
ModuleTemperatureLowWarnThreshold opticsTemp `xml:"module-temperature-low-warn-threshold"`
ModuleVoltageHighAlarmThreshold opticsText `xml:"module-voltage-high-alarm-threshold"`
ModuleVoltageLowAlarmThreshold opticsText `xml:"module-voltage-low-alarm-threshold"`
ModuleVoltageHighWarnThreshold opticsText `xml:"module-voltage-high-warn-threshold"`
ModuleVoltageLowWarnThreshold opticsText `xml:"module-voltage-low-warn-threshold"`
LaserBiasCurrentHighAlarmThreshold opticsText `xml:"laser-bias-current-high-alarm-threshold"`
LaserBiasCurrentLowAlarmThreshold opticsText `xml:"laser-bias-current-low-alarm-threshold"`
LaserBiasCurrentHighWarnThreshold opticsText `xml:"laser-bias-current-high-warn-threshold"`
LaserBiasCurrentLowWarnThreshold opticsText `xml:"laser-bias-current-low-warn-threshold"`
LaserTxPowerHighAlarmThreshold opticsText `xml:"laser-tx-power-high-alarm-threshold"`
LaserTxPowerHighAlarmThresholdDbm opticsText `xml:"laser-tx-power-high-alarm-threshold-dbm"`
LaserTxPowerLowAlarmThreshold opticsText `xml:"laser-tx-power-low-alarm-threshold"`
LaserTxPowerLowAlarmThresholdDbm opticsText `xml:"laser-tx-power-low-alarm-threshold-dbm"`
LaserTxPowerHighWarnThreshold opticsText `xml:"laser-tx-power-high-warn-threshold"`
LaserTxPowerHighWarnThresholdDbm opticsText `xml:"laser-tx-power-high-warn-threshold-dbm"`
LaserTxPowerLowWarnThreshold opticsText `xml:"laser-tx-power-low-warn-threshold"`
LaserTxPowerLowWarnThresholdDbm opticsText `xml:"laser-tx-power-low-warn-threshold-dbm"`
LaserRxPowerHighAlarmThreshold opticsText `xml:"laser-rx-power-high-alarm-threshold"`
LaserRxPowerHighAlarmThresholdDbm opticsText `xml:"laser-rx-power-high-alarm-threshold-dbm"`
LaserRxPowerLowAlarmThreshold opticsText `xml:"laser-rx-power-low-alarm-threshold"`
LaserRxPowerLowAlarmThresholdDbm opticsText `xml:"laser-rx-power-low-alarm-threshold-dbm"`
LaserRxPowerHighWarnThreshold opticsText `xml:"laser-rx-power-high-warn-threshold"`
LaserRxPowerHighWarnThresholdDbm opticsText `xml:"laser-rx-power-high-warn-threshold-dbm"`
LaserRxPowerLowWarnThreshold opticsText `xml:"laser-rx-power-low-warn-threshold"`
LaserRxPowerLowWarnThresholdDbm opticsText `xml:"laser-rx-power-low-warn-threshold-dbm"`
OpticsDiagLanes []OpticsDiagLanes `xml:"optics-diagnostics-lane-values"`
NonChannelizedLaserBiasCurrent opticsText `xml:"laser-bias-current"`
NonChannelizedLaserOutputPower opticsText `xml:"laser-output-power"`
NonChannelizedLaserOutputPowerDbm opticsText `xml:"laser-output-power-dbm"`
NonChannelizedRxSignalAvgOpticalPower opticsText `xml:"rx-signal-avg-optical-power"`
NonChannelizedRxSignalAvgOpticalPowerDbm opticsText `xml:"rx-signal-avg-optical-power-dbm"`
}
type PowerCollector ¶
type PowerCollector struct {
// contains filtered or unexported fields
}
PowerCollector collects power metrics, implemented as per the Collector interface.
func NewPowerCollector ¶
func NewPowerCollector(logger log.Logger) *PowerCollector
NewPowerCollector returns a new PowerCollector .
func (*PowerCollector) Get ¶ added in v0.1.6
func (c *PowerCollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.
type RECollector ¶
type RECollector struct {
// contains filtered or unexported fields
}
RECollector collects route engine metrics, implemented as per the Collector interface.
func NewRECollector ¶
func NewRECollector(logger log.Logger) *RECollector
NewRECollector returns a new RECollector.
func (*RECollector) Get ¶ added in v0.1.6
func (c *RECollector) Get(ch chan<- prometheus.Metric, conf Config) ([]error, float64)
Get metrics and send to the Prometheus.Metric channel.