From e1afdebd5874c5e7648b866260b054a5cd473ad0 Mon Sep 17 00:00:00 2001 From: Clement Pang Date: Thu, 12 Nov 2015 21:20:00 -0800 Subject: [PATCH] Add CollectD configurations --- collectd.conf | 50 ++++++ filtering_config/filtering-vmem.conf | 35 ++++ filtering_config/filtering.conf | 15 ++ managed_config/10-aggregation-cpu.conf | 45 +++++ managed_config/10-apache.conf | 25 +++ managed_config/10-innodb.conf | 30 ++++ managed_config/10-jmx.conf | 110 ++++++++++++ managed_config/10-memcached.conf | 20 +++ managed_config/10-mongodb.conf | 38 +++++ managed_config/10-mysql.conf | 29 ++++ managed_config/10-nginx.conf | 29 ++++ managed_config/10-postgresql.conf | 45 +++++ managed_config/10-redis_master.conf | 70 ++++++++ managed_config/10-redis_slave.conf | 73 ++++++++ managed_config/10-statsd.conf | 29 ++++ managed_config/10-varnish.conf | 33 ++++ managed_config/10-wavefront.conf | 8 + managed_config/20-cassandra.conf | 222 +++++++++++++++++++++++++ managed_config/20-elasticsearch.conf | 38 +++++ managed_config/20-tail-syslog.conf | 56 +++++++ managed_config/20-zookeeper.conf | 35 ++++ 21 files changed, 1035 insertions(+) create mode 100755 collectd.conf create mode 100755 filtering_config/filtering-vmem.conf create mode 100755 filtering_config/filtering.conf create mode 100755 managed_config/10-aggregation-cpu.conf create mode 100755 managed_config/10-apache.conf create mode 100755 managed_config/10-innodb.conf create mode 100755 managed_config/10-jmx.conf create mode 100755 managed_config/10-memcached.conf create mode 100755 managed_config/10-mongodb.conf create mode 100755 managed_config/10-mysql.conf create mode 100755 managed_config/10-nginx.conf create mode 100755 managed_config/10-postgresql.conf create mode 100755 managed_config/10-redis_master.conf create mode 100755 managed_config/10-redis_slave.conf create mode 100755 managed_config/10-statsd.conf create mode 100755 managed_config/10-varnish.conf create mode 100755 managed_config/10-wavefront.conf create mode 100755 managed_config/20-cassandra.conf create mode 100755 managed_config/20-elasticsearch.conf create mode 100755 managed_config/20-tail-syslog.conf create mode 100755 managed_config/20-zookeeper.conf diff --git a/collectd.conf b/collectd.conf new file mode 100755 index 0000000..2fd9745 --- /dev/null +++ b/collectd.conf @@ -0,0 +1,50 @@ +TypesDB "/usr/share/collectd/types.db" + +# If you use the Hostname parameter, you +# must quote ("...") the second argument +### Hostname "" + +FQDNLookup true +Interval 10 +Timeout 2 +ReadThreads 5 + +LoadPlugin logfile + + + LogLevel "info" + File "/var/log/collectd.log" + Timestamp true + PrintSeverity false + + +LoadPlugin cpu +LoadPlugin cpufreq +LoadPlugin df +LoadPlugin disk +LoadPlugin interface +LoadPlugin load +LoadPlugin memory +LoadPlugin protocols + + Value "Icmp:InDestUnreachs" + Value "Tcp:CurrEstab" + Value "Tcp:OutSegs" + Value "Tcp:RetransSegs" + Value "TcpExt:DelayedACKs" + Value "TcpExt:DelayedACKs" + + Value "/Tcp:.*Opens/" + Value "/^TcpExt:.*Octets/" + IgnoreSelected false + + +LoadPlugin vmem + + Verbose false + + +LoadPlugin uptime + +Include "/etc/collectd/filtering_config/*.conf" +Include "/etc/collectd/managed_config/*.conf" diff --git a/filtering_config/filtering-vmem.conf b/filtering_config/filtering-vmem.conf new file mode 100755 index 0000000..97f3e72 --- /dev/null +++ b/filtering_config/filtering-vmem.conf @@ -0,0 +1,35 @@ +LoadPlugin match_regex + + + + + Type 'vmpage_faults' + + Target "return" + + + + + Type 'vmpage_io' + + Target "return" + + + + + Type 'vmpage_number' + TypeInstance 'free_pages' + + Target "return" + + + + + Type 'vmpage_number' + TypeInstance 'mapped' + + Target "return" + + + Target "stop" + diff --git a/filtering_config/filtering.conf b/filtering_config/filtering.conf new file mode 100755 index 0000000..519b141 --- /dev/null +++ b/filtering_config/filtering.conf @@ -0,0 +1,15 @@ +LoadPlugin match_regex + + + + + + Plugin 'vmem' + + + Chain "VmemFilters" + + + + Target "write" + diff --git a/managed_config/10-aggregation-cpu.conf b/managed_config/10-aggregation-cpu.conf new file mode 100755 index 0000000..b9f7c62 --- /dev/null +++ b/managed_config/10-aggregation-cpu.conf @@ -0,0 +1,45 @@ +# Install: +# This plugin is bundled with collectd version 5.2+ + +# Documentation: +# The purpose of this module is to aggregate CPU stats from all cores. +# +# https://collectd.org/wiki/index.php/Plugin:Aggregation +# https://collectd.org/wiki/index.php/Plugin:Aggregation/Config + +# System modifications: +# None + +# Config file modifications: +# None + +LoadPlugin aggregation + + + + Plugin "cpu" + Type "cpu" + + GroupBy "Host" + GroupBy "TypeInstance" + + CalculateSum true + CalculateAverage true + + + +LoadPlugin match_regex + + + + + Plugin "^cpu$" + + + Plugin "aggregation" + + Target stop + + Target "write" + + diff --git a/managed_config/10-apache.conf b/managed_config/10-apache.conf new file mode 100755 index 0000000..0025ef0 --- /dev/null +++ b/managed_config/10-apache.conf @@ -0,0 +1,25 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# apt-get install collectd-apache + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:Apache + +# System modifications: +# Add the following to your apache config: +# ExtendedStatus on +# +# SetHandler server-status +# + +# Config file modifications: +# Change the URL parameter to the location of your mod_status + +LoadPlugin "apache" + + + URL "http://localhost/mod_status?auto" + + + diff --git a/managed_config/10-innodb.conf b/managed_config/10-innodb.conf new file mode 100755 index 0000000..47f288d --- /dev/null +++ b/managed_config/10-innodb.conf @@ -0,0 +1,30 @@ +# Install: +# git clone https://github.com/marksteele/collectd-plugins.git /opt/collectd-plugins + +# Documentation: +# https://github.com/marksteele/collectd-plugins + +# System modifications: +# None + +# Config file modifications: +# Change the Host/Port/User/Pass to settings that allow you to connect +# to a MySQL host. Make sure IncludeDir is where you installed your +# code to with git clone. + + + + Globals true + + + + IncludeDir "/opt/collectd-plugins" +# BaseName "Collectd::Plugins" + LoadPlugin "MySQL" + + Host "localhost" + Port "3306" + User "root" + Pass "abcdABCD1." + + diff --git a/managed_config/10-jmx.conf b/managed_config/10-jmx.conf new file mode 100755 index 0000000..2e8de2b --- /dev/null +++ b/managed_config/10-jmx.conf @@ -0,0 +1,110 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# +# apt-get install collectd-java collectd-generic-jmx +# +# If your collectd log shows an error loading java.so, see +# http://www.willdurness.com/collectinggraphing-information-on-neo4j-via-collectd-and-graphite/ +# and how they setup LD_LIBRARY_PATH. The basic problem is +# collectd wants open JDK 6. You can fix this by adding +# +# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server +# +# to your collectd init file, but pointing to the correct +# library path for your java install. +# +# You need to install the signalfx_types_db on your system and reference it +# from this config file: +# cp signalfx_types_db /etc/collectd.d/signalfx_types_db +# +# If you get the error "Blah blah" it could be because you're version of java is different +# than the version of java that collectd was compiled with. This is especially true for people +# running java 6. To resolve this, you need to compile collectd from source on a machine using +# the same setup of java you want, and copy over the .jar files it generates to the jars inside +# Djava.class.path. +# +# If the plugin appears to load but you don't see any metrics, you may need to specify +# a InstancePrefix parameter to give your metrics readable names. + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:Java +# https://collectd.org/wiki/index.php/Plugin:GenericJMX +# https://collectd.org/wiki/index.php/Plugin:GenericJMX/Config + +# System modifications: +# Make sure the JVMArg path points to valid jar files. If you do not find +# the generic-jmx jar in the JVMArg path you may need to install the collectd-generic-jmx plugin + +# Config file modifications: +# Do not modify the config file, but you **WILL** need another config file that +# points to your java application. See 20-javageneric.conf if you want a +# catch-all config for any java app. + +TypesDB "/etc/collectd.d/signalfx_types_db" +LoadPlugin java + + JVMArg "-verbose:jni" + JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar" + + LoadPlugin "org.collectd.java.GenericJMX" + + + ObjectName "java.lang:type=ClassLoading" + + Type "gauge" + InstancePrefix "loaded_classes" + Table false + Attribute "LoadedClassCount" + + + + + ObjectName "java.lang:type=GarbageCollector,*" + InstancePrefix "gc-" + InstanceFrom "name" + + Type "invocations" + Table false + Attribute "CollectionCount" + + + Type "total_time_in_ms" + InstancePrefix "collection_time" + Table false + Attribute "CollectionTime" + + + + + ObjectName "java.lang:type=Memory" + InstancePrefix "memory-heap" + + Type "jmx_memory" + Table true + Attribute "HeapMemoryUsage" + + + + + ObjectName "java.lang:type=Memory" + InstancePrefix "memory-nonheap" + + Type "jmx_memory" + Table true + Attribute "NonHeapMemoryUsage" + + + + + ObjectName "java.lang:type=MemoryPool,*" + InstancePrefix "memory_pool-" + InstanceFrom "name" + + Type "jmx_memory" + Table true + Attribute "Usage" + + + + diff --git a/managed_config/10-memcached.conf b/managed_config/10-memcached.conf new file mode 100755 index 0000000..520a8eb --- /dev/null +++ b/managed_config/10-memcached.conf @@ -0,0 +1,20 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# apt-get install collectd-memcached + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:memcached + +# System modifications: +# None + +# Config file modifications: +# Change the host and port if you are not using default values. + +LoadPlugin memcached + + + Host "127.0.0.1" + Port "11211" + diff --git a/managed_config/10-mongodb.conf b/managed_config/10-mongodb.conf new file mode 100755 index 0000000..b8a7956 --- /dev/null +++ b/managed_config/10-mongodb.conf @@ -0,0 +1,38 @@ +# Install: +# This plugin requires the python plugin. It is sometimes installed with collectd +# but not always. You can install it with: +# +# apt-get install collectd-python +# +# Install the mongodb collectd plugin now +# pip install pymongo==3.0.3 +# git clone --depth 1 --branch v1.0.4 https://username:password@github.com/signalfx/collectd-mongodb +# cp collectd-mongodb/mongodb.py /opt/setup/scripts/ +# cp collectd-mongodb/types.db /opt/setup/scripts/ + +# Documentation: +# https://github.com/signalfx/collectd-mongodb/blob/master/README.md + +# System modifications: +# None + +# Config file modifications: +# Change the Host/Port/User/Password/Database/Instance to settings that allow you to +# connect to the mongodb instance. Each mongodb instance gets it's own module. +# Included is one sample master config. + +TypesDB "/opt/setup/scripts/types.db" +LoadPlugin python + + ModulePath "/opt/setup/scripts" + Import "mongodb" + + Host "127.0.0.1" + Port "27017" + User "" + Password "password" + Database "admin" "db-prod" "db-dev" + Instance "" + + + diff --git a/managed_config/10-mysql.conf b/managed_config/10-mysql.conf new file mode 100755 index 0000000..b2ccc82 --- /dev/null +++ b/managed_config/10-mysql.conf @@ -0,0 +1,29 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# apt-get install collectd-mysql + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:MySQL + +# System modifications: +# None + +# Config file modifications: +# Change the host/socket/user/password/database parameters to point to +# your mysql install. You can usually find the "socket" parameter by +# looking at your mysql command with: +# +# ps auwxxx | grep mysql + +LoadPlugin mysql + + + Host "localhost" + Socket "/var/run/mysqld/mysqld.sock" + User "root" + Password "abcdABCD1." + Database "lamptest" + + + diff --git a/managed_config/10-nginx.conf b/managed_config/10-nginx.conf new file mode 100755 index 0000000..b01eff6 --- /dev/null +++ b/managed_config/10-nginx.conf @@ -0,0 +1,29 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# apt-get install collectd-nginx + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:nginx +# http://wiki.nginx.org/HttpStubStatusModule + +# System modifications: +# Enable the stub status module by adding something similar to this +# to your nginx config +# +# location /nginx_status { +# stub_status on; +# access_log off; +# allow 127.0.0.1; +# deny all; +# } + +# Config file modifications: +# Change the URL parameter to the location you setup above. + + +LoadPlugin nginx + + URL "http://localhost:80/nginx_status" + + diff --git a/managed_config/10-postgresql.conf b/managed_config/10-postgresql.conf new file mode 100755 index 0000000..5fac902 --- /dev/null +++ b/managed_config/10-postgresql.conf @@ -0,0 +1,45 @@ +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:PostgreSQL + +# System modifications: +# Postgresql plugin use PostgreSQL's statistics collector which should be enabled by default. +# The flags are 'track_activities' and 'track_counts' + +# Config file modifications: +# Change the hostname to location of the postgresql host, username and password. + +LoadPlugin postgresql + + + + Statement "SELECT deadlocks as num_deadlocks \ + FROM pg_stat_database \ + WHERE datname = $1;" + + Param database + + + Type "pg_xact" + InstancePrefix "num_deadlocks" + ValuesFrom "num_deadlocks" + + + + + Host "%%%hostname%%%" + User "%%%username%%%" + Password "%%%password%%%" + Query custom_deadlocks + Query backends + Query transactions + Query queries + Query queries_by_table + Query query_plans + Query table_states + Query query_plans_by_table + Query table_states_by_tables + Query disk_io + Query disk_io_by_table + Query disk_usage + + diff --git a/managed_config/10-redis_master.conf b/managed_config/10-redis_master.conf new file mode 100755 index 0000000..c9b5d2f --- /dev/null +++ b/managed_config/10-redis_master.conf @@ -0,0 +1,70 @@ +# Install: +# This requires the python plugin. It is sometimes installed with collectd +# but not always. You can install it with: +# +# apt-get install collectd-python +# +# Install the redis collect plugin now +# git clone https://github.com/powdahound/redis-collectd-plugin.git /opt/redis-collectd-plugin + +# Documentation: +# https://github.com/powdahound/redis-collectd-plugin/blob/master/README.md + +# System modifications: +# None + +# Config file modifications: +# Change the Host/Port/Auth to settings that allow you to connect +# to the redis instance. Each redis instance gets it's own module. +# Included is one sample master config. + + + Globals true + + + + ModulePath "/opt/redis-collectd-plugin" + Import "redis_info" + + + Host "localhost" + Port 6379 + # Un-comment to use AUTH + #Auth "1234" + Verbose false + # Catch Redis metrics (prefix with Redis_) + Redis_uptime_in_seconds "gauge" + Redis_used_cpu_sys "counter" + Redis_used_cpu_user "counter" + Redis_used_cpu_sys_children "counter" + Redis_used_cpu_user_children "counter" + Redis_uptime_in_days "gauge" + Redis_lru_clock "counter" + Redis_connected_clients "gauge" + Redis_connected_slaves "gauge" + Redis_client_longest_output_list "gauge" + Redis_client_biggest_input_buf "gauge" + Redis_blocked_clients "gauge" + Redis_expired_keys "counter" + Redis_evicted_keys "counter" + Redis_rejected_connections "counter" + Redis_used_memory "bytes" + Redis_used_memory_rss "bytes" + Redis_used_memory_peak "bytes" + Redis_used_memory_lua "bytes" + Redis_mem_fragmentation_ratio "gauge" + Redis_changes_since_last_save "gauge" + Redis_instantaneous_ops_per_sec "gauge" + Redis_rdb_bgsave_in_progress "gauge" + Redis_total_connections_received "counter" + Redis_total_commands_processed "counter" + Redis_total_net_input_bytes "counter" + Redis_total_net_output_bytes "counter" + Redis_keyspace_hits "derive" + Redis_keyspace_misses "derive" + Redis_latest_fork_usec "gauge" + Redis_connected_slaves "gauge" + Redis_repl_backlog_first_byte_offset "gauge" + Redis_master_repl_offset "gauge" + + diff --git a/managed_config/10-redis_slave.conf b/managed_config/10-redis_slave.conf new file mode 100755 index 0000000..575932d --- /dev/null +++ b/managed_config/10-redis_slave.conf @@ -0,0 +1,73 @@ +# Install: +# This requires the python plugin. It is sometimes installed with collectd +# but not always. You can install it with: +# +# apt-get install collectd-python +# +# Install the redis collect plugin now +# git clone https://github.com/powdahound/redis-collectd-plugin.git /opt/redis-collectd-plugin + +# Documentation: +# https://github.com/powdahound/redis-collectd-plugin/blob/master/README.md + +# System modifications: +# None + +# Config file modifications: +# Change the Host/Port/Auth to settings that allow you to connect +# to the redis instance. Each redis instance gets it's own module. +# Included is one sample slave config. + + + Globals true + + + + ModulePath "/opt/redis-collectd-plugin" + Import "redis_info" + + + Host "localhost" + Port 9999 + # Un-comment to use AUTH + #Auth "1234" + Verbose false + # Catch Redis metrics (prefix with Redis_) + Redis_uptime_in_seconds "gauge" + Redis_used_cpu_sys "counter" + Redis_used_cpu_user "counter" + Redis_used_cpu_sys_children "counter" + Redis_used_cpu_user_children "counter" + Redis_uptime_in_days "gauge" + Redis_lru_clock "counter" + Redis_connected_clients "gauge" + Redis_connected_slaves "gauge" + Redis_client_longest_output_list "gauge" + Redis_client_biggest_input_buf "gauge" + Redis_blocked_clients "gauge" + Redis_expired_keys "counter" + Redis_evicted_keys "counter" + Redis_rejected_connections "counter" + Redis_used_memory "bytes" + Redis_used_memory_rss "bytes" + Redis_used_memory_peak "bytes" + Redis_used_memory_lua "bytes" + Redis_mem_fragmentation_ratio "gauge" + Redis_changes_since_last_save "gauge" + Redis_instantaneous_ops_per_sec "gauge" + Redis_rdb_bgsave_in_progress "gauge" + Redis_total_connections_received "counter" + Redis_total_commands_processed "counter" + Redis_total_net_input_bytes "counter" + Redis_total_net_output_bytes "counter" + Redis_keyspace_hits "derive" + Redis_keyspace_misses "derive" + Redis_latest_fork_usec "gauge" + Redis_connected_slaves "gauge" + Redis_repl_backlog_first_byte_offset "gauge" + Redis_master_repl_offset "gauge" + #Slave-Only + Redis_master_last_io_seconds_ago "gauge" + Redis_slave_repl_offset "gauge" + + diff --git a/managed_config/10-statsd.conf b/managed_config/10-statsd.conf new file mode 100755 index 0000000..660c027 --- /dev/null +++ b/managed_config/10-statsd.conf @@ -0,0 +1,29 @@ +# Install: +# This plugin is bundled with collectd, but +# you need to be running 5.4+ + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:StatsD + +# System modifications: +# Configure your statsd applications to send StatsD metrics +# localhost. + +# Config file modifications: +# Note the comment above the "Host" paramter. + +LoadPlugin statsd + + # Note, we are binding to host 127.0.0.1 which may not + # allow statsd to read from remote hosts. If you want to + # do that, you may need to use the following line instead: + # Host "0.0.0.0" + Host "127.0.0.1" + DeleteSets true + TimerPercentile 90.0 + TimerLower true + TimerUpper true + TimerSum true + TimerCount true + + diff --git a/managed_config/10-varnish.conf b/managed_config/10-varnish.conf new file mode 100755 index 0000000..ef43ae2 --- /dev/null +++ b/managed_config/10-varnish.conf @@ -0,0 +1,33 @@ +# Install: +# This plugin is sometimes bundled with collectd, if not +# you can install with: +# apt-get install collectd-varnish + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:Varnish +# https://www.varnish-cache.org/trac/wiki/StatsExplained + +LoadPlugin varnish + + + CollectCache true + CollectConnections true + CollectBackend true + CollectSHM true + CollectESI true + CollectFetch true + CollectHCB true + CollectSMA true + CollectSMS true + CollectSM true + CollectTotals true + CollectWorkers true + CollectUptime true + CollectVCL true + CollectStruct true + CollectObjects true + CollectSession true + CollectVSM true + + + diff --git a/managed_config/10-wavefront.conf b/managed_config/10-wavefront.conf new file mode 100755 index 0000000..7610c30 --- /dev/null +++ b/managed_config/10-wavefront.conf @@ -0,0 +1,8 @@ + + + Host "localhost" + Port "4242" + StoreRates false + AlwaysAppendDS false + + \ No newline at end of file diff --git a/managed_config/20-cassandra.conf b/managed_config/20-cassandra.conf new file mode 100755 index 0000000..54fe036 --- /dev/null +++ b/managed_config/20-cassandra.conf @@ -0,0 +1,222 @@ +# Install: +# Please follow the install instructions of 10-jmx.conf + +# Documentation: +# http://wiki.apache.org/cassandra/Metrics +# https://collectd.org/wiki/index.php/Plugin:Java + +# System modifications: +# Open the JMX port on your cassandra app +# http://wiki.apache.org/cassandra/JmxInterface +# http://wiki.apache.org/cassandra/JmxGotchas + +# Config file modifications: +# You must include 10-jmx.conf +# Make sure ServiceURL points to your jmx app. +# Modify the "Host" parameter to what you want your source name to be. +# Please leave the identifier [hostHasService=cassandra] in the hostname. + + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency" + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Read.Latency.50thPercentile" + Attribute "50thPercentile" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Read.Latency.Max" + Attribute "Max" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Read.Latency.99thPercentile" + Attribute "99thPercentile" + + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Read.Latency.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Timeouts" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Read.Timeouts.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Unavailables" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Read.Unavailables.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=RangeSlice,name=Latency" + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Latency.50thPercentile" + Attribute "50thPercentile" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Latency.Max" + Attribute "Max" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Latency.99thPercentile" + Attribute "99thPercentile" + + + Type "counter" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Latency.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=RangeSlice,name=Timeouts" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Timeouts.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=RangeSlice,name=Unavailables" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.RangeSlice.Unavailables.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency" + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Write.Latency.50thPercentile" + Attribute "50thPercentile" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Write.Latency.Max" + Attribute "Max" + + + Type "gauge" + InstancePrefix "cassandra.ClientRequest.Write.Latency.99thPercentile" + Attribute "99thPercentile" + + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Write.Latency.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Timeouts" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Write.Timeouts.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Unavailables" + + Type "counter" + InstancePrefix "cassandra.ClientRequest.Write.Unavailables.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=Storage,name=Load" + + Type "gauge" + InstancePrefix "cassandra.Storage.Load.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=Storage,name=TotalHints" + + Type "gauge" + InstancePrefix "cassandra.Storage.TotalHints.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=Storage,name=TotalHintsInProgress" + + Type "gauge" + InstancePrefix "cassandra.Storage.TotalHintsInProgress.Count" + Attribute "Count" + + + + + ObjectName "org.apache.cassandra.metrics:type=Compaction,name=PendingTasks" + + Type "gauge" + InstancePrefix "cassandra.Compaction.PendingTasks.Value" + Attribute "Value" + + + + + ObjectName "org.apache.cassandra.metrics:type=Compaction,name=TotalCompactionsCompleted" + + Type "counter" + InstancePrefix "cassandra.Compaction.TotalCompactionsCompleted.Count" + Attribute "Count" + + + + + ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi" + Host "testcassandraserver[hostHasService=cassandra]" + Collect "classes" + Collect "garbage_collector" + Collect "memory-heap" + Collect "memory-nonheap" + Collect "memory_pool" + + Collect "cassandra-client-read-latency" + Collect "cassandra-client-read-timeouts" + Collect "cassandra-client-read-unavailables" + + Collect "cassandra-client-rangeslice-latency" + Collect "cassandra-client-rangeslice-timeouts" + Collect "cassandra-client-rangeslice-unavailables" + + Collect "cassandra-client-write-latency" + Collect "cassandra-client-write-timeouts" + Collect "cassandra-client-write-unavailables" + + Collect "cassandra-storage-load" + Collect "cassandra-storage-hints" + Collect "cassandra-storage-hints-in-progress" + + Collect "cassandra-compaction-pending-tasks" + Collect "cassandra-compaction-total-completed" + + + diff --git a/managed_config/20-elasticsearch.conf b/managed_config/20-elasticsearch.conf new file mode 100755 index 0000000..613ae83 --- /dev/null +++ b/managed_config/20-elasticsearch.conf @@ -0,0 +1,38 @@ +# Install: +# This is a Python-based plugin using third-party code by SignalFx. Clone the +# plugin's repository and install its Python dependencies: +# git clone \ +# https://github.com/signalfuse/collectd-elasticsearch.git \ +# /usr/share/collectd/collectd-elasticsearch +# service collectd restart + +# Documentation: +# https://github.com/signalfuse/collectd-elasticsearch.git + +# System modifications: +# None + +# Config file modifications: +# The defaults should work for a recent, standard Elasticsearch installation. +# Change Cluster to match the cluster name that is configured by Elasticsearch. +# Per-index stats can be retrieved for all indexes or a subset of them (by default +# all indexes will be retrieved). + + + + Globals true + + + + ModulePath "/usr/share/collectd/python/" + + Import "elasticsearch_collectd" + + + Verbose false + Cluster "elasticsearch" + Indexes ["_all"] + EnableIndexStats true + EnableClusterHealth true + + diff --git a/managed_config/20-tail-syslog.conf b/managed_config/20-tail-syslog.conf new file mode 100755 index 0000000..56c7339 --- /dev/null +++ b/managed_config/20-tail-syslog.conf @@ -0,0 +1,56 @@ +# Install: +# tail plugin comes with collectd + +# Documentation: +# https://collectd.org/wiki/index.php/Plugin:Tail +# +# Metrics collected with important dimensions: +# counter.errors +# dims: instance=[kernel|syslog] +# counter.sshd +# dims: invalid=[user|password] + +# System modifications: +# None + +# Config file modifications: +# Depending on your system configuration you may want to change syslog to +# messages, or auth.log to secure, etc. + +LoadPlugin tail + + + Instance "kernel" + + Regex "------------[ cut here ]------------" + DSType "CounterInc" + Type "counter" + Instance "errors" + + + + Instance "syslog" + + Regex "error|ERROR|fail|FAIL" + ExcludeRegex "rsyslogd-pstats" + DSType "CounterInc" + Type "counter" + Instance "errors" + + + + Instance "auth" + + Regex "\\" + DSType "CounterInc" + Type "counter" + Instance "sshd[invalid=user]" + + + Regex "\\" + DSType "CounterInc" + Type "counter" + Instance "sshd[invalid=password]" + + + diff --git a/managed_config/20-zookeeper.conf b/managed_config/20-zookeeper.conf new file mode 100755 index 0000000..6018f1f --- /dev/null +++ b/managed_config/20-zookeeper.conf @@ -0,0 +1,35 @@ +# Install: +# This requires the python plugin. It is sometimes installed with collectd +# but not always. You can install it with: +# +# apt-get install collectd-python +# +# Install the ZooKeeper plugin now +# git clone https://github.com/signalfx/collectd-zookeeper.git /opt/zookeeper-collectd-plugin + +# Documentation: +# https://github.com/signalfx/collectd-zookeeper/blob/master/README.md + +# System modifications: +# None + +# Config file modifications +# Chnage the Hosts and Port information to match the environment. +# Change the Instance to the logical name for the cluster you are monitoring. + + + Globals true + + + + ModulePath "/opt/zookeeper-collectd-plugin" + Import "zk-collectd" + + + Hosts "localhost" + Port 2181 + # You can also specify a cluster name with 'Instance' + # Instance "mycluster" + + +