Class ElasticsearchLogStorageRetriever

    • Field Detail

      • KEEPALIVE_INTERVAL_PROPERTY

        public static final String KEEPALIVE_INTERVAL_PROPERTY
      • KEEPALIVE_PROPERTY

        public static final String KEEPALIVE_PROPERTY
      • KEEPALIVE_INTERVAL

        public static final int KEEPALIVE_INTERVAL
      • KEEPALIVE

        public static final boolean KEEPALIVE
    • Constructor Detail

      • ElasticsearchLogStorageRetriever

        @MustBeClosed
        public ElasticsearchLogStorageRetriever​(@NonNull
                                                String elasticsearchUrl,
                                                boolean disableSslVerifications,
                                                @NonNull
                                                org.apache.http.auth.Credentials elasticsearchCredentials,
                                                @NonNull
                                                groovy.text.Template buildLogsVisualizationUrlTemplate,
                                                @NonNull
                                                TemplateBindingsProvider templateBindingsProvider)
        TODO verify username:password auth vs apiKey auth
    • Method Detail

      • checkElasticsearchSetup

        public List<FormValidation> checkElasticsearchSetup()
        Example of a successful check:
        
         OK: Verify existence of the Elasticsearch Index Template 'logs-apm.app' used to store Jenkins pipeline logs...
         OK: Connected to Elasticsearch https://***.es.example.com with user 'jenkins'.
         OK: Index Template 'logs-apm.app' found.
         OK: Verify existence of the Index Lifecycle Management (ILM) Policy 'logs-apm.app' associated with the Index Template 'logs-apm.app' to define the time to live of the Jenkins pipeline logs in Elasticsearch...
         OK: Index Lifecycle Policy 'logs-apm.app_logs-default_policy' found.
         OK: Logs retention policy: hot[rollover[maxAge=30d, maxSize=50gb]], warm [phase not defined], cold [phase not defined], delete[delete[min_age=10d]].
         
      • prettyPrintPhaseRetentionPolicy

        @NonNull
        protected static String prettyPrintPhaseRetentionPolicy​(co.elastic.clients.elasticsearch.ilm.Phase phase,
                                                                String phaseName)