The problem is that I need to get Logstash to ingest a csv file that I have stored in a public GitHub repository (viewed as a raw file). The csv does not have a timestamp and I want Logstash to add one otherwise it does not connect to Grafana.
The following is my pipline code in Logstash
input {
http_poller {
urls => {
csv_data => {
method => get
test1 => "https://raw.githubusercontent.com/shujah-TRN-Infosys/dag-test/main/dag_meta_data.csv"
headers => {
Accept => "text/csv"
}
}
}
request_timeout => 60
schedule => { cron => "* * * * * UTC" } #EveryMinute
codec => "plain"
}
}
filter {
csv {
separator => ","
columns => ["dag_id","batch", "sor", "consumer", "application", "depends_on_ingestion", "depends_on_curation", "dag_type"] # Specify column names here
}
ruby {
code => "event.set('@timestamp', Logstash::Timestamp.now)"
}
}
output {
elasticsearch {
hosts => [ "xxxxxxx" ]
user => "xxxxx"
password => "xxxx"
index => "meta_csv_data-%{+YYYY.MM.dd}"
}
#stdout { codec => rubydebug }
}
I have tried the pipeline code (sensitive info redacted) and waited a minute to see if any indices popped up in the index management section of elastic cloud, there were none, so I am assuming it is not working. Any ideas on how to approach this or if there is something wrong with my pipeline code.