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

Read configuration issue #31

Closed
Raphux opened this issue Aug 21, 2014 · 4 comments
Closed

Read configuration issue #31

Raphux opened this issue Aug 21, 2014 · 4 comments

Comments

@Raphux
Copy link

Raphux commented Aug 21, 2014

Hi there,

I can't find a way to run log-courier. It says that something is wrong in my confile, but I'm using a provided conf file from «log-courier-0.12/docs/examples/*».

I guess I'm doing something wrong :

root@pla121lx057:/etc/log-courier# log-courier -config="/etc/log-courier/log-courier.conf" -config-test
Configuration test failed: invalid character '}' looking for beginning of object key string
root@pla121lx057:/etc/log-courier# cat "/etc/log-courier/log-courier.conf"
{
        "network": {
                "servers": [ "localhost:5043" ],
                        "ssl ca": "./logstash.cer",
        },
                "files": [
                {
                        "paths": [ "/var/log/httpd/access.log" ],
                        "fields": { "type": "apache" }
                }
        ]
}
root@pla121lx057:/etc/log-courier# log-courier -version
Log Courier version 0.12
root@pla121lx057:/etc/log-courier#

(I tried with my real parameters, a good CA file, good logstash server, and other log files : same result)

Can anyone point me what I'm doing wrong ?

@driskell
Copy link
Owner

At the end of the SSL ca line, remove the comma. It should work then.

If that's in one of the examples I'm really sorry! I'll get it patched up ASAP.

@deviantony
Copy link

Log-courier use JSON for its configuration, I recommend the usage of a JSON validator such as : http://jsonformatter.curiousconcept.com/

Here is your corrected configuration:

{
        "network": {
                "servers": [ "localhost:5043" ],
                        "ssl ca": "./logstash.cer"
        },
                "files": [
                {
                        "paths": [ "/var/log/httpd/access.log" ],
                        "fields": { "type": "apache" }
                }
        ]
}

@Raphux
Copy link
Author

Raphux commented Aug 22, 2014

Thanks both of you.
@driskell : yes it seems that it is an error in all the examples you provide, except the one concerning ZMQ.

Anyway, I should have seen the mistake myself.

Thanks again.

@Raphux Raphux closed this as completed Aug 22, 2014
@driskell
Copy link
Owner

@Raphux No worries. Sorry about that.

I've fixed this in my local repository earlier this morning. It'll be pushed up later this weekend hopefully as I have some other changes and need to test it through first.

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