I’m using syslog-ng to collect logs from remote devices, and I’m forwarding these logs to InfluxDB using custom Python destinations. The configuration works well for most logs, but I have an issue with WebRTC logs. These logs are longer, and they are getting cut off in the middle. The WebRTC stats are in a log file with other log entries, and only the entries with WebRTC stats are affected. Shorter log entries are processed correctly.
These are the relevant parts of my config file
source s_skatrone {
network(
ip(0.0.0.0)
port(10823)
keep-hostname(yes)
flags(no-parse)
);
};
parser p_skatrone {
csv-parser(
columns("HOSTNAME", "FILENAME", "LOG_CONTENT")
delimiters(";")
flags(strip-whitespace)
);
};
parser p_hostname_mapping {
add-contextual-data(
selector("${HOSTNAME}")
database("/etc/syslog-ng/ONE_hostname_mapping.csv")
default-selector("unknown-host")
);
};
filter f_unit_analytics {
match ("unit_analytics" value("FILENAME"));
};
destination d_skatrone {
file(
"/var/log/skatr-one/${HOSTNAME}/${YEAR}-${MONTH}-${DAY}/${FILENAME}.log"
create_dirs(yes)
dir-perm(0755)
perm(0644)
dir-owner(skatr)
owner(skatr)
group(skatr)
template("${LOG_CONTENT}n")
);
};
destination d_influxdb_webrtc {
python(
class("influxdb_webrtc_destination.WebRTCInfluxDBDestination")
batch-lines(1000)
options(
"url" "`influxdb_url`"
"token" "`influxdb_token`"
"org" "`influxdb_org`"
"bucket" "skatr-one-v2-webrtc"
)
);
};
log {
source(s_skatrone);
parser(p_skatrone);
parser(p_hostname_mapping);
filter(f_unit_analytics);
destination(d_skatrone);
destination(d_influxdb_webrtc);
# flags(flow-control);
};
log {
source(s_skatrone);
parser(p_skatrone);
parser(p_hostname_mapping);
filter(f_tablet_states);
destination(d_skatrone);
destination(d_influxdb_tablet_states);
# flags(flow-control);
};
Versions:
The host is running Ubuntu server 23.04
syslog-ng 4 (4.7.1)
Python 3.10.12
InfluxDB shell version: 1.6.7~rc0
I tried checking the logs on the client side, where the webRTC logs are complete.
Toon Peters is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.