librato / collectd-librato

Collectd Plugin for Librato Metrics
Apache License 2.0
38 stars 12 forks source link

librato plugin syntax error #9

Open bscott opened 11 years ago

bscott commented 11 years ago

Hey Guys,

I got the plugin working but after a few hours it stops sending metrics and I have to restart collectd service.

When I restart collectd, I get this error below, but if I open the conf file and do anything like remove a line return or even some whitespace and save the file, collectd is able to restart without a problem and metrics start to enter librato. Any Ideas?

Restarting statistics collection and monitoring daemon: collectdParse error in file /etc/collectd/plugins/librato.conf', line 54 near': syntax error, unexpected $end, expecting EOL yyparse returned error #1 configfile: Cannot read file /etc/collectd/plugins/librato.conf'. Parse error in file/etc/collectd/plugins/librato.conf', line 54 near ': syntax error, unexpected $end, expecting EOL yyparse returned error #1 configfile: Cannot read file/etc/collectd/plugins/librato.conf'.


librato.conf

<LoadPlugin "python"> Globals true

<Plugin "python">
    # collectd-librato.py is at /opt/collectd-librato-0.0.8/lib/collectd-librato.py
    ModulePath "/opt/collectd-librato-0.0.8/lib"

    Import "collectd-librato"

    <Module "collectd-librato">
        APIToken "<API TOKEN HERE>"
        Email    "blah@blah.com"
        Source "app01"
    </Module>
</Plugin>
bscott commented 11 years ago

I did noticed that my memory free starts to drop on the box after a while, maybe the plugin has a memory leak?

mheffner commented 11 years ago

@bscott Does your config file match the example here: https://github.com/librato/collectd-librato#example? Specifically, is the Globals true line wrapped in the <LoadPlugin> tags?

bscott commented 11 years ago

@mheffner Yes it is, I copied a copy of my config above.

mheffner commented 11 years ago

@bscott Hrm, not sure what's going on here then. I haven't seen this issue before.

What version of collectd are you using? Next time this happens can you bundle all of the collectd configuration files and post them? Is it possible there is some config management software that is overwriting the conf files?

bscott commented 11 years ago

I use chef for config management but the same config exists in chef, should I have Chef stop collectd before appying the config?

Matter of fact, I'll just give that a try

Brian Scott - IT/Ops Guy, Ruby/Rails Guy, all around Good Guy. Email: brainscott@gmail.com / b@bscott.me Web: http://blog.bscott.me Github: http://github.com/bscott http://github.com/bscott Opscode: bscott

On Thu, May 23, 2013 at 10:52 AM, Mike Heffner notifications@github.comwrote:

@bscott https://github.com/bscott Hrm, not sure what's going on here then. I haven't seen this issue before.

What version of collectd are you using? Next time this happens can you bundle all of the collectd configuration files and post them? Is it possible there is some config management software that is overwriting the conf files?

— Reply to this email directly or view it on GitHubhttps://github.com/librato/collectd-librato/issues/9#issuecomment-18360152 .

mheffner commented 11 years ago

How are you chef'ing this? Did you see the cookbook here? https://github.com/librato/collectd-librato-cookbook

From your description of the problem it sounds like there could be a scenario where Chef is updating these config files during a later Chef client run (possibly with a config file error), sending a SIGHUP or restart to collectd, which then causes collectd to stop sending metric data because the config files are now wrong.

bscott commented 11 years ago

Thats the cookbook I'm using

Brian Scott - IT/Ops Guy, Ruby/Rails Guy, all around Good Guy. Email: brainscott@gmail.com / b@bscott.me Web: http://blog.bscott.me Github: http://github.com/bscott http://github.com/bscott Opscode: bscott

On Thu, May 23, 2013 at 11:10 AM, Mike Heffner notifications@github.comwrote:

How are you chef'ing this? Did you see the cookbook here? https://github.com/librato/collectd-librato-cookbook

From your description of the problem it sounds like there could be a scenario where Chef is updating these config files during a later Chef client run (possibly with a config file error), sending a SIGHUP or restart to collectd, which then causes collectd to stop sending metric data because the config files are now wrong.

— Reply to this email directly or view it on GitHubhttps://github.com/librato/collectd-librato/issues/9#issuecomment-18361312 .

bscott commented 11 years ago

Thanks!, think I can fix it from here but the plugin does seem to take about 75% of ram and then release it after some given time, just wondering if anyone has ran into memory issues with this plugin. Might use collectd in a client server setup.