Documentation ¶
Overview ¶
Package socket captures active sockets and the processes that own them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ReverseLookup *ReverseLookupConfig `config:"socket.reverse_lookup"`
}
Config is the configuration specific to the socket MetricSet.
type MetricSet ¶
type MetricSet struct { mb.BaseMetricSet // contains filtered or unexported fields }
type ReverseLookupCache ¶
type ReverseLookupCache struct {
// contains filtered or unexported fields
}
ReverseLookupCache is a cache for storing and retrieving the results of reverse DNS queries. It caches the results of queries regardless of their outcome (success or failure). The result is cached for the amount of time specified by parameters and not based on the TTL from the PTR record.
func NewReverseLookupCache ¶
func NewReverseLookupCache(successTTL, failureTTL time.Duration) *ReverseLookupCache
NewReverseLookupCache returns a new cache.
func (*ReverseLookupCache) Cleanup ¶
func (c *ReverseLookupCache) Cleanup()
Cleanup removes expired entries from the cache.
type ReverseLookupConfig ¶
type ReverseLookupConfig struct { Enabled *bool `config:"enabled"` SuccessTTL time.Duration `config:"success_ttl"` FailureTTL time.Duration `config:"failure_ttl"` }
ReverseLookupConfig contains the configuration that controls the reverse DNS lookup behavior.
func (*ReverseLookupConfig) IsEnabled ¶
func (c *ReverseLookupConfig) IsEnabled() bool
IsEnabled returns true if reverse_lookup is defined and 'enabled' is either not set or set to true.