Skip to content

Instantly share code, notes, and snippets.

@dch
Forked from TimidRobot/rewrite-rules.conf
Created March 1, 2013 12:35
Show Gist options
  • Save dch/5064355 to your computer and use it in GitHub Desktop.
Save dch/5064355 to your computer and use it in GitHub Desktop.
# This file defines regular expression patterns that can be used to
# rewrite metric names in a search & replace fashion. It consists of two
# sections, [pre] and [post]. The rules in the pre section are applied to
# metric names as soon as they are received. The post rules are applied
# after aggregation has taken place.
#
# The general form of each rule is as follows:
#
# regex-pattern = replacement-text
#
# For example:
#
# [post]
# _sum$ =
# _avg$ =
#
# These rules would strip off a suffix of _sum or _avg from any metric names
# after aggregation.
[pre]
#### Hostname Cleanup
_DOMAIN\. = .
_DOMAIN_TLD\. = .
#### Collectd Cleanup
# apache
\.apache\.mod_status\.apache_scoreboard\. = .apache.scoreboard.
\.apache\.mod_status\. = .apache.
# cpu
\.cpu\.idle\.value$ = .idle
\.cpu\.interrupt\.value$ = .interrupt
\.cpu\.nice\.value$ = .nice
\.cpu\.softirq\.value$ = .softirq
\.cpu\.steal\.value$ = .steal
\.cpu\.system\.value$ = .system
\.cpu\.user\.value$ = .user
\.cpu\.wait\.value$ = .wait
# df
\.df_complex =
# disk
\.disk_merged = .merged
\.disk_octets = .octets
\.disk_ops = .ops
\.disk_time = .time
# entropy
entropy\.entropy\.value$ = entropy
# interface
\.if_errors\. = .errors.
\.if_octets\. = .octets.
\.if_packets\. = .packets.
# load
\.load\.load\. = .load.
# memcached
\.memcached\.memcached_connections\.current\.value$ = .memcached.connections
\.memcached\.df\.cache\.free$ = .memcached.cache.free
\.memcached\.df\.cache\.used$ = .memcached.cache.used
\.memcached\.memcached_items\.current\.value$ = .memcached.items
\.memcached\.memcached_ = .memcached.
\.memcached\.percent\.hitratio\.value$ = .memcached.hitratio
# memory
\.memory\.memory\. = .memory.
# mysql
\.cache_result\.qcache- = .cache_result.
\.cache_size\.qcache.value$ = .cache_size
# nfs
^.*\.nfs\.v2.*$ = trash
\.nfs\.v3client\.nfs_procedure\. = .nfs.client.
\.nfs\.v3server\.nfs_procedure\. = .nfs.server.
# swap
\.swap\.swap\. = .swap.
\.swap_io = .io
# tail: apache access all
\.tail\.access_log_all\.counter\.status_ = .tail.access_log_all.status.
\.tail\.access_log_all\.response_time.first_byte_ = .tail.access_log_all.first_byte.
\.tail\.access_log_all\.response_time.response_ = .tail.access_log_all.response.
# tail: postfix
\.tail\.postfix\.counter\.conn-in- = .tail.postfix.conn-in.
\.tail\.postfix\.counter\.conn-out- = .tail.postfix.conn-out.
\.tail\.postfix\.counter\.rejected- = .tail.postfix.rejected.
\.tail\.postfix\.counter\.status- = .tail.postfix.status.
\.tail\.postfix\.gauge\.delay- = .tail.postfix.delay.
\.tail\.postfix\.ipt_bytes. = .tail.postfix.
# tcpconns
\.tcp_connections\. = .
# uptime
uptime\.uptime\.value$ = uptime
# users
users\.users\.value$ = users
# misc
\.value =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment