In this recipe, we will show you how to configure the Logstash plugin that you installed on Jenkins previously.
Let's perform the following steps to feed Jenkins logs to Elasticsearch:
- In the Manage Jenkins menu, click on the Configure System button.
- Scroll through the settings. Under the Logstash settings, check the Enable sending logs to an Indexer checkbox. When this setting is enabled, it will open four new fields.
- In the URI field, enter the service name, followed by the indexer name; for example, http://elasticsearch-es-http:9200/logstash/jenkins. Enter your elastic username and password and save the changes:
Now, the Logstash plugin will push the logs to Elasticsearch through the log collector.