I'm using http_poller input plugin in the logstash pipeline in order to ingest the REST API endpoint call response to feed into the elasticsearch index .This is my current configuration of the pipeline as I'm doing on my work device.
input {
http_poller {
urls => {
test1 => {
method => get
ssl_enabled => true
cacert => "C:\Users\882709066\Downloads\logstash-8.12.2\rbc-ca-bundle.pem"
ssl_certificate => "C:\Users\882709066\Downloads\logstash-8.12.2\rbc-ca-bundle.cer"
url => "https://volume-prediction-restapi-juc0-private-qat.apps.ocp-sai-s1.saifg.rbc.com/inference"
headers => {
"Content-Type" => "application/json"
}
body => '{
"date": "01-03-2025",
"pred_column": "file_record_count",
"history_limit_days": 90
}'
}
}
request_timeout => 60
schedule => { cron => "* * * * * UTC" } # Runs every minute
codec => "json" # Parses the JSON response
}
}
filter {
# Add your filter logic here if needed
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => ["https://2bac88ffc6b84ebeb6a945337cb56bb9.ece.saifg.rbc.com:9243"]
user => "elastic"
password => "******"
ilm_rollover_alias => "test-api"
ssl => true
ssl_certificate_verification => true
cacert => "C:/Users/882709066/Downloads/logstash-8.12.2/elastic-cert.cer"
}
}
Kindly please help in resolving this error as I tried various options but unable to resolve.