Logstash configuration:
input {
tcp {
port => 5045
type => 'eventlog'
codec =>"json"
}
}
filter {
if [type]== 'eventlog' {
hipchat {
room_id => '*****'
token => '****'
}
elasticsearch {
hosts => ['172.30.0.206:9200']
}
}
}
In kibana, it looks like
{
"_index": "logstash-2016.06.14",
"_type": "eventlog",
"_id": "AVVNbiXCoy4-TtrOUrmi",
"_score": null,
"_source": {
"EventTime": "2016-06-14 11:11:47",
"Hostname": "xx.xx.x",
"Keywords": 2305843009213694000,
"EventType": "ERROR",
"SeverityValue": 4,
"Severity": "ERROR",
"EventID": 216,
"SourceName": "Microsoft-Windows-ServerManager-MultiMachine",
"ProviderGuid": "{D8D37081-10BD-4A89-A971-1CDA6899BDB3}",
"Version": 0,
"Task": 17,
"OpcodeValue": 0,
"RecordNumber": 3369760,
"ProcessID": 4988,
"ThreadID": 6944,
"Channel": "Microsoft-Windows-ServerManager-MultiMachine/Operational",
"Domain": "ONTASHINDIA",
"AccountName": "Administrator",
"UserID": "Administrator",
"AccountType": "User",
"Message": "Invoke method error. Server: localhost, Namespace: root\\microsoft\\windows\\servermanager, Class: MSFT_ServerManagerTasks, Method: GetCounterSamplesInTimeRange, Error: A general error occurred that is not covered by a more specific error code.",
"Category": "Node access.",
"Opcode": "Info",
"serverName": "localhost",
"namespaceName": "root\\microsoft\\windows\\servermanager",
"wmiClassName": "MSFT_ServerManagerTasks",
"methodName": "GetCounterSamplesInTimeRange",
"protocol": "DCOM",
"error": "A general error occurred that is not covered by a more specific error code.",
"EventReceivedTime": "2016-06-14 11:11:49",
"SourceModuleName": "eventlog",
"SourceModuleType": "im_msvistalog",
"@version": "1",
"@timestamp": "2016-06-14T05:41:50.634Z",
"host": "x.x.x.x",
"port": 60831,
"type": "eventlog",
"tags": [
"_grokparsefailure"
]
},
"fields": {
"@timestamp": [
1465882910634
]
},
"sort": [
1465882910634
]
}
I am using nxlog in windows server to ship logs to logstash.
Version
Elasticsearch 2.2.x, Logstash 2.2.x, and Kibana 4.4.x.