I've been searching the internet for the last 6 hours trying to find a guide, tutorial, hint or any kind of help to upload the content of some .xml files into ES using logstash.
For the life of me I haven't been able to do so or find anything to shed some light on the matter, so I come here... asking for anything, a link to some forgotten "how to for dummies guide", some help... provided that my code is at all "right"... anything really.
I have these XML files called log.xml, it looks something like this:
It is saved inisde: c:\Users\my.user\Desktop\TestLogsFolder\
I run logstash using the command (in cmd)
logstash -f pathtoconfigfile/configfile.conf
The configuration file (configfile.conf) has the following text inside it:
input {
file {
type => "file"
path => ["c:\Users\george.hosu\Desktop\TestLogsFolder\log.xml"]
start_position => beginning
}
}
filter {
xml {
source => "message"
target => "message_parsed"
add_tag => ["xml_parsed"]
remove_namespaces => true
xpath => [
"/testsuites/testsuite/testcase[1]", "testcase1names"
]
}
}
output {
stdout { codec => "rubydebug"}
elasticsearch {
hosts => ["http://localhost:9200"]
manage_template => false
index => "QAlogs-dc-%{+YYYY.MM.dd.hh.mm}"
#protocol => "http"
document_type => "QAlogs"
#document_id => "%{[id]}"
}
}
I do this while ES is running, logstash give me the message "main pipline started" and then... nothing, the ES database doesn't recieve any new data/indexes... etc.
I've added data to said databse with stdin{} and it worked just fine.
If anyone could help me figure how the hell should I go about this I would be beyond greatfull.