# HELP Embargo_Index_seconds Time taken for Embargo Index\n# TYPE Embargo_Index_seconds summary\nEmbargo_Index_seconds_count{CUST=\"RPS\",ENV=\"DEV\",PRODUCT=\"GTM\",class=\"com.e2open.embargo.EmbargoIndex\",exception=\"none\",host=\"in7lin059\",method=\"createEmbargoIndex\"} 1\nEmbargo_Index_seconds_sum{CUST=\"RPS\",ENV=\"DEV\",PRODUCT=\"GTM\",class=\"com.e2open.embargo.EmbargoIndex\",exception=\"none\",host=\"in7lin059\",method=\"createEmbargoIndex\"} 1.762137559
Kindly let me know how can I split with \n character and ignore lines starting with #.
I get 100's of lines from http poller input, but mentioned below is the 4 lines input which is coming into logstash.
# HELP tasks_scheduled_execution_seconds
# TYPE tasks_scheduled_execution_seconds summary
tasks_scheduled_execution_seconds_sum{CUST="RPS",ENV="DEV",PRODUCT="GTM",code_function="clearCacheConfigurationByScheduler",code_namespace="com.e2open.warningword.WarningwordService",error="none",exception="none",host="in7lin059",outcome="SUCCESS"} 0.037626831
# HELP tasks_scheduled_execution_seconds_max
# TYPE tasks_scheduled_execution_seconds_max gauge
tasks_scheduled_execution_seconds_max{CUST="RPS",ENV="DEV",PRODUCT="GTM",code_function="clearCacheConfigurationByScheduler",code_namespace="com.e2open.warningword.WarningwordService",error="none",exception="none",host="in7lin059",outcome="SUCCESS"} 1.9311E-5
Below is the output, all the values are coming fine but for every event there is a json parse failure tag. pls let me know the issue
The default for an http_poller input is to use a json codec, and that will give you that parse error.
It would be nice if the documentation was more explicit about the input expecting the API that it is calling to return (by default) JSON.
Try adding codec => plain or codec => line to your http_poller.
If you use a line codec you may find that it creates a separate event for each line of the http_poller output, in which case you will no longer need the mutate+split, or the split, and the ruby can be replaced by
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.