[BUILD-FAILURE]: Job 'Karaf/karaf-decanter/master [master] [59]'
BUILD-FAILURE: Job 'Karaf/karaf-decanter/master [master] [59]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-decanter/job/master/59/";>Karaf/karaf-decanter/master [master] [59]"
[GitHub] [karaf-decanter] jbonofre merged pull request #237: [KARAF-7026] Upgrade to orientdb-client 3.1.7
jbonofre merged pull request #237: URL: https://github.com/apache/karaf-decanter/pull/237 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[karaf-decanter] branch master updated: [KARAF-7026] Upgrade to orientdb-client 3.1.7
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/karaf-decanter.git The following commit(s) were added to refs/heads/master by this push: new 89c4d04 [KARAF-7026] Upgrade to orientdb-client 3.1.7 new 22eb143 Merge pull request #237 from jbonofre/KARAF-7026 89c4d04 is described below commit 89c4d04758c78b4c44ca13c088bfedbefa1087d4 Author: jbonofre AuthorDate: Fri Feb 5 07:38:56 2021 +0100 [KARAF-7026] Upgrade to orientdb-client 3.1.7 --- appender/orientdb/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appender/orientdb/pom.xml b/appender/orientdb/pom.xml index 2949993..fd3e6ae 100644 --- a/appender/orientdb/pom.xml +++ b/appender/orientdb/pom.xml @@ -45,7 +45,7 @@ com.orientechnologies orientdb-client -3.1.5 +3.1.7
[GitHub] [karaf-decanter] jbonofre commented on a change in pull request #240: [KARAF-6990] Add loki appender
jbonofre commented on a change in pull request #240: URL: https://github.com/apache/karaf-decanter/pull/240#discussion_r571549710 ## File path: appender/loki/src/main/java/org/apache/karaf/decanter/appender/loki/LokiAppender.java ## @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.karaf.decanter.appender.loki; + +import org.apache.karaf.decanter.api.marshaller.Marshaller; +import org.apache.karaf.decanter.appender.utils.EventFilter; +import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.event.Event; +import org.osgi.service.event.EventConstants; +import org.osgi.service.event.EventHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedWriter; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Dictionary; + +@Component( +name = "org.apache.karaf.decanter.appender.loki", +immediate = true, +property = EventConstants.EVENT_TOPIC + "=decanter/collect/*" +) +public class LokiAppender implements EventHandler { + +private final static Logger LOGGER = LoggerFactory.getLogger(LokiAppender.class); + +@Reference(cardinality = ReferenceCardinality.OPTIONAL) +public Marshaller marshaller; + +private String url; +private String tenant = null; +private String username = null; +private String password = null; +private Dictionary config; + +@Activate +public void activate(ComponentContext componentContext) { +activate(componentContext.getProperties()); +} + +public void activate(Dictionary config) { +this.config = config; +url = (config.get("loki.url") != null) ? (String) config.get("loki.url") : "http://localhost:3100/loki/api/v1/push";; +tenant = (config.get("loki.tenant") != null) ? (String) config.get("loki.tenant") : null; +username = (config.get("loki.username") != null) ? (String) config.get("loki.username") : null; +password = (config.get("loki.password") != null) ? (String) config.get("loki.password") : null; +} + +@Override +public void handleEvent(Event event) { +if (EventFilter.match(event, config)) { +String log; +if (marshaller != null) { +log = marshaller.marshal(event); +} else { +StringBuilder builder = new StringBuilder(); +for (String innerKey : event.getPropertyNames()) { + builder.append(innerKey).append(":").append(toString(event.getProperty(innerKey))).append(" | "); +} +log = builder.toString(); +} +try { +HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:3100/loki/api/v1/push";).openConnection(); Review comment: Good catch ! Thanks for spotting this ! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [karaf-decanter] fpapon commented on a change in pull request #240: [KARAF-6990] Add loki appender
fpapon commented on a change in pull request #240: URL: https://github.com/apache/karaf-decanter/pull/240#discussion_r571452932 ## File path: appender/loki/src/main/java/org/apache/karaf/decanter/appender/loki/LokiAppender.java ## @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.karaf.decanter.appender.loki; + +import org.apache.karaf.decanter.api.marshaller.Marshaller; +import org.apache.karaf.decanter.appender.utils.EventFilter; +import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.event.Event; +import org.osgi.service.event.EventConstants; +import org.osgi.service.event.EventHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedWriter; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Dictionary; + +@Component( +name = "org.apache.karaf.decanter.appender.loki", +immediate = true, +property = EventConstants.EVENT_TOPIC + "=decanter/collect/*" +) +public class LokiAppender implements EventHandler { + +private final static Logger LOGGER = LoggerFactory.getLogger(LokiAppender.class); + +@Reference(cardinality = ReferenceCardinality.OPTIONAL) +public Marshaller marshaller; + +private String url; +private String tenant = null; +private String username = null; +private String password = null; +private Dictionary config; + +@Activate +public void activate(ComponentContext componentContext) { +activate(componentContext.getProperties()); +} + +public void activate(Dictionary config) { +this.config = config; +url = (config.get("loki.url") != null) ? (String) config.get("loki.url") : "http://localhost:3100/loki/api/v1/push";; +tenant = (config.get("loki.tenant") != null) ? (String) config.get("loki.tenant") : null; +username = (config.get("loki.username") != null) ? (String) config.get("loki.username") : null; +password = (config.get("loki.password") != null) ? (String) config.get("loki.password") : null; +} + +@Override +public void handleEvent(Event event) { +if (EventFilter.match(event, config)) { +String log; +if (marshaller != null) { +log = marshaller.marshal(event); +} else { +StringBuilder builder = new StringBuilder(); +for (String innerKey : event.getPropertyNames()) { + builder.append(innerKey).append(":").append(toString(event.getProperty(innerKey))).append(" | "); +} +log = builder.toString(); +} +try { +HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:3100/loki/api/v1/push";).openConnection(); Review comment: @jbonofre we should use `url` private attribute here instead off hard code url, right? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[BUILD-STABLE]: Job 'Karaf/karaf-decanter/master [master] [58]'
BUILD-STABLE: Job 'Karaf/karaf-decanter/master [master] [58]': Is back to normal.
[GitHub] [karaf-decanter] jbonofre merged pull request #232: [KARAF-7015] Upgrade to elasticsearch 7.10.2
jbonofre merged pull request #232: URL: https://github.com/apache/karaf-decanter/pull/232 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[karaf-decanter] branch master updated: [KARAF-7015] Upgrade to elasticsearch 7.10.2
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/karaf-decanter.git The following commit(s) were added to refs/heads/master by this push: new eea9c2b [KARAF-7015] Upgrade to elasticsearch 7.10.2 new ac6b172 Merge pull request #232 from jbonofre/KARAF-7015 eea9c2b is described below commit eea9c2b7f4a4cc814cb346019f4da26409dd233d Author: jbonofre AuthorDate: Fri Feb 5 06:31:35 2021 +0100 [KARAF-7015] Upgrade to elasticsearch 7.10.2 --- appender/elasticsearch/pom.xml | 6 +++--- collector/elasticsearch/pom.xml | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/appender/elasticsearch/pom.xml b/appender/elasticsearch/pom.xml index 955e958..edd8da9 100644 --- a/appender/elasticsearch/pom.xml +++ b/appender/elasticsearch/pom.xml @@ -45,20 +45,20 @@ org.elasticsearch.client elasticsearch-rest-client -7.10.0 +7.10.2 org.elasticsearch.test framework -7.10.0 +7.10.2 test org.elasticsearch.plugin transport-netty4-client -7.10.0 +7.10.2 test diff --git a/collector/elasticsearch/pom.xml b/collector/elasticsearch/pom.xml index 7d725d2..9c02bb5 100644 --- a/collector/elasticsearch/pom.xml +++ b/collector/elasticsearch/pom.xml @@ -37,12 +37,12 @@ org.elasticsearch.client elasticsearch-rest-client -7.10.0 +7.10.2 org.elasticsearch.client elasticsearch-rest-high-level-client -7.10.0 +7.10.2 org.apache.karaf.decanter.collector @@ -53,13 +53,13 @@ org.elasticsearch.test framework -7.10.0 +7.10.2 test org.elasticsearch.plugin transport-netty4-client -7.10.0 +7.10.2 test