Documentation ¶
Overview ¶
Example config: jsonlog { enable_superapi influxdb http://192.168.0.193:8086/ test dns_data base64keyhere== # pgdb postgresql://crate@192.168.0.193:5432/doc }
Index ¶
- Constants
- Variables
- type DNSEvent
- type DeviceEntry
- type EventData
- type JsonLog
- func (plugin *JsonLog) IPQueryHistory(w http.ResponseWriter, r *http.Request)
- func (plugin *JsonLog) Name() string
- func (plugin *JsonLog) PushEvent(event *DNSEvent)
- func (plugin *JsonLog) ServeDNS(ctx context.Context, rw dns.ResponseWriter, r *dns.Msg) (c int, err error)
- func (plugin *JsonLog) String() string
- type SPRLogConfig
Constants ¶
View Source
const (
CLIENT_MEMORY_LOG_COUNT int = 1024
)
Variables ¶
View Source
var CONFIG_PATH = TEST_PREFIX + "/state/dns/log_rules.json"
View Source
var Configmtx sync.Mutex
View Source
var EventMemory = make(map[string]*[CLIENT_MEMORY_LOG_COUNT]EventData)
View Source
var EventMemoryIdx = make(map[string]int)
View Source
var EventMemoryMtx sync.Mutex
View Source
var TEST_PREFIX = os.Getenv("TEST_PREFIX")
View Source
var UNIX_PLUGIN_LISTENER = TEST_PREFIX + "/state/dns/dns_log_plugin"
Functions ¶
This section is empty.
Types ¶
type DNSEvent ¶
type DNSEvent struct { dns.ResponseWriter // contains filtered or unexported fields }
type DeviceEntry ¶
type DeviceEntry struct { Name string MAC string WGPubKey string VLANTag string RecentIP string Policies []string Groups []string DeviceTags []string DHCPFirstTime string DHCPLastTime string DeviceExpiration int64 DeleteExpiration bool DeviceDisabled bool //tbd deprecate this in favor of only using the policy name. }
type JsonLog ¶
type JsonLog struct { SQL *pgxpool.Pool IFDB influxdb2.Client IFDB_org string IFDB_bucket string Next plugin.Handler // contains filtered or unexported fields }
JsonLog is the plugin.
func (*JsonLog) IPQueryHistory ¶
func (plugin *JsonLog) IPQueryHistory(w http.ResponseWriter, r *http.Request)
type SPRLogConfig ¶
Click to show internal directories.
Click to hide internal directories.