Hi ,
i am trying to create an index when the condition is if [fs.mount_point] == "C:" and [fs.used] == "87264018432"
i am trying to push data from topbeat to logstash. and then i am trying to give the if condition. But i am not getting the desired output.
This is my configuration
input {
beats {
port => 5044
}
}
filter {
grok {
match =>["message", "%{GREEDYDATA:Data}"]}
}
output {
if [fs.mount_point] == "C:" and [fs.used] == "87264018432"
{
stdout { codec => rubydebug }
elasticsearch { hosts => ["localhost:9200"] index => "topbeat_test_2"
template => "./apache_template.json"
template_name => "*"
template_overwrite => true }
}
}
and the output which i am getting is:
D:\LogAnalyzer-3.0\logstash-2.4.0\bin>logstash agent -f eyeshare1.config
←[31mfetched an invalid config {:config=>"input { \n beats {\n port => 5044 \n }\n }\n\n\nfilter { \n grok {\n match =>["message", "%{GREEDYDATA:Data}"]}\n}\n\n\noutput {\n\nif [fs.m
ount_point] == "C:\" and [fs.used] == "87264018432"\n{\n\tstdout { codec => rubydebug }\n\t\nelasticsearch { hosts => ["localhost:9200"] index => "topbeat_test_2"\ntemplate => "./apache_template.
json"\ntemplate_name => "*"\ntemplate_overwrite => true } \n}\n}\n", :reason=>"Expected one of #, and, or, xor, nand, { at line 16, column 48 (byte 184) after output {\n\nif [fs.mount_point] == "C:\"
and [fs.used] == "", :level=>:error}←[0m
The signal HUP is in use by the JVM and will not work correctly on this platform
i think the way i am writing the config file is wrong. Kindly guide me in the right direction. Thanks