How do I make my LOGSTASH pipeline of input type ELASTICSEARCH to be running in certain periods automatically?

Hello gentlemen.

I have 2 pipelines running by my LOGSTASH.

the first input FILE pipeline is running normally and processing .csv data

the second pipeline of input type Elasticsearch it runs only the first time, then it has finished status.

How do I make this second pipeline of the input type Elasticsearch run in certain periods automatically by LOGSTASH?

input {
  elasticsearch {

                    hosts => ["xxx.xxx.xxx.xxx"]
                    index => "dados-csv"
                    query => '{
                            "_source": ["Box or Label","Scan Time","Uid Value"], 
                            "query": {
                                "range": {
                                    "@timestamp": {
                                        "gte": "now-22h/h",
                                        "lt": "now/d"
                                    }
                                }
                            }
                        }'
                    user => "*****"
                    password => "12345678"
                    ssl => false
                    size => 1000
                    scroll => "5m"
                    docinfo => true
                }
}
filter {
    
}
output {
    elasticsearch {
       
                  }  
}

you add this line this will run on top of every hour. basically it follows crontab format.
min hr day_of_month month day_of_week

schedule => "00 * * * *"

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.