Git Product home page Git Product logo

collectd-librato's People

Contributors

akerekes avatar criccomini avatar josephruscio avatar librato-peter avatar mheffner avatar obfuscurity avatar ttimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collectd-librato's Issues

Tag release 0.0.3

we're adding this to our chef recipes, need this version to be easily accessible, thanks!

floor_time_secs KeyError

I am still pretty new to collectd. Playing around with this plugin I got an error:

Oct 29 12:26:18 titan collectd[20703]: Unhandled python exception in write callback: KeyError: 'floor_time_secs', file: collectd-librato.py,

I popped it in a try block:
# Floor measure time?
m_time = int(v.time)
try:
if config['floor_time_secs']:
m_time /= config['floor_time_secs']
m_time *= config['floor_time_secs']
except:
pass

This is around line 311.

I am also pretty new to open source collaboration. I can certainly edit the file and check in the change. I haven't done it before to someone else's repository, but, if this is a valid change I'd be happy to try it.

Best,
-greg

urllib2 throwing IOError

Been attempting to deploy the collectd-librato plugin using the Chef cookbook as well. I am able to successfully run the cookbook and launch collectd, however it looks like urllib2 is reaching an IOError:

Mar 25 17:55:31 localhost.localdomain collectd[11012]: Collectd-Librato.py: Error when sending metrics Librato ([Errno 13] Permission denied)
Mar 25 17:56:01 localhost.localdomain collectd[11012]: Collectd-Librato.py: Error when sending metrics Librato ([Errno 13] Permission denied)

Here is my configuration for the plugin:

# This file autogenerated by Chef
# Do not edit, changes will be overwritten
<LoadPlugin python>
  Globals true
</LoadPlugin>

<Plugin python>
  ModulePath "/usr/lib64/collectd"
  ModulePath "/opt/collectd-librato-0.0.10/lib"
  Import "collectd-librato"

  <Module "collectd-librato">
    APIToken "#####"
    Email "######"
  </Module>
</Plugin>

I'm assuming this is a permissions issue, however unsure the files in question that would be causing this.

Allow an explicit source name override

Collectd-librato uses the configured Hostname from the main collectd configuration as the metric source name. Add an option to collectd-librato's configuration section that allows the source name to be overridden.

`IncludeRegex` having unexpected results

Hello, here is a snippet of my collectd configuration:

    <LoadPlugin "python">
        Globals true
    </LoadPlugin>
    <Plugin "python">
        # collectd-librato.py is at /opt/collectd-librato-0.0.10/lib/collectd-librato.py
        ModulePath "/opt/collectd-librato-0.0.10/lib"
        Import "collectd-librato"
        <Module "collectd-librato">
            Email "<email>"
            APIToken "<token>"
            LowercaseMetricNames true
            MetricPrefix ""
            IncludeRegex "^cpu\..+$,^df\.mnt.+$,^df\.root\..+$,^memory\.memory\..+$,^ping\.ping_droprate\..+$,^swap\.swap\..+$"
        </Module>
    </Plugin>

For the most part this configuration is working as expected, however the swap.swap_io.in and swap.swap_io.out metrics are being not being filtered out.

I do not believe this to be a problem with the regex, as the following Python snippets properly filter out those metrics:

>>> import re
>>> "^cpu\..+$,^df\.mnt.+$,^df\.root\..+$,^memory\.memory\..+$,^ping\.ping_droprate\..+$,^swap\.swap\..+$".split(',')[5]
'^swap\\.swap\\..+$'
>>> re.match("^cpu\..+$,^df\.mnt.+$,^df\.root\..+$,^memory\.memory\..+$,^ping\.ping_droprate\..+$,^swap\.swap\..+$".split(',')[5], "swap.swap.cached")
<_sre.SRE_Match object at 0x10465d168>
>>> re.match("^cpu\..+$,^df\.mnt.+$,^df\.root\..+$,^memory\.memory\..+$,^ping\.ping_droprate\..+$,^swap\.swap\..+$".split(',')[5], "swap.swap_io.in")
>>> 

Any help would be greatly appreciated.

librato plugin syntax error

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

Python 2.6.6 runtime error

running 0.0.2 of collectd-librato on debian 6, and python 2.6.6 getting the following error when checking my collectd config with the -t flag:

unhandled python exception in loading module: AttributeError: 'tuple' object has no attribute 'major'

I believe I've tracked down this issue to the following line:
https://github.com/librato/collectd-librato/blob/master/lib/collectd-librato.py#L117

if I run python REPL, and type sys.version_info, the tuple I get in py 2.6 looks like this:
(2, 6, 6, 'final', 0)

calling major on that results in an identical error message. I could patch this, but I am uncertain how you'd like to handle this scenario.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.