• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • logstash-plugin
    • None
    • Latest logstash-lugion version (2.1.0)

      Hi,

      I am using the logstash plugin to send console logs to ElasticSearch. The problem is that my application where I want to send my console logs is only accessible via proxy.

      So I am setting proxy settings in Jenkins and I start a job that does a curl to my application (proxy is set only in Jenkins settings) and my curl command succeeds but I get this from the plugin:

      [logstash-plugin]: No Further logs will be sent to APPLICATION_URL. org.apache.http.conn.HttpHostConnectException: Connect to APPLICATION_URL:443 [APPLICATION_URL] failed: Connection refused (Connection refused) 

      However, I checked out the project from github and made a custom version of the plugin. I added those lines: in ElasticSearchDao#push()

            clientBuilder.useSystemProperties();
            httpClient = clientBuilder.build(); 

      or 

            clientBuilder.setProxy(new HttpHost(proxy-host, 8080));
            httpClient = clientBuilder.build(); 

      And with either of the versions I am able to send logs to my application via proxy.

      So my question is, is the plugin able to use somehow proxy settings and if yes, how should I do it? I do not want to use a custom version of the plugin.

       

      Best Regards,

      Slavi

          [JENKINS-53068] logstash plugin does not use proxy settings

          Hi, and thanks for the report.
          Using system properties seems like a simpler option here. To keep this backwards compatible we need this to only be enabled by a new option.

          If you want this integrated please file a PR. You can checkout https://github.com/jenkinsci/logstash-plugin/pull/75/ as an example – this was about adding a custom SSL cert to the http client

          Jakub Bochenski added a comment - Hi, and thanks for the report. Using system properties seems like a simpler option here. To keep this backwards compatible we need this to only be enabled by a new option. If you want this integrated please file a PR. You can checkout https://github.com/jenkinsci/logstash-plugin/pull/75/ as an example – this was about adding a custom SSL cert to the http client

          Michael Kunze added a comment -

          Is there progress on this? Unfortunately, I'm not a developer but would like to use the plugin.

          Michael Kunze added a comment - Is there progress on this? Unfortunately, I'm not a developer but would like to use the plugin.

            jbochenski Jakub Bochenski
            slavi_sotirov Slavi Sotirov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: