Plugin:cURL-JSON/ArangoDB

From collectd Wiki
Jump to: navigation, search

This page contains some example configurations for the cURL-JSON plugin. This page is meant as a cookbook, so if you have a configuration for an aspect not handled here or a daemon not present, please feel free to add anything that's useful for you.

ArangoDB database

The ArangoDB database server exposes statistics in its Aardvark webinterface; We will use collecd to aggregate these values using the cURL-JSON plugin.


Add the following configuration to your collectd.conf.

# collectd.conf
TypesDB "/etc/collectd/collectd.conf.d/arangodb_types.db"
TypesDB "/usr/share/collectd/types.db"
LoadPlugin "curl_json"
…
 <Plugin curl_json>
 # See: http://arangodb.org/
  <URL "http://localhost:8529/_db/_system/_admin/aardvark/statistics/short">
    # User "foo"
    # Password "bar"
    <Key "totalTimeDistributionPercent/values/0">
      Type "totalTimeDistributionPercent_values"
    </Key>
    <Key "totalTimeDistributionPercent/cuts/0">
      Type "totalTimeDistributionPercent_cuts"
    </Key>
    <Key "requestTimeDistributionPercent/values/0">
      Type "requestTimeDistributionPercent_values"
    </Key>
    <Key "requestTimeDistributionPercent/cuts/0">
      Type "requestTimeDistributionPercent_cuts"
    </Key>
    <Key "queueTimeDistributionPercent/values/0">
      Type "queueTimeDistributionPercent_values"
    </Key>
    <Key "queueTimeDistributionPercent/cuts/0">
      Type "queueTimeDistributionPercent_cuts"
    </Key>
    <Key "bytesSentDistributionPercent/values/0">
      Type "bytesSentDistributionPercent_values"
    </Key>
    <Key "bytesSentDistributionPercent/cuts/0">
      Type "bytesSentDistributionPercent_cuts"
    </Key>
    <Key "bytesReceivedDistributionPercent/values/0">
      Type "bytesReceivedDistributionPercent_values"
    </Key>
    <Key "bytesReceivedDistributionPercent/cuts/0">
      Type "bytesReceivedDistributionPercent_cuts"
    </Key>
    <Key "numberOfThreadsCurrent">
      Type "gauge"
    </Key>
    <Key "numberOfThreadsPercentChange">
      Type "gauge"
    </Key>
    <Key "virtualSizeCurrent">
      Type "gauge"
    </Key>
    <Key "virtualSizePercentChange">
      Type "gauge"
    </Key>
    <Key "residentSizeCurrent">
      Type "gauge"
    </Key>
    <Key "residentSizePercent">
      Type "gauge"
    </Key>
    <Key "asyncPerSecondCurrent">
      Type "gauge"
    </Key>
    <Key "asyncPerSecondPercentChange">
      Type "gauge"
    </Key>
    <Key "syncPerSecondCurrent">
      Type "gauge"
    </Key>
    <Key "syncPerSecondPercentChange">
      Type "gauge"
    </Key>
    <Key "clientConnectionsCurrent">
      Type "gauge"
    </Key>
    <Key "clientConnectionsPercentChange">
      Type "gauge"
    </Key>
    <Key "physicalMemory">
      Type "gauge"
    </Key>
    <Key "nextStart">
      Type "gauge"
    </Key>
    <Key "waitFor">
      Type "gauge"
    </Key>
    <Key "numberOfThreads15M">
      Type "gauge"
    </Key>
    <Key "numberOfThreads15MPercentChange">
      Type "gauge"
    </Key>
    <Key "virtualSize15M">
      Type "gauge"
    </Key>
    <Key "virtualSize15MPercentChange">
      Type "gauge"
    </Key>
    <Key "asyncPerSecond15M">
      Type "gauge"
    </Key>
    <Key "asyncPerSecond15MPercentChange">
      Type "gauge"
    </Key>
    <Key "syncPerSecond15M">
      Type "gauge"
    </Key>
    <Key "syncPerSecond15MPercentChange">
      Type "gauge"
    </Key>
    <Key "clientConnections15M">
      Type "gauge"
    </Key>
    <Key "clientConnections15MPercentChange">
      Type "gauge"
    </Key>
 </URL>
</Plugin>
  • URL defines the URL where arangod listens; if you use collectd on the same machine, the above specified host & port are ok for you.
  • Adjust (and uncomment) User & Password with a user to your ArangoDB.

We will create a custom types.db (we configured it to /etc/collectd/collectd.conf.d/arangodb_types.db above) and add these types:

totalTimeDistributionPercent_values		value:GAUGE:U:U
totalTimeDistributionPercent_cuts		value:GAUGE:U:U
requestTimeDistributionPercent_values		value:GAUGE:U:U
requestTimeDistributionPercent_cuts		value:GAUGE:U:U
queueTimeDistributionPercent_values		value:GAUGE:U:U
queueTimeDistributionPercent_cuts		value:GAUGE:U:U
bytesSentDistributionPercent_values		value:GAUGE:U:U
bytesSentDistributionPercent_cuts		value:GAUGE:U:U
bytesReceivedDistributionPercent_values		value:GAUGE:U:U
bytesReceivedDistributionPercent_cuts		value:GAUGE:U:U


  • requires at least collectd 5.4.2 to work.

References

Personal tools
Namespaces

Variants
Actions
Navigation
Tools