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

Display an error if a particular config line is malformed #43

Closed
leonsodhi opened this issue Oct 9, 2014 · 2 comments
Closed

Display an error if a particular config line is malformed #43

leonsodhi opened this issue Oct 9, 2014 · 2 comments
Milestone

Comments

@leonsodhi
Copy link

Currently, r_s2 won't complain if the following config is used:

files:
  /home/leon/test.log
destination:
  host: HOST.papertrailapp.com
  port: PORT
  protocol: tls

Output:

sudo ./remote_syslog -c ./example_config.yml -D
2014-10-09 18:38:13 INFO  remote_syslog.go:114 Connecting to HOST.papertrailapp.com:PORT over tls

No files are being monitored but it's not clear why that's the case.

@chmac
Copy link

chmac commented Nov 8, 2016

I was just kicked in the teeth by this same error. We had protocol: UDP which I eventually realised from the strace logs is invalid. But I didn't get any error from remote_syslog itself. I'd suggest that remote_syslog fail to start if the config file is invalid, otherwise it's a real brain bender to track down.

@snorecone snorecone added this to the 0.19 milestone Nov 23, 2016
@snorecone
Copy link
Contributor

I'm closing this since invalid port strings such as "PORT" will cause remote_syslog to cease startup as of v0.19:

cannot parse 'Destination.Port' as int: strconv.ParseInt: parsing "PORT": invalid syntax

If there are other config options that should be validated in a special way, I'd open an issue for each specific option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants