input { http_poller { urls => { external_api => { method => "post" url => "https://jsonplaceholder.typicode.com/posts" body => '{ "title": "foo", "body": "bar", "userId": "1"}' headers => { "content-type" => "application/json" } } } tags => ["external-api"] request_timeout => 100 schedule => { "every" => "5s" } codec => "json" metadata_target => "http_poller_metadata" } http_poller { urls => { es_health_status => { method => "get" url => "https://192.168.56.101:9200/_cluster/health" headers => { "Accept" => "application/json" "Authorization" => "Basic ZWxhc3RpYzplbGFzdGlj" # Base64 encoded 'elastic:password' } } } tags => ["es_health"] request_timeout => 60 schedule => { cron => "* * * * * UTC" } codec => "json" metadata_target => "http_poller_metadata" ssl_truststore_path => "/mnt/fileshare/elasticsearch-817/elasticsearch-certs/elasticsearch_truststore.jks" ssl_truststore_password => "changeit" } } output { if "es_health" in [tags] { elasticsearch { index => "http-poller-es-health" hosts => ["https://192.168.56.101:9200"] user => "elastic" password => "enter-password-here" ssl_enabled => true ssl_certificate_authorities => "/usr/share/ca-certificates/elastic-ca.crt" } } if "external-api" in [tags] { elasticsearch { index => "http-poller-api" hosts => ["https://192.168.56.101:9200"] user => "elastic" password => "enter-password-here" ssl_enabled => true ssl_certificate_authorities => "/usr/share/ca-certificates/elastic-ca.crt" } } stdout { codec => "rubydebug" } }