×
Find plugins

Logstash1.3.0Minimum Jenkins requirement: 1.599ID: logstash

Installs: 1569
Last released: 3 months ago
Maintainers
K Jonathan Harker
Rusty Gerard
Jakub Bocheński

Plugin Information

Plugin ID

logstash

Changes

In Latest Release
Since Latest Release

Latest Release
Latest Release Date
Required Core
Dependencies

1.3.0 (archives)
Aug 16, 2017
1.599
mask-passwords (version:2.8, optional)
structs (version:1.2)
junit (version:1.10)

Source Code
Issue Tracking
Pull Requests
Maintainer(s)

GitHub
Open Issues
Pull Requests
K Jonathan Harker (id: jesusaurus)
Rusty Gerard (id: rgerard)
Jakub Bocheński (id: jbochenski)

Usage

Installations

2016-Nov 904
2016-Dec 939
2017-Jan 1050
2017-Feb 1163
2017-Mar 1251
2017-Apr 1225
2017-May 1319
2017-Jun 1301
2017-Jul 1336
2017-Aug 1466
2017-Sep 1493
2017-Oct 1569

This plugin pushes logs and build data to a Logstash indexer such as Redis or RabbitMQ.

Migration from v0.8.0

Beginning with version 1.0.0, connection information for the Logstash indexer is stored in a global config (version 0.8.0 and older stored this information in the project settings). Upon upgrading you will need to go to Jenkins → Manage Jenkins → Global Tool Configuration to re-enter the connection information.

You should also refresh the configuration of every job that uses this plugin to eliminate the obsolete fields and prevent warnings from occurring in the Jenkins server logs. To do this, either edit the jobs individually in the UI and click the "Save" button, or go to Jenkins → Manage Jenkins → Manage Old Data and click "Discard Unreadable Data".

Figure 1: Global configuration settings


Figure 2: Obsolete configuration data found in jobs using v0.8.0 or older.

Features

Indexers Currently Supported

The following data stores are currently supported for pushing logs and build data to:

  • Redis
  • RabbitMQ
  • Syslog

The plugin can also post directly to ElasticSearch.

Buildwrapper

This component streams individual log lines to the indexer for post-processing, along with any build data that is available at the start (some information such as the build status is unavailable or incomplete).

Post-Build Action

This component pushes the tail of the job's log to the indexer for post-processing, along with all build data at the time the post-build action had started (if any post-build actions are scheduled after this plugin they will not be recorded).

JSON Payload Format

JSON payload Example
{
   "data":{
      "id":"2014-10-13_19-51-29",
      "result":"SUCCESS",
      "projectName":"my_example_job",
      "displayName":"#1",
      "fullDisplayName":"My Example Job #1",
      "url":"job/my_example_job/1/",
      "buildHost":"Jenkins",
      "buildLabel":"",
      "buildNum":1,
      "buildDuration":0,
      "rootProjectName":"my_example_job",
      "rootProjectDisplayName":"#1",
      "rootBuildNum":1,
      "buildVariables":{
         "PARAM1":"VALUE1",
         "PARAM2":"VALUE2"
      },
      "testResults":{
         "totalCount":45,
         "skipCount":0,
         "failCount":0,
         "failedTests":[]
      }
   },
   "message":[
      "Started by user anonymous",
      "Building in workspace /var/lib/jenkins/jobs/my_example_job/workspace",
      "Hello, World!"
   ],
   "source":"jenkins",
   "source_host":"http://localhost:8080/jenkins/",
   "@timestamp":"2014-10-13T19:51:29-0700",
   "@version":1
}

Example payload sent to the indexer (e.g. RabbitMQ) using the post-build action component. Note that when the buildwrapper is used, some information such as the build result will be missing or incomplete, and the "message" array will contain a single log line.

Note that data.testResults will only be present if a publisher records your test results in the build, for example by using the JUnit Plugin.

Changelog

See Changelog on github

Issues

To report a bug or request an enhancement to this plugin please create a ticket in JIRA.

Issues (${entries.size()} issues)

T P Key Summary Status
Loading...
Refresh

ArchivesGet past versions
Labels