Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCollector ¶
NewCollector returns a new instace of interface.Collector.
func ParsePool ¶
func ParsePool(sshCtx *connector.SSHCommandContext, poolIn *Pool, poolOut chan *Pool)
ParsePool parses the outputs of a `show ip nat pool name "..."` and returns these pools
func ParseStatistics ¶
func ParseStatistics(sshCtx *connector.SSHCommandContext, pools chan *Pool, statistics chan *Statistics)
ParseStatistics parses the cli outputs of `show ip nat statistics`
Types ¶
type Collector ¶
type Collector struct { }
Collector gathers counters for network address translation.
func (*Collector) Collect ¶
func (c *Collector) Collect(ctx *collector.CollectContext)
Collect implements the collector.Collector interface's Collect function
func (*Collector) Describe ¶
func (*Collector) Describe(ch chan<- *prometheus.Desc)
Describe implements the collector.Collector interface's Describe function
type Pool ¶
type Pool struct { Name string ID string Type string Refcount float64 Misses float64 Netmask string StartIP string EndIP string AddressesTotal float64 AddressesAvail float64 AddressesAssigned float64 // Low ports are less than 1024. High ports are greater than or equal to 1024. UDPLowPortsAvail float64 UDPLowPortsAssigned float64 TCPLowPortsAvail float64 TCPLowPortsAssigned float64 UDPHighPortsAvail float64 UDPHighPortsAssigned float64 TCPHighPortsAvail float64 TCPHighPortsAssigned float64 }
Pool represents one NAT pool returned by `show ip nat pool name "..."`
type Statistics ¶
type Statistics struct { ActiveTranslations float64 ActiveStaticTranslations float64 ActiveDynamicTranslations float64 OutsideInterfaces []string InsideInterfaces []string Hits float64 Misses float64 ExpiredTranslations float64 InToOutDrops float64 OutToInDrops float64 LimitMaxAllowed float64 LimitUsed float64 LimitMissed float64 PoolStatsDrop float64 MappingStatsDrop float64 PortBlockAllocFail float64 IPAliasAddFail float64 LimitEntryAddFail float64 }
Statistics contains the information returned by a `show ip nat statistics`
func NewStatistics ¶
func NewStatistics() *Statistics
NewStatistics returns a new Statistics Instance and initializes some fields
Click to show internal directories.
Click to hide internal directories.