is there a way to label individual instances of logstash ? I run multiple logstash instances on a host and it works fine. But when I run topbeat on the host, it identifies that same proc.name for all the instances
if there was a way to label individual instances by passing in identifiers in command line params, I can atleast grok the instance name and aggregate metrics per each individual logstash instance
Thats a good idea, but I don't think it is applicable for my query. I need the nodename in the command line params, not in the logstash collector.
If i add this line in the logstash collector, it will identify the instance where these logs were collected from topbeat, not the actual node-name for which the data is collected.
That is something I did not know about thought, than you nonetheless
OK.
So if you clearly need a marker in logstash command line (I mean command line visible using "ps"), I invite you to set "LS_JAVA_OPTS" environment variable just before calling bin/logstash.
Example :
LS_JAVA_OPTS="-Dlogstash.instance=ls1"
bin/logstash
Using this tip, your final command line that is running logstash is :
java ... -Dlogstash.instance=ls1 ...
LS_JAVA_OPTS allow you to add params to real logstash start command line.
For information, the "-Dkey=value" syntax let you to set a java system property.
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.