I have installed my logstash using rpm and enabled it using systemctl. I have to stash a csv file and create table in grafana daily. Do i have to run bin/logstash -f /etc/logstash/conf.d/logstash.config via cron if i want to stash sa csv file hourly?. I am not seeing any content my grafana when i am about to add a table panel.
index are getting created.
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .kibana _G9Bg9S8SruqNG12CBrU2g 1 0 2 1 16kb 16kb
yellow open implementationcrq-2018.03.15 H7B50zQZQsuwHsx5XHK2pA 5 1 43 0 88.4kb 88.4kb
yellow open pendingcrq-2018.03.15 Nnb8_XnVQQmxPMzpBJO9tA 5 1 2 0 19.1kb 19.1kb
yellow open completedcrq-2018.03.15 5FIT8AxsSfKry22xKEleHQ 5 1 16 0 85.8kb 85.8kb
yellow open closedcrq-2018.03.15 ecf0hIpZSUCObNR7hDZQKg 5 1 53 0 129.7kb 129.7kb
You can keep Logstash running all the time and configure a file input to read *.csv or whatever the files are named. When you want Logstash to process a file just copy it to the directory that Logstash is monitoring.
i have created a cron to run my logstash config every 3mins. Is that allowed? in my logs i am seeing this.
[2018-03-18T22:03:11,256][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-03-18T22:03:11,262][FATAL][logstash.runner ] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.
[2018-03-18T22:03:11,265][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (SystemExit) exit
[2018-03-18T22:06:11,320][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
Yes, run Logstash as a background service instead and follow the advice I gave earlier. Logstash doesn't shut down when it has processed all data via the file input so starting it every three minutes doesn't make sense.
It means exactly what it says. The value of the type field will no longer by default be used to determine the type of the documents. If this really is what you want you can use
document_type => "%{type}"
in your elasticsearch output configuration. Here's the relevant code:
what should be my correct approach? this is the scenario. every 2 hours a CSV file is dumped in my samba directory. I have a python scrupt parses the CSV file and create a new CSV file (pending.csv, completed.csv and implementation.csv). From this new input files i would like to create 3 different indeces that i will be using for my table panel in grafana. I want to display this in my dashboard with table panels.
What is your python script doing to the incoming CSV file? Is it using the Status field to decide which file to write the line to?
If so, then Logstash can do all of what you want to do in a single pass of the incoming file.
I am sure you can use Logstash functions to send each event to the correct index on-the-fly using string interpolation.
Perhaps:
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.