Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set as warning log message when the buffer is full #820

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading