I have the following logstash conf file:
input {
file
{
path => "C:\Dashboard\Elmah\*.xml"
start_position => "beginning"
type => "error"
codec => multiline
{
pattern => "^<\?error .*\>"
negate => true
what => "previous"
}
sincedb_path =>"C:\Dashboard\Elmah"
}
}
filter
{
xml
{
source => "error"
xpath =>
[
"/error/@errorId", "ErrorId",
"/error/@type", "Type",
"/error/@message", "Message",
"/error/@time", "Time",
"/error/@user", "User"
]
store_xml => true
}
}
output
{
elasticsearch
{
action => "index"
host => "localhost"
index => "stock"
workers => 1
}
stdout
{
codec => rubydebug
}
}
When I run bin/logstash -f agent.conf I do not get an error but no data gets inserted into Elasticsearch. An example of the file is: https://www.dropbox.com/s/6oni2zhorsdtz6p/error-2015-06-26203423Z-3026bd43-07d6-44d6-a6cf-6d27b28a607e.xml?dl=0
How do I get Logstash to read in a collection of external xml files?
LogStash Output:
io/console not supported; tty will not be manipulated
Jul 11, 2015 12:34:09 AM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-AGOEL2-LT-6584-13462] version[1.5.1], pid[6584], build[5e38401/2
015-04-09T13:41:35Z]
Jul 11, 2015 12:34:09 AM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-AGOEL2-LT-6584-13462] initializing ...
Jul 11, 2015 12:34:09 AM org.elasticsearch.plugins.PluginsService <init>
INFO: [logstash-AGOEL2-LT-6584-13462] loaded [], sites []
Jul 11, 2015 12:34:11 AM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-AGOEL2-LT-6584-13462] initialized
Jul 11, 2015 12:34:11 AM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-AGOEL2-LT-6584-13462] starting ...
Jul 11, 2015 12:34:11 AM org.elasticsearch.transport.TransportService doStart
INFO: [logstash-AGOEL2-LT-6584-13462] bound_address {inet[/0:0:0:0:0:0:0:0:9301]
}, publish_address {inet[/192.168.1.67:9301]}
Jul 11, 2015 12:34:11 AM org.elasticsearch.discovery.DiscoveryService doStart
INFO: [logstash-AGOEL2-LT-6584-13462] elasticsearch/Xg4w5J-yRmiy1aoisMheZw
Jul 11, 2015 12:34:15 AM org.elasticsearch.cluster.service.InternalClusterServic
e$UpdateTask run
INFO: [logstash-AGOEL2-LT-6584-13462] detected_master [Achilles][wM8JEr9GSg67qfN
d-8lvuQ][AGOEL2-LT][inet[/192.168.1.67:9300]], added {[Achilles][wM8JEr9GSg67qfN
d-8lvuQ][AGOEL2-LT][inet[/192.168.1.67:9300]],}, reason: zen-disco-receive(from
master [[Achilles][wM8JEr9GSg67qfNd-8lvuQ][AGOEL2-LT][inet[/192.168.1.67:9300]]]
)
Jul 11, 2015 12:34:16 AM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-AGOEL2-LT-6584-13462] started
Logstash startup completed
ElasticSearch Output:
[2015-07-13 18:30:21,656][WARN ][bootstrap ] jvm uses the client
vm, make sure to run `java` with the server vm for best performance by adding `-
server` to the command line
[2015-07-13 18:30:22,379][INFO ][node ] [Battering Ram] vers
ion[1.6.0], pid[4228], build[cdd3ac4/2015-06-09T13:36:34Z]
[2015-07-13 18:30:22,379][INFO ][node ] [Battering Ram] init
ializing ...
[2015-07-13 18:30:22,441][INFO ][plugins ] [Battering Ram] load
ed [], sites [head]
[2015-07-13 18:30:22,754][INFO ][env ] [Battering Ram] usin
g [1] data paths, mounts [[Default (C:)]], net usable_space [73.6gb], net total_
space [297.7gb], types [NTFS]
[2015-07-13 18:30:32,937][INFO ][node ] [Battering Ram] init
ialized
[2015-07-13 18:30:32,938][INFO ][node ] [Battering Ram] star
ting ...
[2015-07-13 18:30:34,146][INFO ][transport ] [Battering Ram] boun
d_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.1.67:930
0]}
[2015-07-13 18:30:35,578][INFO ][discovery ] [Battering Ram] elas
ticsearch/zQlVTprlR2C23Kmi4yHXsQ
[2015-07-13 18:30:39,449][INFO ][cluster.service ] [Battering Ram] new_
master [Battering Ram][zQlVTprlR2C23Kmi4yHXsQ][AGOEL2-LT][inet[/192.168.1.67:930
0]], reason: zen-disco-join (elected_as_master)
[2015-07-13 18:30:39,593][INFO ][gateway ] [Battering Ram] reco
vered [0] indices into cluster_state
[2015-07-13 18:30:40,213][INFO ][http ] [Battering Ram] boun
d_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.1.67:920
0]}
[2015-07-13 18:30:40,214][INFO ][node ] [Battering Ram] star
ted
[2015-07-13 18:32:28,782][INFO ][cluster.service ] [Battering Ram] adde
d {[logstash-AGOEL2-LT-7384-13462][kWlvJTERTqWRxojNZsrTRQ][AGOEL2-LT][inet[/192.
168.1.67:9301]]{client=true, data=false},}, reason: zen-disco-receive(join from
node[[logstash-AGOEL2-LT-7384-13462][kWlvJTERTqWRxojNZsrTRQ][AGOEL2-LT][inet[/19
2.168.1.67:9301]]{client=true, data=false}])