Add scanned_at into syslog report (#641)

This commit is contained in:
Teppei Fukuda
2018-05-11 11:17:45 +09:00
committed by Kota Kanbe
parent 7cebaf8a76
commit cb1aec4fc0
2 changed files with 7 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ func (w SyslogWriter) encodeSyslog(result models.ScanResult) (messages []string)
for cveID, vinfo := range result.ScannedCves {
var kvPairs []string
kvPairs = append(kvPairs, fmt.Sprintf(`scanned_at="%s"`, result.ScannedAt))
kvPairs = append(kvPairs, fmt.Sprintf(`server_name="%s"`, result.ServerName))
kvPairs = append(kvPairs, fmt.Sprintf(`os_family="%s"`, result.Family))
kvPairs = append(kvPairs, fmt.Sprintf(`os_release="%s"`, result.Release))