We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
telegraf.conf
[[inputs.syslog]] server = "udp://localhost:6514" [[inputs.syslog]] server = "tcp://localhost:6514" [[outputs.file]] files = [ "stdout" ]
I have a docker stack for a simple telegraf that listens for syslog packets and outputs to stdout
docker-compose.yml
version: '3.6' networks: monitoring: configs: telegraf.conf: external: true services: # Define a Telegraf service telegraf: image: telegraf configs: - source: telegraf.conf target: /etc/telegraf/telegraf.conf networks: - monitoring ports: - "8092:8092/udp" - "8094:8094" - "8125:8125/udp" - "6514:6514" - "6514:6514/udp"
docker config create telegraf.conf ./telegraf.conf docker stack deploy -c docker-compose.yml tick
docker service logs tick_telegraf
According to the documentation, it should be possible to have multiple input plugins.
I'm getting the following logs and the container keeps restarting.
I! Starting Telegraf 1.9.3, I! Using config file: /etc/telegraf/telegraf.conf, I! Loaded inputs: inputs.syslog inputs.syslog, I! Loaded aggregators: , I! Loaded processors: , I! Loaded outputs: file, I! Tags enabled: host=e4b1b569c08d, I! [agent] Config: Interval:10s, Quiet:false, Hostname:"e4b1b569c08d", Flush Interval:10s, E! [agent] Service for input inputs.syslog failed to start: missing protocol within address ':6514', E! [telegraf] Error running agent: missing protocol within address ':6514',
When I try just with a single [[input.syslog]] it works fine.
[[input.syslog]]
After starting the stack with a single TCP
[[inputs.syslog]] server = "tcp://localhost:6514"
after running echo "57 <13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc 127.0.0.1 6514
echo "57 <13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc 127.0.0.1 6514
I get
2019-02-02T23:16:23Z I! Starting Telegraf 1.9.3, 2019-02-02T23:16:23Z I! Using config file: /etc/telegraf/telegraf.conf, 2019-02-02T23:16:23Z I! Loaded inputs: inputs.syslog, 2019-02-02T23:16:23Z I! Loaded aggregators: , 2019-02-02T23:16:23Z I! Loaded processors: , 2019-02-02T23:16:23Z I! Loaded outputs: file, 2019-02-02T23:16:23Z I! Tags enabled: host=f158f7e23400, 2019-02-02T23:16:23Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"f158f7e23400", Flush Interval:10s, syslog,appname=root,facility=user,host=f158f7e23400,hostname=example.org,severity=notice version=1i,severity_code=5i,facility_code=1i,timestamp=1538395200000000000i,message="test" 1549149411602523900, syslog,appname=root,facility=user,host=f158f7e23400,hostname=example.org,severity=notice version=1i,severity_code=5i,facility_code=1i,timestamp=1538395200000000000i,message="test" 1549149444157521600,
With UDP it works with some errors in the plugin, but it seems to get the message (maybe another bug?).
After starting the stack with a single UDP
after running echo "<13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc -u 127.0.0.1 6514
echo "<13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc -u 127.0.0.1 6514
[[inputs.syslog]] server = "udp://localhost:6514"
2019-02-02T23:12:19Z I! Starting Telegraf 1.9.3, 2019-02-02T23:12:19Z I! Using config file: /etc/telegraf/telegraf.conf, 2019-02-02T23:12:19Z I! Loaded inputs: inputs.syslog, 2019-02-02T23:12:19Z I! Loaded aggregators: , 2019-02-02T23:12:19Z I! Loaded processors: , 2019-02-02T23:12:19Z I! Loaded outputs: file, 2019-02-02T23:12:19Z I! Tags enabled: host=877526f8951d, 2019-02-02T23:12:19Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"877526f8951d", Flush Interval:10s, 2019-02-02T23:12:22Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:22Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:22Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:22Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], syslog,appname=root,facility=user,host=877526f8951d,hostname=example.org,severity=notice facility_code=1i,timestamp=1538395200000000000i,message="test",version=1i,severity_code=5i 1549149142336317200, 2019-02-02T23:12:36Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:36Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:36Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], 2019-02-02T23:12:36Z E! [inputs.syslog]: Error in plugin: expecting a priority value within angle brackets [col 0], syslog,appname=root,facility=user,host=877526f8951d,hostname=example.org,severity=notice version=1i,severity_code=5i,facility_code=1i,timestamp=1538395200000000000i,message="test" 1549149156288226500,
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Relevant telegraf.conf:
telegraf.conf
System info:
I have a docker stack for a simple telegraf that listens for syslog packets and outputs to stdout
docker-compose.yml
Steps to reproduce:
docker service logs tick_telegraf
Expected behavior:
According to the documentation, it should be possible to have multiple input plugins.
I'm getting the following logs and the container keeps restarting.
Actual behavior:
Additional info:
When I try just with a single
[[input.syslog]]
it works fine.Single TCP
After starting the stack with a single TCP
after running
echo "57 <13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc 127.0.0.1 6514
I get
Single UDP
With UDP it works with some errors in the plugin, but it seems to get the message (maybe another bug?).
After starting the stack with a single UDP
after running
echo "<13>1 2018-10-01T12:00:00.0Z example.org root - - - test" | nc -u 127.0.0.1 6514
The text was updated successfully, but these errors were encountered: