I am trying to using multiple Url's for the http_poller and need to use a different Grok patterns for each of the Url's
I am aware that i can make use of type string in the Input plugins and make Grok patterns using 'If' condition , if it matches the type.
I tried to built with the below sample file ,Provide me help on building it .
Use a single http_poller input, and use the request metadata from each event (e.g., the name of the url used to generate the event) later in processing to determine which grok patterns to apply
Use separate http_poller inputs for your separate data sources, tagging events created by each with a type, using the type of each event later in processing to determine which grok patterns to apply
Single Input
If all of your URLs share credentials, pass back data that can be handled by the same codec, and should run on the same schedule, you may be best suited to share a single input.
The name of the URL is added to the metadata of the resulting event, and you can use this in your pipeline:
If the results cannot be processed by the same codec, or if you want to run them at different schedules or require separate credentials, you can use multiple inputs, tagging each with the type, and then use the event's type later in the pipeline:
In the http_poller input, you can specify where the metadata is placed (in my example I placed it in a key http_metadata). The input is also configured to hit one or more named URLs with a urls directive (e.g., "JVM_Memory" => "https://hedeededededje" and "GC" => "https://wwdwjjwhewkjek")
Once the http_poller input has been configured as such, each event that it generates will include several useful subkeys, including [http_metadata][name] with the name of the URL (in this case JVM_Memory or GC).
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.