Add frequency to elatize data logstash

Hi,

I need to add frequency to elastize data in my elasticsearch.
I'm using stdin input and I don't know which the parameter/variable relationated with frequency.

Somebody can help me?

not sure on your exact query.
Do you mean

  • frequency of a term within data (i.e. like the termvectors)
  • Or is it more of frequency of data collection? How quick should you poll ?

Refresh data already stored by establishing a frequency to refresh of this data.

I obtain the data from a web service, for which if the data of the web service changes I need to update it in my logstash automatically by means of a certain elastication frequency.

Welcome to our community! :smiley:

What sort of data is this?

Can be json, html, xml or csv.

I'm using input stdin.

ok. So what you are looking is more like scheduling/cron type of pulling from the web-service?

If you look into the relevant input plugins of logstash, you will find some modules contain scheduling/cron built in

For example for a web-service, you can use http_poller , but depends on what you exactly want..

Something of concept like below should be good starting point

input {
  http_poller {
    urls => {
      webservice1 => "http://localhost:9200"
     }
    }
    request_timeout => 60
    # Supports "cron", "every", "at" and "in" schedules by rufus scheduler
    schedule => { cron => "* * * * * UTC"}
    codec => "json"
    # A hash of request metadata info (timing, response headers, etc.) will be sent here
    metadata_target => "http_poller_metadata"
  }

}

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