Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28040

Allow logstash plugin to feed a syslog server

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It would be nice to be able to send build logs to a syslog server. syslog-logger-plugin only sends Jenkins' own logs to the syslog server, logstash-plug will also send the console log, but not to a syslog server.

        Attachments

          Activity

          Hide
          rgerard Rusty Gerard added a comment -

          While I think this functionality belongs in the syslog-logger plugin rather than the logstash plugin, it might be useful to share the BuildData object I created for the logstash plugin across both.

          Cyrille Le Clerc, what do you think? The logstash plugin sends data across as JSON. Would it be useful to split out BuildData.java in logstash out to share across both plugins so they share a common format?

          https://github.com/jenkinsci/logstash-plugin/blob/master/src/main/java/jenkins/plugins/logstash/persistence/BuildData.java

          Show
          rgerard Rusty Gerard added a comment - While I think this functionality belongs in the syslog-logger plugin rather than the logstash plugin, it might be useful to share the BuildData object I created for the logstash plugin across both. Cyrille Le Clerc , what do you think? The logstash plugin sends data across as JSON. Would it be useful to split out BuildData.java in logstash out to share across both plugins so they share a common format? https://github.com/jenkinsci/logstash-plugin/blob/master/src/main/java/jenkins/plugins/logstash/persistence/BuildData.java
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Thanks for pinging me.

          Could we imagine that this build details could be relevant for the Audit Trail Plugin which already has 2 outputs: file and syslog?

          We could add a logstash output to the Audit Trail Plugin.

          https://wiki.jenkins-ci.org/display/JENKINS/Audit+Trail+Plugin

          Show
          cleclerc Cyrille Le Clerc added a comment - Thanks for pinging me. Could we imagine that this build details could be relevant for the Audit Trail Plugin which already has 2 outputs: file and syslog? We could add a logstash output to the Audit Trail Plugin. https://wiki.jenkins-ci.org/display/JENKINS/Audit+Trail+Plugin
          Hide
          rgerard Rusty Gerard added a comment -

          Someone submitted a pull request for this feature: https://github.com/jenkinsci/logstash-plugin/pull/10

          I'm all for merging it in to close this issue, but is this good long-term, Cyrille Le Clerc? (i.e. will this just be redundant when a future version of syslog-logger comes out?)

          Show
          rgerard Rusty Gerard added a comment - Someone submitted a pull request for this feature: https://github.com/jenkinsci/logstash-plugin/pull/10 I'm all for merging it in to close this issue, but is this good long-term, Cyrille Le Clerc ? (i.e. will this just be redundant when a future version of syslog-logger comes out?)
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          @rgerard I feel that it's good to offer this feature in the logstash plugin waiting for the audit trail plugin to offer something equivalent.

          Most of the syslog logic is located in the syslog-java-client dependency, the quantity of code duplication between the 2 plugins (logstash-plugin and audit-trail-plugin) is limited.

          Show
          cleclerc Cyrille Le Clerc added a comment - @rgerard I feel that it's good to offer this feature in the logstash plugin waiting for the audit trail plugin to offer something equivalent. Most of the syslog logic is located in the syslog-java-client dependency, the quantity of code duplication between the 2 plugins (logstash-plugin and audit-trail-plugin) is limited.
          Hide
          sysadmin4j Felix Langelier added a comment -

          Just want to let you know that the generated Syslog messages will comply to the CEE format. So, if you have a logging infrastructure based on Elasticsearch this feature will make log parsing way easier with rsyslog using the mmjsonparse and omelasticsearch module. I think it`s a good idea to have it in the Logstash jenking plugin because it's related to ELK.

          Ref:
          http://www.rsyslog.com/doc/v8-stable/configuration/modules/omelasticsearch.html
          http://www.rsyslog.com/doc/mmjsonparse.html

          Show
          sysadmin4j Felix Langelier added a comment - Just want to let you know that the generated Syslog messages will comply to the CEE format. So, if you have a logging infrastructure based on Elasticsearch this feature will make log parsing way easier with rsyslog using the mmjsonparse and omelasticsearch module. I think it`s a good idea to have it in the Logstash jenking plugin because it's related to ELK. Ref: http://www.rsyslog.com/doc/v8-stable/configuration/modules/omelasticsearch.html http://www.rsyslog.com/doc/mmjsonparse.html
          Hide
          rgerard Rusty Gerard added a comment - - edited

          Felix Langelier, that sounds good. I've commented on the pull request.

          Show
          rgerard Rusty Gerard added a comment - - edited Felix Langelier , that sounds good. I've commented on the pull request.
          Hide
          rgerard Rusty Gerard added a comment -

          Implemented in v1.1.0. Thanks Felix Langelier!

          Show
          rgerard Rusty Gerard added a comment - Implemented in v1.1.0. Thanks Felix Langelier !

            People

            Assignee:
            sysadmin4j Felix Langelier
            Reporter:
            johmart johmart
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: