add additional source data for issue #414
This commit is contained in:
parent
d51fb68ccd
commit
6ee728cba6
|
|
@ -15,23 +15,26 @@ func (r *Report) IDS(event *unifi.IDS, logs *Logs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Counts[typeIDS]++ // increase counter and append new log line.
|
r.Counts[typeIDS]++ // increase counter and append new log line.
|
||||||
|
|
||||||
logs.Streams = append(logs.Streams, LogStream{
|
logs.Streams = append(logs.Streams, LogStream{
|
||||||
Entries: [][]string{{strconv.FormatInt(event.Datetime.UnixNano(), 10), event.Msg}},
|
Entries: [][]string{{strconv.FormatInt(event.Datetime.UnixNano(), 10), event.Msg}},
|
||||||
Labels: CleanLabels(map[string]string{
|
Labels: CleanLabels(map[string]string{
|
||||||
"application": "unifi_ids",
|
"application": "unifi_ids",
|
||||||
"source": event.SourceName,
|
"source": event.SourceName,
|
||||||
"site_name": event.SiteName,
|
"site_name": event.SiteName,
|
||||||
"subsystem": event.Subsystem,
|
"subsystem": event.Subsystem,
|
||||||
"category": event.Catname,
|
"category": event.Catname,
|
||||||
"event_type": event.EventType,
|
"event_type": event.EventType,
|
||||||
"key": event.Key,
|
"key": event.Key,
|
||||||
"app_protocol": event.AppProto,
|
"app_protocol": event.AppProto,
|
||||||
"protocol": event.Proto,
|
"protocol": event.Proto,
|
||||||
"interface": event.InIface,
|
"interface": event.InIface,
|
||||||
"src_country": event.SrcIPCountry,
|
"src_country": event.SrcIPCountry,
|
||||||
"usgip": event.USGIP,
|
"src_city": event.SourceIPGeo.City,
|
||||||
"action": event.InnerAlertAction,
|
"src_continent": event.SourceIPGeo.ContinentCode,
|
||||||
|
"src_country_code": event.SourceIPGeo.CountryCode,
|
||||||
|
"usgip": event.USGIP,
|
||||||
|
"action": event.InnerAlertAction,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue