- Set retention check to shorter periods for more frequency (e.g. 10sec) on server.properties
log.retention.check.interval.ms=10000
and start zookeeper/kafka.
- Create a couple of topics
| "driverClass": io.openmessaging.benchmark.driver.kafka.KafkaBenchmarkDriver | |
| "topicConfig": | | |
| diskless.enable=true | |
| "replicationFactor": 1 | |
| "commonConfig": | | |
| bootstrap.servers=k-aws-xyz.avns.net:9092 | |
| security.protocol=SSL | |
| ssl.keystore.type=PEM | |
| ssl.keystore.location=k-aws-svc.pem |
log.retention.check.interval.ms=10000
and start zookeeper/kafka.
| # regex demo: https://regex101.com/r/2AxwfE/1 | |
| sqlite-utils insert /tmp/kafka-logs-test.db logs server.log.2022-09-24-21 --text --convert " | |
| import re | |
| r = re.compile(r'^\[(?P<datetime>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})\]\s(?P<level>\w+)\s(?P<log>(.+(\n(?\!\[).+|)+))', re.MULTILINE) | |
| def convert(text): | |
| rows = [m.groupdict() for m in r.finditer(text)] | |
| for row in rows: | |
| row.update({'server': 'localhost'}) | |
| row.update({'component': 'broker'}) |
| [ | |
| { | |
| "name": "com.sun.security.sasl.ClientFactoryImpl", | |
| "allDeclaredMethods": true, | |
| "allDeclaredConstructors": true | |
| }, | |
| { | |
| "name": "org.apache.kafka.clients.consumer.RangeAssignor", | |
| "allDeclaredMethods": true, | |
| "allDeclaredConstructors": true |
I hereby claim:
To claim this, I am signing this object:
| import org.apache.kafka.streams.TopologyDescription; | |
| import java.io.StringWriter; | |
| import java.util.stream.Stream; | |
| /** | |
| * | |
| */ | |
| public class KafkaStreamsTopologyGraphvizPrinter { |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| require "yaml" | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # Load properties files | |
| box_props = YAML.load_file("box.properties") | |
| aws_props = YAML.load_file("aws.properties") |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| #Path to new hard disk file | |
| file_to_disk = './disk.vdi' |
| input { | |
| file { | |
| path => "C:/tmp/log/soa_server1.out" | |
| start_position => beginning | |
| } | |
| } | |
| filter { | |
| if [path] =~ "soa_server1" { | |
| mutate { replace => { type => "soa_server1-out" } } | |
| multiline { |
| WLS_ACCESS_MONTH \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?|jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:tember)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\b | |
| WLS_ACCESS_HTTPDATE %{MONTHDAY}/%{WLS_ACCESS_MONTH}/%{YEAR}:%{TIME} %{INT} | |
| WLS_ACCESS_COMMONAPACHELOG %{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{WLS_ACCESS_HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) | |
| WLS_SERVER_LOG ####<%{DATA:wls_timestamp}> <%{WORD:severity}> <%{DATA:wls_topic}> <%{HOST:hostname}> <(%{WORD:server})?> %{GREEDYDATA:logmessage} |