You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/06/07 10:11:01 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1345: MINFICPP-1856 Add Kubernetes log collection config examples

lordgamez commented on code in PR #1345:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1345#discussion_r891033542


##########
examples/kubernetes/daemon-set-log-collection.yml:
##########
@@ -0,0 +1,124 @@
+
+# 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.
+apiVersion: v1
+data:
+  minifi-log.properties: |
+    spdlog.pattern=[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v
+    appender.stderr=stderr
+    logger.root=INFO,stderr
+    logger.org::apache::nifi::minifi=INFO,stderr
+  minifi.properties: |
+    nifi.flow.configuration.file=./conf/config.yml
+    nifi.administrative.yield.duration=30 sec
+    nifi.bored.yield.duration=100 millis
+    nifi.extension.path=../extensions/*
+
+    nifi.provenance.repository.directory.default=${MINIFI_HOME}/provenance_repository
+    nifi.provenance.repository.max.storage.time=1 MIN
+    nifi.provenance.repository.max.storage.size=1 MB
+    nifi.flowfile.repository.directory.default=${MINIFI_HOME}/flowfile_repository
+    nifi.database.content.repository.directory.default=${MINIFI_HOME}/content_repository
+    nifi.provenance.repository.class.name=NoOpRepository
+    nifi.content.repository.class.name=DatabaseContentRepository
+  config.yml: |
+    MiNiFi Config Version: 3
+    Flow Controller:
+      name: Read Kubernetes pod logs and publish them to Kafka
+    Processors:
+    - name: Tail Kubernetes log files
+      id: 891efd7f-2814-4068-9efd-5f258f4990d5
+      class: org.apache.nifi.minifi.processors.TailFile
+      scheduling strategy: TIMER_DRIVEN
+      scheduling period: 1 sec
+      Properties:
+        tail-mode: Multiple file
+        tail-base-directory: /var/log/pods/${namespace}_${pod}_${uid}/${container}
+        File to Tail: '.*\.log'
+        Attribute Provider Service: KubernetesControllerService
+        Lookup frequency: 10 min
+        Recursive lookup: 'false'
+        Initial Start Position: Beginning of File
+        Input Delimiter: \n
+        Rolling Filename Pattern: '${filename}.log.*'
+    - name: Publish messages to Kafka topic test
+      id: fb880b73-bff7-4775-a854-e048ae09e07e
+      class: org.apache.nifi.processors.standard.PublishKafka
+      scheduling strategy: EVENT_DRIVEN
+      auto-terminated relationships list:
+      - success
+      - failure
+      Properties:
+        Batch Size: '10'
+        Client Name: test-client
+        Compress Codec: none
+        Delivery Guarantee: '1'
+        Known Brokers: kafka-broker:9092
+        Message Timeout: 12 sec
+        Request Timeout: 10 sec
+        Topic Name: test

Review Comment:
   Good idea, updated in bd18f594f454045a70161d58aa9a70222eb43548



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org