|
@@ -312,7 +312,7 @@ func nginxLogCapture(logfile, format string) {
|
|
CreatedAt: timeStamp.Unix(),
|
|
CreatedAt: timeStamp.Unix(),
|
|
Url: reqData[2],
|
|
Url: reqData[2],
|
|
Method: reqData[1],
|
|
Method: reqData[1],
|
|
- Host: "[not available]",
|
|
|
|
|
|
+ Host: host,
|
|
Protocol: reqData[3],
|
|
Protocol: reqData[3],
|
|
}
|
|
}
|
|
|
|
|
|
@@ -381,7 +381,11 @@ func apacheLogCapture(logfile string) {
|
|
vhostAndPort := strings.Split(logEntry.VirtualHost, ":")
|
|
vhostAndPort := strings.Split(logEntry.VirtualHost, ":")
|
|
virtualHost = vhostAndPort[0]
|
|
virtualHost = vhostAndPort[0]
|
|
} else {
|
|
} else {
|
|
- vhost = "[not available]"
|
|
|
|
|
|
+ if config.HostName != "" {
|
|
|
|
+ vhost = config.HostName
|
|
|
|
+ } else {
|
|
|
|
+ vhost = "[not available]"
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
request := data.Request{
|
|
request := data.Request{
|