Skip to content

Instantly share code, notes, and snippets.

@lukaszkorecki
Created March 8, 2016 11:41
Show Gist options
  • Save lukaszkorecki/23b57f5f42b9a3705194 to your computer and use it in GitHub Desktop.
Save lukaszkorecki/23b57f5f42b9a3705194 to your computer and use it in GitHub Desktop.
Various collectd configs found on the net
LoadPlugin match_regex
LoadPlugin target_set
PreCacheChain "RenameES"
<Chain "RenameES">
<Rule "rename_es">
<Match regex>
Plugin "^curl_json$"
PluginInstance "elasticsearch"
</Match>
<Target "set">
Plugin "elasticsearch"
PluginInstance "localhost"
</Target>
</Rule>
</Chain>
LoadPlugin "curl_json"
<Plugin curl_json>
<URL "http://localhost:9200/_cluster/nodes/_local/stats?all=true">
Instance "elasticsearch"
<Key "nodes/*/indices/docs/count">
Type "gauge"
</Key>
<Key "nodes/*/indices/docs/deleted">
Type "gauge"
</Key>
<Key "nodes/*/indices/store/size_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/indices/indexing/index_total">
Type "counter"
</Key>
<Key "nodes/*/indices/indexing/index_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/indexing/delete_total">
Type "counter"
</Key>
<Key "nodes/*/indices/indexing/delete_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/get/total">
Type "counter"
</Key>
<Key "nodes/*/indices/get/time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/get/exists_total">
Type "counter"
</Key>
<Key "nodes/*/indices/get/exists_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/get/missing_total">
Type "counter"
</Key>
<Key "nodes/*/indices/get/missing_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/search/query_total">
Type "counter"
</Key>
<Key "nodes/*/indices/search/query_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/search/fetch_total">
Type "counter"
</Key>
<Key "nodes/*/indices/search/fetch_time_in_millis">
Type "counter"
</Key>
<Key "nodes/*/indices/filter_cache/memory_size_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/indices/filter_cache/evictions">
Type "counter"
</Key>
<Key "nodes/*/indices/fielddata/memory_size_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/indices/fielddata/evictions">
Type "counter"
</Key>
<Key "nodes/*/process/open_file_descriptors">
Type "gauge"
</Key>
<Key "nodes/*/jvm/mem/heap_used_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/jvm/mem/heap_committed_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/jvm/mem/non_heap_used_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/jvm/mem/non_heap_committed_in_bytes">
Type "gauge"
</Key>
<Key "nodes/*/jvm/threads/count">
Type "gauge"
</Key>
<Key "nodes/*/jvm/threads/peak_count">
Type "gauge"
</Key>
<Key "nodes/*/jvm/gc/collection_count">
Type "counter"
</Key>
<Key "nodes/*/transport/rx_size_in_bytes">
Type "counter"
</Key>
<Key "nodes/*/transport/tx_size_in_bytes">
Type "counter"
</Key>
<Key "nodes/*/transport/server_open">
Type "gauge"
</Key>
<Key "nodes/*/http/current_open">
Type "gauge"
</Key>
</URL>
</Plugin>
LoadPlugin match_regex
LoadPlugin target_set
PreCacheChain "RenameRabbit"
<Chain "RenameRabbit">
# Each queue needs a separate "Rule" section
<Rule>
<Match regex>
Plugin "^curl_json$"
PluginInstance "^QUEUE_NAME$"
</Match>
<Target "set">
Plugin "rabbitmq"
PluginInstance "^QUEUE_NAME$"
</Target>
</Rule>
</Chain>
LoadPlugin "curl_json"
<Plugin curl_json>
# Each queue needs a separate "URL" section that points to
# http://localhost:15672/api/queues/vhost/QUEUE_NAME
# Each URL section must match one of the Rules sections
#
# NOTE: The vhost and queue name must be URL-encoded
# Being that the default vhost is a forward slash "/",
# we encode this as "%2F"
<URL "http://localhost:15672/api/queues/%2F/QUEUE_NAME">
Instance "QUEUE_NAME"
User "guest"
Password "guest"
<Key "messages">
Type "gauge"
</Key>
<Key "messages_unacknowledged">
Type "gauge"
</Key>
<Key "messages_ready">
Type "gauge"
</Key>
<Key "consumers">
Type "gauge"
</Key>
<Key "message_stats/publish_details/rate">
Type "gauge"
</Key>
<Key "message_stats/deliver_details/rate">
Type "gauge"
</Key>
</URL>
</Plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment