mirror of https://gitee.com/bigwinds/arangodb
Doc - Update Monitoring/Collectd Cookbook (#5228)
This commit is contained in:
parent
349e2c1681
commit
4fc6e64266
|
@ -61,138 +61,224 @@ For the RRD we will go pretty much with defaults:
|
|||
|
||||
### cURL JSON
|
||||
|
||||
`Collectd` comes with a wide range of metric aggregation plug-ins. Many tools today use [JSON](http://json.org) as data formating grammar; so does ArangoDB. Therefore a plug-in offering to fetch JSON documents via HTTP is the perfect match as an integration interface:
|
||||
`Collectd` comes with a wide range of metric aggregation plug-ins.
|
||||
Many tools today use [JSON](http://json.org) as data formatting grammar; so does ArangoDB.
|
||||
|
||||
Therefore a plug-in offering to fetch JSON documents via HTTP is the perfect match to query ArangoDBs [administrative Statistics interface](../../HTTP/AdministrationAndMonitoring/#read-the-statistics):
|
||||
|
||||
# Load the plug-in:
|
||||
LoadPlugin curl_json
|
||||
# we need to use our own types to generate individual names for our gauges:
|
||||
TypesDB "/etc/collectd/collectd.conf.d/arangodb_types.db"
|
||||
# TypesDB "/etc/collectd/arangodb_types.db"
|
||||
<Plugin curl_json>
|
||||
# Adjust the URL so collectd can reach your arangod:
|
||||
<URL "http://localhost:8529/_db/_system/_admin/aardvark/statistics/short">
|
||||
# Set your authentication to Aardvark here:
|
||||
# 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">
|
||||
<URL "http://localhost:8529/_db/_system/_admin/statistics">
|
||||
# Set your authentication to Aardvark here:
|
||||
User "root"
|
||||
# Password "bar"
|
||||
<Key "http/requestsTotal">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "numberOfThreadsPercentChange">
|
||||
</Key>
|
||||
<Key "http/requestsPatch">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "virtualSizeCurrent">
|
||||
</Key>
|
||||
<Key "http/requestsPut">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "virtualSizePercentChange">
|
||||
</Key>
|
||||
<Key "http/requestsOther">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "residentSizeCurrent">
|
||||
</Key>
|
||||
<Key "http/requestsAsync">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "residentSizePercent">
|
||||
</Key>
|
||||
<Key "http/requestsPost">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "asyncPerSecondCurrent">
|
||||
</Key>
|
||||
<Key "http/requestsOptions">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "asyncPerSecondPercentChange">
|
||||
</Key>
|
||||
<Key "http/requestsHead">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "syncPerSecondCurrent">
|
||||
</Key>
|
||||
<Key "http/requestsGet">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "syncPerSecondPercentChange">
|
||||
</Key>
|
||||
<Key "http/requestsDelete">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "clientConnectionsCurrent">
|
||||
</Key>
|
||||
|
||||
|
||||
<Key "system/minorPageFaults">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "clientConnectionsPercentChange">
|
||||
</Key>
|
||||
<Key "system/majorPageFaults">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "physicalMemory">
|
||||
</Key>
|
||||
<Key "system/userTime">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "nextStart">
|
||||
</Key>
|
||||
<Key "system/systemTime">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "waitFor">
|
||||
</Key>
|
||||
<Key "system/numberOfThreads">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "numberOfThreads15M">
|
||||
</Key>
|
||||
<Key "system/virtualSize">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "numberOfThreads15MPercentChange">
|
||||
</Key>
|
||||
<Key "system/residentSize">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "virtualSize15M">
|
||||
</Key>
|
||||
<Key "system/residentSizePercent">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "virtualSize15MPercentChange">
|
||||
</Key>
|
||||
|
||||
<Key "server/threads/running">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "asyncPerSecond15M">
|
||||
</Key>
|
||||
<Key "server/threads/queued">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "asyncPerSecond15MPercentChange">
|
||||
</Key>
|
||||
<Key "server/threads/working">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "syncPerSecond15M">
|
||||
</Key>
|
||||
<Key "server/threads/blocked">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "syncPerSecond15MPercentChange">
|
||||
</Key>
|
||||
<Key "server/uptime">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "clientConnections15M">
|
||||
</Key>
|
||||
<Key "server/physicalMemory">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "clientConnections15MPercentChange">
|
||||
</Key>
|
||||
|
||||
<Key "server/v8Context/available">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
</Key>
|
||||
<Key "server/v8Context/max">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "server/v8Context/busy">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "server/v8Context/dirty">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
<Key "server/v8Context/free">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
|
||||
<Key "client/totalTime/count">
|
||||
Type "client_totalTime_count"
|
||||
</Key>
|
||||
<Key "client/totalTime/sum">
|
||||
Type "client_totalTime_sum"
|
||||
</Key>
|
||||
<Key "client/totalTime/counts/0">
|
||||
Type "client_totalTime_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/bytesReceived/count">
|
||||
Type "client_bytesReceived_count"
|
||||
</Key>
|
||||
<Key "client/bytesReceived/sum">
|
||||
Type "client_bytesReceived_sum"
|
||||
</Key>
|
||||
<Key "client/bytesReceived/counts/0">
|
||||
Type "client_bytesReceived_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/requestTime/count">
|
||||
Type "client_requestTime_count"
|
||||
</Key>
|
||||
<Key "client/requestTime/sum">
|
||||
Type "client_requestTime_sum"
|
||||
</Key>
|
||||
<Key "client/requestTime/counts/0">
|
||||
Type "client_requestTime_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/connectionTime/count">
|
||||
Type "client_connectionTime_count"
|
||||
</Key>
|
||||
<Key "client/connectionTime/sum">
|
||||
Type "client_connectionTime_sum"
|
||||
</Key>
|
||||
<Key "client/connectionTime/counts/0">
|
||||
Type "client_connectionTime_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/queueTime/count">
|
||||
Type "client_queueTime_count"
|
||||
</Key>
|
||||
<Key "client/queueTime/sum">
|
||||
Type "client_queueTime_sum"
|
||||
</Key>
|
||||
<Key "client/queueTime/counts/0">
|
||||
Type "client_queueTime_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/bytesSent/count">
|
||||
Type "client_bytesSent_count"
|
||||
</Key>
|
||||
<Key "client/bytesSent/sum">
|
||||
Type "client_bytesSent_sum"
|
||||
</Key>
|
||||
<Key "client/bytesSent/counts/0">
|
||||
Type "client_bytesSent_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/ioTime/count">
|
||||
Type "client_ioTime_count"
|
||||
</Key>
|
||||
<Key "client/ioTime/sum">
|
||||
Type "client_ioTime_sum"
|
||||
</Key>
|
||||
<Key "client/ioTime/counts/0">
|
||||
Type "client_ioTime_counts0"
|
||||
</Key>
|
||||
|
||||
<Key "client/httpConnections">
|
||||
Type "gauge"
|
||||
</Key>
|
||||
</URL>
|
||||
</Plugin>
|
||||
|
||||
To circumvent the shortcoming of the curl_JSON plug-in to only take the last path element as name for the metric, we need to give them a name using our own `types.db` file in `/etc/collectd/collectd.conf.d/arangodb_types.db`:
|
||||
To circumvent the shortcoming of the curl_JSON plug-in to only take the last path element as name for the metric, we need to give them a name using our own `types.db` file in `/etc/collectd/arangodb_types.db`:
|
||||
|
||||
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
|
||||
client_totalTime_count value:GAUGE:0:9223372036854775807
|
||||
client_totalTime_sum value:GAUGE:U:U
|
||||
client_totalTime_counts0 value:GAUGE:U:U
|
||||
|
||||
client_bytesReceived_count value:GAUGE:0:9223372036854775807
|
||||
client_bytesReceived_sum value:GAUGE:U:U
|
||||
client_bytesReceived_counts0 value:GAUGE:U:U
|
||||
|
||||
client_requestTime_count value:GAUGE:0:9223372036854775807
|
||||
client_requestTime_sum value:GAUGE:U:U
|
||||
client_requestTime_counts0 value:GAUGE:U:U
|
||||
|
||||
client_connectionTime_count value:GAUGE:0:9223372036854775807
|
||||
client_connectionTime_sum value:GAUGE:U:U
|
||||
client_connectionTime_counts0 value:GAUGE:U:U
|
||||
|
||||
client_queueTime_count value:GAUGE:0:9223372036854775807
|
||||
client_queueTime_sum value:GAUGE:U:U
|
||||
client_queueTime_counts0 value:GAUGE:U:U
|
||||
|
||||
client_bytesSent_count value:GAUGE:0:9223372036854775807
|
||||
client_bytesSent_sum value:GAUGE:U:U
|
||||
client_bytesSent_counts0 value:GAUGE:U:U
|
||||
|
||||
client_ioTime_count value:GAUGE:0:9223372036854775807
|
||||
client_ioTime_sum value:GAUGE:U:U
|
||||
client_ioTime_counts0 value:GAUGE:U:U
|
||||
|
||||
Please note that you probably need to uncomment this line from the main collectd.conf:
|
||||
|
||||
# TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
|
||||
|
||||
in order to make it still load its main types definition file.
|
||||
|
||||
### Rolling your own
|
||||
|
||||
|
|
Loading…
Reference in New Issue