collectd-librato icon indicating copy to clipboard operation
collectd-librato copied to clipboard

librato plugin syntax error

Open bscott opened this issue 11 years ago • 8 comments

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 </LoadPlugin>

<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    "[email protected]"
        Source "app01"
    </Module>
</Plugin>

bscott avatar May 23 '13 14:05 bscott

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

bscott avatar May 23 '13 14:05 bscott

@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?

mheffner avatar May 23 '13 14:05 mheffner

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

bscott avatar May 23 '13 15:05 bscott

@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?

mheffner avatar May 23 '13 17:05 mheffner

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: [email protected] / [email protected] 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 [email protected]:

@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 .

bscott avatar May 23 '13 18:05 bscott

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.

mheffner avatar May 23 '13 18:05 mheffner

Thats the cookbook I'm using

Brian Scott - IT/Ops Guy, Ruby/Rails Guy, all around Good Guy. Email: [email protected] / [email protected] 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 [email protected]:

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 avatar May 23 '13 18:05 bscott

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.

bscott avatar May 23 '13 19:05 bscott