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

expecting a version value in the range 1-999 [col 5] #4687

Closed
Touchedegris opened this issue Sep 13, 2018 · 15 comments
Closed

expecting a version value in the range 1-999 [col 5] #4687

Touchedegris opened this issue Sep 13, 2018 · 15 comments
Labels
area/syslog bug unexpected problem or unintended behavior docs Issues related to Telegraf documentation and configuration descriptions
Milestone

Comments

@Touchedegris
Copy link

Relevant telegraf.conf:

[[inputs.syslog]]
server = "udp://:6514"

System info:

CentOS 7 with official Docker container 1.7.4

Syslog messages sent from a network switch.

Actual behavior:

Receive the following error message everytime telegraf receives a syslog message:

E! Error in plugin [inputs.syslog]: expecting a version value in the range 1-999 [col 5]

@danielnelson
Copy link
Contributor

Can you capture a syslog message? It might be a bit different with docker container but it should be something along the lines of:

sudo tcpdump -A -i lo 'udp port 6514' -w syslog.pcap

@danielnelson danielnelson added bug unexpected problem or unintended behavior area/syslog labels Sep 14, 2018
@danielnelson
Copy link
Contributor

There is a good change this is the same issue as #4593, but we will be able tell from the packet capture.

@Touchedegris
Copy link
Author

Hi,
I did not have the chance to do my packet capture yet but I do confirm that my equipment does support syslog RFC 5424. I went through the RFC 5424 and they refer to IANA for versin registration. In both the RFC and IANA document, there seems to be only Version 1 registered. I will confirm if the versin number is sent from my switch, but would it be a good idea to user version 1 if the version number is not provided in the message?

@Touchedegris
Copy link
Author

Here is the packet capture. As I was expecting, there is no version between the priority field and the date.
syslog_packet.zip

@shamsherdullet
Copy link

I have the same issue with Telegraf v1.7.3

Sample packet below.
image

@danielnelson
Copy link
Contributor

Both captures are in RFC3164 format, you can quickly because the log time is not in RFC3339 format.

I will add some additional documentation around this issue but please watch #4593 for the latest updates on adding support. You might also be able to use the workaround in that issue, using rsyslog to perform the conversion.

@Touchedegris
Copy link
Author

Haha that's a good point! I will forward the info the the manufacturer so he modifies it's datasheet or code! I will follow your yread for sure! Thanks for the help.

@leodido
Copy link
Contributor

leodido commented Sep 28, 2018

A parser for RFC3164 is in the making but not top priority right now.

A branch living here https://github.com/influxdata/go-syslog/tree/feature/rfc3164 exists.

@danielnelson should this be closed for now?

@russorat russorat added the docs Issues related to Telegraf documentation and configuration descriptions label Oct 1, 2018
@russorat russorat added this to the 1.8.1 milestone Oct 1, 2018
@danielnelson
Copy link
Contributor

I added a little blurb about RFC 3164 support. We will keep #4593 open as a feature request until we have support.

https://github.com/influxdata/telegraf/tree/master/plugins/inputs/syslog#rfc3164

@msjuck
Copy link

msjuck commented Feb 19, 2019

I added a little blurb about RFC 3164 support. We will keep #4593 open as a feature request until we have support.

https://github.com/influxdata/telegraf/tree/master/plugins/inputs/syslog#rfc3164

Could you give me a hint for adopting rfc3164 syslog message?

I don't understand "You can use rsyslog to translate RFC3164 syslog messages into RFC5424 format."

@danielnelson
Copy link
Contributor

RSYSLOG is a popular syslog daemon which comes preinstalled on all major Linux distributions, it will accept syslog messages in RFC3164 format and can relay them to Telegraf in RFC5424 format. Check the readme for this plugin for some info about configuring rsyslog -> Telegraf communication.

@leodido
Copy link
Contributor

leodido commented Feb 20, 2019

By chance I just posted a blog post about the setup of the telegraf syslog input plugin with rsyslog.

It presents the whole setup (with companion code) but if you are only interested in rsyslog and its scripting/configuration probably you can jump to the appendix of the blog post.

@msjuck
Copy link

msjuck commented Feb 25, 2019

RSYSLOG is a popular syslog daemon which comes preinstalled on all major Linux distributions, it will accept syslog messages in RFC3164 format and can relay them to Telegraf in RFC5424 format. Check the readme for this plugin for some info about configuring rsyslog -> Telegraf communication.

thank you so much, but i try translation forwarding but some log seems not convert to new format. So. I decided make my own version to accept old syslog format!

@phromo
Copy link

phromo commented Jan 30, 2020

RSYSLOG is a popular syslog daemon which comes preinstalled on all major Linux distributions, it will accept syslog messages in RFC3164 format and can relay them to Telegraf in RFC5424 format. Check the readme for this plugin for some info about configuring rsyslog -> Telegraf communication.

I also don't understand "You can use rsyslog to translate RFC3164 syslog messages into RFC5424 format.". The blog post linked by leodido doesn't seem to adress this issue, and in the readme of the plugin it states how to configure forwarding, but not translation.

A resource where the translation is examplified would be very useful. I imagine creating a rsyslog TCP input, ... but then?

@danielnelson
Copy link
Contributor

@phromo The translation between formats should happen as part of the rsyslog forwarding. Could you open a new issue requesting documentation for this setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/syslog bug unexpected problem or unintended behavior docs Issues related to Telegraf documentation and configuration descriptions
Projects
None yet
Development

No branches or pull requests

7 participants