Skip to content

Simple Python-based plugin to report request times for specific requests to specific nameservers

License

Notifications You must be signed in to change notification settings

dudefellah/collectd-dns_request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNS Requester Plugin for Collectd

This plugin was created to make it easy to ensure that a local (authoritative) DNS server is responding to requests in an appropriate amount of time. Since all the plugin does is report on the amount of time a DNS request took, this could be used for any DNS response time tracking need. For example, it could be quite useful if you're trying to see how DNS latency is affecting overall network latency.

DNS requests are made using the dns.resolver module from (dnspython)[http://www.dnspython.org]. You should be able to recognize some of the "request" options in the configuration section as arguments you can pass along to dns.resolver's query function, so if you want a little more information on how they're used, please check the dnspython documentation.

Installation

You can use setup.py (setuptools) to install the plugin automatically.

If you'd like to do it manually, this plugin should be as easy to install as any other plugin for collectd. Simply add dns_request.py to your plugin path. Collectd looks at sys.path in order to find any Python plugins, and you can add additional search paths for your plugin with the ModulePath keyword in the Python section of collectd.conf.

Configuration

<Plugin "python">
...

    Import "dns_request"
    <Module "dns_request">
        <Request "request_title">
            Query "google.ca"
            Server "8.8.8.8"    # Optional: Default is whatever is in /etc/resolv.conf
            Timeout 10          # Optional: Default 5 seconds
            SourceIP "1.2.3.4"  # Optional: Server default IP
            SourcePort 123456   # Optional: Default is "0" (automatic local port selection)
        </Request>
    </Module>
</Plugin>

Dependencies

The dependency versions have been set to the versions I used (the standard versions available in Debian Jessie). Previous versions may very well work, so if you are running a previous verison of these modules, you can try lowering the version limit.

Debian package

A debian/ path has been added, but packaging hasn't really been checked very much. It may or may not work.

About

Simple Python-based plugin to report request times for specific requests to specific nameservers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages