Skip to content

Commit

Permalink
set as warning log message when the buffer is full (#820)
Browse files Browse the repository at this point in the history
* set as warning log message when the buffer is full
* Update docs
  • Loading branch information
dmachard authored Sep 23, 2024
1 parent 0426b54 commit f7a6a72
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
- [`Scalyr`](docs/loggers/logger_scalyr.md)
- [`Redis`](docs/loggers/logger_redis.md) publisher
- [`Kafka`](docs/loggers/logger_kafka.md) producer
- [`ClickHouse`](docs/loggers/logger_clickhouse.md) client *(not yet production ready)*
- [`ClickHouse`](docs/loggers/logger_clickhouse.md) client
- *Send to security tools*
- [`Falco`](docs/loggers/logger_falco.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ global:
The `interval-monitor` in second(s) is used to count every XX second the number of in/out packets.

The `buffer-size` settings enable to adjust the size of the buffer before discard additional packets. If you encounter the error message buffer is full, xxx packet(s) dropped, consider increasing this parameter to prevent message drops.
The `buffer-size` settings enable to adjust the size of the buffer before discard additional packets. If you encounter the warning message buffer is full, xxx packet(s) dropped, consider increasing this parameter to prevent message drops.

```yaml
global:
Expand Down
4 changes: 2 additions & 2 deletions docs/performance.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Performance tuning

All loggers and collectors are based on buffered channels.
The size of these buffers can be configured with `chan-buffer-size`.
If you encounter the following error message in your logs, it indicates that you need to increase the chan-buffer-size:
The size of these buffers can be configured with `buffer-size` in global section.
If you encounter the following warning message in your logs, it indicates that you need to increase the buffer size:

```bash
logger[elastic] buffer is full, 7855 packet(s) dropped
Expand Down
4 changes: 2 additions & 2 deletions workers/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (w *ElasticSearchClient) StartLogging() {
select {
case dataBuffer <- bufCopy:
default:
w.LogError("Send buffer is full, bulk dropped")
w.LogWarning("Send buffer is full, bulk dropped")
}
}

Expand All @@ -183,7 +183,7 @@ func (w *ElasticSearchClient) StartLogging() {
select {
case dataBuffer <- bufCopy:
default:
w.LogError("automatic flush, send buffer is full, bulk dropped")
w.LogWarning("automatic flush, send buffer is full, bulk dropped")
}
}

Expand Down
2 changes: 1 addition & 1 deletion workers/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (w *GenericWorker) Monitor() {
case <-timerMonitor.C:
for v, k := range w.droppedWorkerCount {
if k > 0 {
w.LogError("worker[%s] buffer is full, %d dnsmessage(s) dropped", v, k)
w.LogWarning("worker[%s] buffer is full, %d dnsmessage(s) dropped", v, k)
w.droppedWorkerCount[v] = 0
}
}
Expand Down

0 comments on commit f7a6a72

Please sign in to comment.