The objective of this exercise is to visualise ganglia gmond output in kibana. I am trying to filter out certian lines from ganglia gmond though logstash.
If i try listening to udp port in logstash and apply the filter, no messages are filtered. However my filter is correct, because when i try using logstash generated text file output of gmond, instead of directly listening to gmond on udp, i am able filter the message.
To solve this issue, i have used to conf files.
Logstash listens to gmond on upd port and output the resluts to a file
Logstash uses the generated file as input, applies filters on it and then sends the output to elasticsearch. This would make it more clear
input { file { path => "/tmp/elastic_gmond-log.txt" } } filter { # bacsically filtering all the string values so that i can visusalize other float values in kibana if ([message] =~ /machine_type/ or [message] =~ /os_name/ or [message] =~ /location/ or [message] =~ /os_release/ ) { drop{} } } output { file { path => "/tmp/gmond-log.txt" } elasticsearch { cluster => elasticsearch port => 9300 index => "ganglialog-%{+YYYY.MM.dd}" } }
However my logstash is dying as soon as i restart the gmond
Logstash startup completed Exception in thread ">output" java.lang.UnsupportedOperationException at java.lang.Thread.stop(Thread.java:869) at org.jruby.RubyThread.exceptionRaised(RubyThread.java:1221) at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:112) at java.lang.Thread.run(Thread.java:745)
The command used is ./logstash --config /etc/logstash/conf.d/
How do get this thing working? Is there an easlier/better alternative?
The problem here is that LS will merge both configs and you will have 3 outputs.
You need to add a tag and then a conditional to the filter and the second set of outputs.
As mentioned before, the issue with this type of configuraion is that, the filter does not work when i am reading messaged directly from udp port.
That is why I am using a two step process of creating a output file after listening to upd port and then applying filters onthis generated file, the ouptput of which is then sent to elasticsearch
Seems, the filters not working with ganglia upd. how can this be overcome ?
Removing quotes on port does not change anything
when i put upd input instead of ganglia, the messages are not formated and can't figure out the output.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.