Documentation ¶
Index ¶
- Variables
- func GetFakeDns() ([]byte, error)
- func GetFakeDnstap(dnsquery []byte) *dnstap.Dnstap
- type Counters
- type DnsProcessor
- func (d *DnsProcessor) GetChannel() chan dnsutils.DnsMessage
- func (d *DnsProcessor) GetChannelList() []chan dnsutils.DnsMessage
- func (c *DnsProcessor) LogError(msg string, v ...interface{})
- func (c *DnsProcessor) LogInfo(msg string, v ...interface{})
- func (d *DnsProcessor) ReadConfig()
- func (d *DnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)
- func (d *DnsProcessor) Stop()
- type DnstapProcessor
- func (d *DnstapProcessor) GetChannel() chan []byte
- func (c *DnstapProcessor) LogError(msg string, v ...interface{})
- func (c *DnstapProcessor) LogInfo(msg string, v ...interface{})
- func (d *DnstapProcessor) ReadConfig()
- func (d *DnstapProcessor) Run(sendTo []chan dnsutils.DnsMessage)
- func (d *DnstapProcessor) Stop()
- type FilteringProcessor
- type GeoIpProcessor
- func (p *GeoIpProcessor) Close()
- func (p *GeoIpProcessor) IsEnabled() bool
- func (p *GeoIpProcessor) LogError(msg string, v ...interface{})
- func (p *GeoIpProcessor) LogInfo(msg string, v ...interface{})
- func (p *GeoIpProcessor) Lookup(ip string) (GeoRecord, error)
- func (p *GeoIpProcessor) Open() (err error)
- type GeoRecord
- type IpAnonymizerSubproc
- type MapTTL
- type MaxminddbRecord
- type QnameReducer
- type StatsPerStream
- func (c *StatsPerStream) Compute()
- func (c *StatsPerStream) GetAS() (ret map[string]string)
- func (c *StatsPerStream) GetClients() (ret map[string]int)
- func (c *StatsPerStream) GetCounters() (ret Counters)
- func (c *StatsPerStream) GetDomains() (ret map[string]int)
- func (c *StatsPerStream) GetHitAS() (ret map[string]int)
- func (c *StatsPerStream) GetTopAS() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopClients() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopFirstLevelDomains() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopIpProto() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopNxdomains() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopOperations() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopQnames() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopRcodes() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopRrtypes() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopSlowdomains() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopSuspiciousClients() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopSuspiciousdomains() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTopTransports() (ret []topmap.TopMapItem)
- func (c *StatsPerStream) GetTotalAS() (ret int)
- func (c *StatsPerStream) GetTotalClients() (ret int)
- func (c *StatsPerStream) GetTotalDomains() (ret int)
- func (c *StatsPerStream) GetTotalFirstLevelDomains() (ret int)
- func (c *StatsPerStream) GetTotalNxdomains() (ret int)
- func (c *StatsPerStream) GetTotalSlowdomains() (ret int)
- func (c *StatsPerStream) GetTotalSuspiciousClients() (ret int)
- func (c *StatsPerStream) GetTotalSuspiciousdomains() (ret int)
- func (c *StatsPerStream) ReadConfig()
- func (c *StatsPerStream) Record(dm dnsutils.DnsMessage)
- func (c *StatsPerStream) Reset()
- type StatsStreams
- func (c *StatsStreams) Compute()
- func (c *StatsStreams) GetAS(identity string) (ret map[string]string)
- func (c *StatsStreams) GetClients(identity string) (ret map[string]int)
- func (c *StatsStreams) GetCounters(identity string) (ret Counters)
- func (c *StatsStreams) GetDomains(identity string) (ret map[string]int)
- func (c *StatsStreams) GetHitAS(identity string) (ret map[string]int)
- func (s *StatsStreams) GetMetrics(w http.ResponseWriter, r *http.Request)
- func (c *StatsStreams) GetTopAS(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopClients(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopFirstLevelDomains(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopIpProto(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopNxdomains(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopOperations(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopQnames(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopRcodes(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopRrtypes(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopSlowdomains(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopSuspiciousClients(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopSuspiciousdomains(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTopTransports(identity string) (ret []topmap.TopMapItem)
- func (c *StatsStreams) GetTotalAS(identity string) (ret int)
- func (c *StatsStreams) GetTotalClients(identity string) (ret int)
- func (c *StatsStreams) GetTotalDomains(identity string) (ret int)
- func (c *StatsStreams) GetTotalFirstLevelDomains(identity string) (ret int)
- func (c *StatsStreams) GetTotalNxdomains(identity string) (ret int)
- func (c *StatsStreams) GetTotalSlowdomains(identity string) (ret int)
- func (c *StatsStreams) GetTotalSuspiciousClients(identity string) (ret int)
- func (c *StatsStreams) GetTotalSuspiciousdomains(identity string) (ret int)
- func (c *StatsStreams) Record(dm dnsutils.DnsMessage)
- func (c *StatsStreams) Reset(identity string)
- func (c *StatsStreams) Streams() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DnstapMessage = map[string]string{ "AUTH_QUERY": "AQ", "AUTH_RESPONSE": "AR", "RESOLVER_QUERY": "RQ", "RESOLVER_RESPONSE": "RR", "CLIENT_QUERY": "CQ", "CLIENT_RESPONSE": "CR", "FORWARDER_QUERY": "FQ", "FORWARDER_RESPONSE": "FR", "STUB_QUERY": "SQ", "STUB_RESPONSE": "SR", "TOOL_QUERY": "TQ", "TOOL_RESPONSE": "TR", "UPDATE_QUERY": "UQ", "UPDATE_RESPONSE": "UR", } DnsQr = map[string]string{ "QUERY": "Q", "REPLY": "R", } )
Functions ¶
func GetFakeDns ¶
func GetFakeDnstap ¶
func GetFakeDnstap(dnsquery []byte) *dnstap.Dnstap
Types ¶
type Counters ¶ added in v0.9.0
type Counters struct { Pps uint64 PpsMax uint64 Packets uint64 PacketsPrev uint64 PacketsMalformed uint64 Qps uint64 QpsMax uint64 Queries uint64 QueriesPrev uint64 Latency0_1 uint64 Latency1_10 uint64 Latency10_50 uint64 Latency50_100 uint64 Latency100_500 uint64 Latency500_1000 uint64 Latency1000_inf uint64 LatencyMax float64 LatencyMin float64 QnameLength0_10 int QnameLength10_20 int QnameLength20_40 int QnameLength40_60 int QnameLength60_100 int QnameLength100_Inf int QnameLengthMax int QnameLengthMin int QueryLength0_50 int QueryLength50_100 int QueryLength100_250 int QueryLength250_500 int QueryLength500_Inf int QueryLengthMax int QueryLengthMin int ReplyLength0_50 int ReplyLength50_100 int ReplyLength100_250 int ReplyLength250_500 int ReplyLength500_Inf int ReplyLengthMax int ReplyLengthMin int ReceivedBytesTotal int SentBytesTotal int Truncated int AuthoritativeAnswer int RecursionAvailable int AuthenticData int }
type DnsProcessor ¶
type DnsProcessor struct {
// contains filtered or unexported fields
}
func NewDnsProcessor ¶
func NewDnsProcessor(config *dnsutils.Config, logger *logger.Logger) DnsProcessor
func (*DnsProcessor) GetChannel ¶
func (d *DnsProcessor) GetChannel() chan dnsutils.DnsMessage
func (*DnsProcessor) GetChannelList ¶
func (d *DnsProcessor) GetChannelList() []chan dnsutils.DnsMessage
func (*DnsProcessor) LogError ¶
func (c *DnsProcessor) LogError(msg string, v ...interface{})
func (*DnsProcessor) LogInfo ¶
func (c *DnsProcessor) LogInfo(msg string, v ...interface{})
func (*DnsProcessor) ReadConfig ¶
func (d *DnsProcessor) ReadConfig()
func (*DnsProcessor) Run ¶
func (d *DnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)
func (*DnsProcessor) Stop ¶
func (d *DnsProcessor) Stop()
type DnstapProcessor ¶
type DnstapProcessor struct {
// contains filtered or unexported fields
}
func NewDnstapProcessor ¶
func NewDnstapProcessor(config *dnsutils.Config, logger *logger.Logger) DnstapProcessor
func (*DnstapProcessor) GetChannel ¶
func (d *DnstapProcessor) GetChannel() chan []byte
func (*DnstapProcessor) LogError ¶
func (c *DnstapProcessor) LogError(msg string, v ...interface{})
func (*DnstapProcessor) LogInfo ¶
func (c *DnstapProcessor) LogInfo(msg string, v ...interface{})
func (*DnstapProcessor) ReadConfig ¶
func (d *DnstapProcessor) ReadConfig()
func (*DnstapProcessor) Run ¶
func (d *DnstapProcessor) Run(sendTo []chan dnsutils.DnsMessage)
func (*DnstapProcessor) Stop ¶
func (d *DnstapProcessor) Stop()
type FilteringProcessor ¶
type FilteringProcessor struct {
// contains filtered or unexported fields
}
func NewFilteringProcessor ¶
func NewFilteringProcessor(config *dnsutils.Config, logger *logger.Logger) FilteringProcessor
func (*FilteringProcessor) CheckIfDrop ¶ added in v0.14.0
func (p *FilteringProcessor) CheckIfDrop(dm *dnsutils.DnsMessage) bool
func (*FilteringProcessor) LoadDomains ¶ added in v0.14.0
func (p *FilteringProcessor) LoadDomains()
func (*FilteringProcessor) LogError ¶ added in v0.14.0
func (p *FilteringProcessor) LogError(msg string, v ...interface{})
func (*FilteringProcessor) LogInfo ¶ added in v0.14.0
func (p *FilteringProcessor) LogInfo(msg string, v ...interface{})
type GeoIpProcessor ¶
type GeoIpProcessor struct {
// contains filtered or unexported fields
}
func NewDnsGeoIpProcessor ¶
func NewDnsGeoIpProcessor(config *dnsutils.Config, logger *logger.Logger) GeoIpProcessor
func (*GeoIpProcessor) Close ¶
func (p *GeoIpProcessor) Close()
func (*GeoIpProcessor) IsEnabled ¶
func (p *GeoIpProcessor) IsEnabled() bool
func (*GeoIpProcessor) LogError ¶ added in v0.14.0
func (p *GeoIpProcessor) LogError(msg string, v ...interface{})
func (*GeoIpProcessor) LogInfo ¶ added in v0.14.0
func (p *GeoIpProcessor) LogInfo(msg string, v ...interface{})
func (*GeoIpProcessor) Open ¶
func (p *GeoIpProcessor) Open() (err error)
type IpAnonymizerSubproc ¶
type IpAnonymizerSubproc struct {
// contains filtered or unexported fields
}
func NewIpAnonymizerSubprocessor ¶
func NewIpAnonymizerSubprocessor(config *dnsutils.Config) IpAnonymizerSubproc
func (*IpAnonymizerSubproc) Anonymize ¶
func (s *IpAnonymizerSubproc) Anonymize(ip string) string
func (*IpAnonymizerSubproc) IsEnabled ¶
func (s *IpAnonymizerSubproc) IsEnabled() bool
func (*IpAnonymizerSubproc) ReadConfig ¶
func (s *IpAnonymizerSubproc) ReadConfig()
type MapTTL ¶
func NewCacheDnsProcessor ¶
type MaxminddbRecord ¶ added in v0.14.0
type MaxminddbRecord struct { Continent struct { Code string `maxminddb:"code"` } `maxminddb:"continent"` Country struct { ISOCode string `maxminddb:"iso_code"` } `maxminddb:"country"` City struct { Names map[string]string `maxminddb:"names"` } `maxminddb:"city"` AutonomousSystemNumber int `maxminddb:"autonomous_system_number"` AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"` }
type QnameReducer ¶ added in v0.14.0
type QnameReducer struct {
// contains filtered or unexported fields
}
func NewQnameReducerSubprocessor ¶ added in v0.14.0
func NewQnameReducerSubprocessor(config *dnsutils.Config) QnameReducer
func (*QnameReducer) IsEnabled ¶ added in v0.14.0
func (s *QnameReducer) IsEnabled() bool
func (*QnameReducer) Minimaze ¶ added in v0.14.0
func (s *QnameReducer) Minimaze(qname string) string
func (*QnameReducer) ReadConfig ¶ added in v0.14.0
func (s *QnameReducer) ReadConfig()
type StatsPerStream ¶ added in v0.9.0
type StatsPerStream struct { MapHitAS map[string]int MapAS map[string]string ListTopAS *topmap.TopMap sync.RWMutex // contains filtered or unexported fields }
func NewStatsPerStream ¶ added in v0.9.0
func NewStatsPerStream(config *dnsutils.Config) *StatsPerStream
func (*StatsPerStream) Compute ¶ added in v0.9.0
func (c *StatsPerStream) Compute()
func (*StatsPerStream) GetAS ¶ added in v0.14.0
func (c *StatsPerStream) GetAS() (ret map[string]string)
func (*StatsPerStream) GetClients ¶ added in v0.13.0
func (c *StatsPerStream) GetClients() (ret map[string]int)
func (*StatsPerStream) GetCounters ¶ added in v0.9.0
func (c *StatsPerStream) GetCounters() (ret Counters)
func (*StatsPerStream) GetDomains ¶ added in v0.13.0
func (c *StatsPerStream) GetDomains() (ret map[string]int)
func (*StatsPerStream) GetHitAS ¶ added in v0.14.0
func (c *StatsPerStream) GetHitAS() (ret map[string]int)
func (*StatsPerStream) GetTopAS ¶ added in v0.14.0
func (c *StatsPerStream) GetTopAS() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopClients ¶ added in v0.9.0
func (c *StatsPerStream) GetTopClients() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopFirstLevelDomains ¶ added in v0.13.0
func (c *StatsPerStream) GetTopFirstLevelDomains() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopIpProto ¶ added in v0.9.0
func (c *StatsPerStream) GetTopIpProto() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopNxdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTopNxdomains() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopOperations ¶ added in v0.9.0
func (c *StatsPerStream) GetTopOperations() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopQnames ¶ added in v0.9.0
func (c *StatsPerStream) GetTopQnames() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopRcodes ¶ added in v0.9.0
func (c *StatsPerStream) GetTopRcodes() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopRrtypes ¶ added in v0.9.0
func (c *StatsPerStream) GetTopRrtypes() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopSlowdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTopSlowdomains() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopSuspiciousClients ¶ added in v0.13.0
func (c *StatsPerStream) GetTopSuspiciousClients() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopSuspiciousdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTopSuspiciousdomains() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTopTransports ¶ added in v0.9.0
func (c *StatsPerStream) GetTopTransports() (ret []topmap.TopMapItem)
func (*StatsPerStream) GetTotalAS ¶ added in v0.14.0
func (c *StatsPerStream) GetTotalAS() (ret int)
func (*StatsPerStream) GetTotalClients ¶ added in v0.9.0
func (c *StatsPerStream) GetTotalClients() (ret int)
func (*StatsPerStream) GetTotalDomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTotalDomains() (ret int)
func (*StatsPerStream) GetTotalFirstLevelDomains ¶ added in v0.13.0
func (c *StatsPerStream) GetTotalFirstLevelDomains() (ret int)
func (*StatsPerStream) GetTotalNxdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTotalNxdomains() (ret int)
func (*StatsPerStream) GetTotalSlowdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTotalSlowdomains() (ret int)
func (*StatsPerStream) GetTotalSuspiciousClients ¶ added in v0.13.0
func (c *StatsPerStream) GetTotalSuspiciousClients() (ret int)
func (*StatsPerStream) GetTotalSuspiciousdomains ¶ added in v0.9.0
func (c *StatsPerStream) GetTotalSuspiciousdomains() (ret int)
func (*StatsPerStream) ReadConfig ¶ added in v0.9.0
func (c *StatsPerStream) ReadConfig()
func (*StatsPerStream) Record ¶ added in v0.9.0
func (c *StatsPerStream) Record(dm dnsutils.DnsMessage)
func (*StatsPerStream) Reset ¶ added in v0.13.0
func (c *StatsPerStream) Reset()
type StatsStreams ¶ added in v0.9.0
func NewStreamsStats ¶ added in v0.9.0
func NewStreamsStats(config *dnsutils.Config, version string) *StatsStreams
func (*StatsStreams) Compute ¶ added in v0.9.0
func (c *StatsStreams) Compute()
func (*StatsStreams) GetAS ¶ added in v0.14.0
func (c *StatsStreams) GetAS(identity string) (ret map[string]string)
func (*StatsStreams) GetClients ¶ added in v0.13.0
func (c *StatsStreams) GetClients(identity string) (ret map[string]int)
func (*StatsStreams) GetCounters ¶ added in v0.9.0
func (c *StatsStreams) GetCounters(identity string) (ret Counters)
func (*StatsStreams) GetDomains ¶ added in v0.13.0
func (c *StatsStreams) GetDomains(identity string) (ret map[string]int)
func (*StatsStreams) GetHitAS ¶ added in v0.14.0
func (c *StatsStreams) GetHitAS(identity string) (ret map[string]int)
func (*StatsStreams) GetMetrics ¶ added in v0.14.0
func (s *StatsStreams) GetMetrics(w http.ResponseWriter, r *http.Request)
func (*StatsStreams) GetTopAS ¶ added in v0.14.0
func (c *StatsStreams) GetTopAS(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopClients ¶ added in v0.9.0
func (c *StatsStreams) GetTopClients(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopFirstLevelDomains ¶ added in v0.13.0
func (c *StatsStreams) GetTopFirstLevelDomains(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopIpProto ¶ added in v0.9.0
func (c *StatsStreams) GetTopIpProto(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopNxdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTopNxdomains(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopOperations ¶ added in v0.9.0
func (c *StatsStreams) GetTopOperations(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopQnames ¶ added in v0.9.0
func (c *StatsStreams) GetTopQnames(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopRcodes ¶ added in v0.9.0
func (c *StatsStreams) GetTopRcodes(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopRrtypes ¶ added in v0.9.0
func (c *StatsStreams) GetTopRrtypes(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopSlowdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTopSlowdomains(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopSuspiciousClients ¶ added in v0.13.0
func (c *StatsStreams) GetTopSuspiciousClients(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopSuspiciousdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTopSuspiciousdomains(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTopTransports ¶ added in v0.9.0
func (c *StatsStreams) GetTopTransports(identity string) (ret []topmap.TopMapItem)
func (*StatsStreams) GetTotalAS ¶ added in v0.14.0
func (c *StatsStreams) GetTotalAS(identity string) (ret int)
func (*StatsStreams) GetTotalClients ¶ added in v0.9.0
func (c *StatsStreams) GetTotalClients(identity string) (ret int)
func (*StatsStreams) GetTotalDomains ¶ added in v0.9.0
func (c *StatsStreams) GetTotalDomains(identity string) (ret int)
func (*StatsStreams) GetTotalFirstLevelDomains ¶ added in v0.13.0
func (c *StatsStreams) GetTotalFirstLevelDomains(identity string) (ret int)
func (*StatsStreams) GetTotalNxdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTotalNxdomains(identity string) (ret int)
func (*StatsStreams) GetTotalSlowdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTotalSlowdomains(identity string) (ret int)
func (*StatsStreams) GetTotalSuspiciousClients ¶ added in v0.13.0
func (c *StatsStreams) GetTotalSuspiciousClients(identity string) (ret int)
func (*StatsStreams) GetTotalSuspiciousdomains ¶ added in v0.9.0
func (c *StatsStreams) GetTotalSuspiciousdomains(identity string) (ret int)
func (*StatsStreams) Record ¶ added in v0.9.0
func (c *StatsStreams) Record(dm dnsutils.DnsMessage)
func (*StatsStreams) Reset ¶ added in v0.13.0
func (c *StatsStreams) Reset(identity string)
func (*StatsStreams) Streams ¶ added in v0.9.0
func (c *StatsStreams) Streams() []string
Click to show internal directories.
Click to hide internal directories.