mirror of
https://github.com/tiennm99/tjahzi.git
synced 2026-10-13 08:15:59 +00:00
1 parent
bbbb5ef2d5
commit
893e2f906d
11 files changed
+50
-95
No files matched your search
@@ -30,7 +30,7 @@ import static org.hamcrest.CoreMatchers.hasItems;
|
||||
class LoggingSystemSanityCheckTest {
|
||||
|
||||
@Container
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
.withClasspathResourceMapping("loki-config.yaml",
|
||||
"/etc/loki-config.yaml",
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.hamcrest.CoreMatchers.hasItems;
|
||||
class LoggingSystemTest {
|
||||
|
||||
@Container
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
.withClasspathResourceMapping("loki-config.yaml",
|
||||
"/etc/loki-config.yaml",
|
||||
|
||||
@@ -4,41 +4,27 @@ server:
|
||||
http_listen_port: 3100
|
||||
log_level: debug
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
min_ready_duration: 0s
|
||||
final_sleep: 0s
|
||||
chunk_idle_period: 5m
|
||||
chunk_retain_period: 30s
|
||||
max_transfer_retries: 0
|
||||
common:
|
||||
ring:
|
||||
instance_addr: 127.0.0.1
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
path_prefix: /tmp/loki
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2018-04-15
|
||||
store: boltdb
|
||||
- from: 2020-05-15
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 168h
|
||||
period: 24h
|
||||
|
||||
storage_config:
|
||||
boltdb:
|
||||
directory: /loki/index
|
||||
|
||||
filesystem:
|
||||
directory: /loki/chunks
|
||||
directory: /tmp/loki/chunks
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
reject_old_samples: true
|
||||
reject_old_samples_max_age: 168h
|
||||
|
||||
table_manager:
|
||||
retention_deletes_enabled: false
|
||||
retention_period: 0s
|
||||
allow_structured_metadata: false
|
||||
+2
-2
@@ -31,7 +31,7 @@ public class ServerNameIndicatorTest {
|
||||
public static Network network = Network.newNetwork();
|
||||
|
||||
@Container
|
||||
public GenericContainer loki1 = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki1 = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("loki1")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
@@ -46,7 +46,7 @@ public class ServerNameIndicatorTest {
|
||||
.withExposedPorts(3100);
|
||||
|
||||
@Container
|
||||
public GenericContainer loki2 = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki2 = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("loki2")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
|
||||
@@ -21,7 +21,7 @@ public class IntegrationTest {
|
||||
public static Network network = Network.newNetwork();
|
||||
|
||||
@Container
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("loki")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@ import org.slf4j.MDC;
|
||||
import pl.tkowalcz.tjahzi.log4j2.infra.IntegrationTest;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.Matchers.hasItems;
|
||||
import static org.hamcrest.core.Every.everyItem;
|
||||
import static pl.tkowalcz.tjahzi.log4j2.infra.LokiAssert.assertThat;
|
||||
@@ -38,9 +38,9 @@ class LabelsContextSubstitutionTest extends IntegrationTest {
|
||||
.returns(response -> response
|
||||
.body("data.result.size()", equalTo(3))
|
||||
.body("data.result.stream.server", everyItem(equalTo("127.0.0.1")))
|
||||
.body("data.result.stream.object", contains("prefix_", "prefix_bus_ticket", "prefix_comb"))
|
||||
.body("data.result.stream.owner", contains("_suffix", "wally_suffix", "jennifer_suffix"))
|
||||
.body("data.result.stream.default_value_test", contains("use_this_if_missing", "use_this_if_missing", "use_this_if_missing"))
|
||||
.body("data.result.stream.object", containsInAnyOrder("prefix_", "prefix_bus_ticket", "prefix_comb"))
|
||||
.body("data.result.stream.owner", containsInAnyOrder("_suffix", "wally_suffix", "jennifer_suffix"))
|
||||
.body("data.result.stream.default_value_test", containsInAnyOrder("use_this_if_missing", "use_this_if_missing", "use_this_if_missing"))
|
||||
.body("data.result.values",
|
||||
hasItems(
|
||||
hasItems(hasItems("LabelsContextSubstitutionTest - Test3")),
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class Log4jPatternsInLabelsTest extends IntegrationTest {
|
||||
.body("data.result.stream.server", everyItem(equalTo("127.0.0.1")))
|
||||
.body("data.result.stream.class_pattern", everyItem(equalTo("p.t.t.l.l.Log4jPatternsInLabelsTest")))
|
||||
.body("data.result.stream.sequence_number", contains("2", "1"))
|
||||
.body("data.result.stream.mdc_tid", contains("", "req-230rq9ubou"))
|
||||
.body("data.result.stream.mdc_tid", contains(null, "req-230rq9ubou"))
|
||||
.body("data.result.values",
|
||||
hasItems(
|
||||
hasItems(hasItems("Log4jPatternsInLabelsTest - Test2")),
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<username>tjahzi</username>
|
||||
<password>tjahzi</password>
|
||||
|
||||
|
||||
<ThresholdFilter level="ALL"/>
|
||||
<PatternLayout>
|
||||
<Pattern>[%t] %d{DEFAULT} %5p %c{1} - %m%n%exception{full}</Pattern>
|
||||
|
||||
@@ -4,42 +4,27 @@ server:
|
||||
http_listen_port: 3100
|
||||
log_level: debug
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
min_ready_duration: 0s
|
||||
final_sleep: 0s
|
||||
chunk_idle_period: 5m
|
||||
chunk_retain_period: 30s
|
||||
max_transfer_retries: 0
|
||||
common:
|
||||
ring:
|
||||
instance_addr: 127.0.0.1
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
path_prefix: /tmp/loki
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2018-04-15
|
||||
store: boltdb
|
||||
- from: 2020-05-15
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 168h
|
||||
period: 24h
|
||||
|
||||
storage_config:
|
||||
boltdb:
|
||||
directory: /loki/index
|
||||
|
||||
filesystem:
|
||||
directory: /loki/chunks
|
||||
directory: /tmp/loki/chunks
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
reject_old_samples: true
|
||||
reject_old_samples_max_age: 168h
|
||||
max_entries_limit_per_query: 10000
|
||||
|
||||
table_manager:
|
||||
retention_deletes_enabled: false
|
||||
retention_period: 0s
|
||||
allow_structured_metadata: false
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class IntegrationTest {
|
||||
public static Network network = Network.newNetwork();
|
||||
|
||||
@Container
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:2.3.0")
|
||||
public GenericContainer loki = new GenericContainer("grafana/loki:3.1.0")
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("loki")
|
||||
.withCommand("-config.file=/etc/loki-config.yaml")
|
||||
|
||||
@@ -4,42 +4,27 @@ server:
|
||||
http_listen_port: 3100
|
||||
log_level: debug
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
min_ready_duration: 0s
|
||||
final_sleep: 0s
|
||||
chunk_idle_period: 5m
|
||||
chunk_retain_period: 30s
|
||||
max_transfer_retries: 0
|
||||
common:
|
||||
ring:
|
||||
instance_addr: 127.0.0.1
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
path_prefix: /tmp/loki
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2018-04-15
|
||||
store: boltdb
|
||||
- from: 2020-05-15
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 168h
|
||||
period: 24h
|
||||
|
||||
storage_config:
|
||||
boltdb:
|
||||
directory: /loki/index
|
||||
|
||||
filesystem:
|
||||
directory: /loki/chunks
|
||||
directory: /tmp/loki/chunks
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
reject_old_samples: true
|
||||
reject_old_samples_max_age: 168h
|
||||
max_entries_limit_per_query: 10000
|
||||
|
||||
table_manager:
|
||||
retention_deletes_enabled: false
|
||||
retention_period: 0s
|
||||
allow_structured_metadata: false
|
||||
Reference in new issue
Block a user