simple monitoring solution with grafana, go-carbon and carbonapi

This commit is contained in:
Michael Rennecke
2017-03-17 22:57:44 +01:00
parent 759f971612
commit 68f29949a4
7 changed files with 204 additions and 0 deletions

74
configs/go-carbon.conf Normal file
View File

@@ -0,0 +1,74 @@
[common]
user = ""
graph-prefix = "carbon.agents.{host}"
metric-endpoint = "local"
max-cpu = 2
metric-interval = "1m0s"
[whisper]
data-dir = "/data/graphite/whisper/"
schemas-file = "/etc/go-carbon/storage-schemas.conf"
aggregation-file = ""
workers = 2
max-updates-per-second = 0
sparse-create = false
enabled = true
[cache]
max-size = 1000000
write-strategy = "max"
[udp]
listen = ":2003"
enabled = true
log-incomplete = false
buffer-size = 0
[tcp]
listen = ":2003"
enabled = true
buffer-size = 0
[pickle]
listen = ":2004"
max-message-size = 67108864
enabled = true
buffer-size = 0
[carbonlink]
listen = ":7002"
enabled = true
read-timeout = "30s"
[carbonserver]
listen = ":8080"
enabled = true
query-cache-enabled = true
query-cache-size-mb = 0
find-cache-enabled = true
buckets = 10
max-globs = 100
metrics-as-counters = false
read-timeout = "1m0s"
idle-timeout = "1m0s"
write-timeout = "1m0s"
scan-frequency = "5m0s"
[dump]
enabled = false
path = ""
restore-per-second = 0
[pprof]
listen = "localhost:7007"
enabled = false
[[logging]]
logger = ""
file = ""
level = "info"
encoding = "mixed"
encoding-time = "iso8601"
encoding-duration = "seconds"

View File

@@ -0,0 +1,29 @@
[min]
pattern = \.lower$
xFilesFactor = 0.1
aggregationMethod = min
[max]
pattern = \.upper(_\d+)?$
xFilesFactor = 0.1
aggregationMethod = max
[sum]
pattern = \.sum$
xFilesFactor = 0
aggregationMethod = sum
[count]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum
[count_legacy]
pattern = ^stats_counts.*
xFilesFactor = 0
aggregationMethod = sum
[default_average]
pattern = .*
xFilesFactor = 0.3
aggregationMethod = average

View File

@@ -0,0 +1,16 @@
# Documentation
# http://graphite.readthedocs.io/en/latest/config-carbon.html#storage-schemas-conf
# Carbon metrics are kept for 30 days in resolution of 10 seconds.
[carbon]
pattern = ^carbon\.
retentions = 10s:30d
# User metrics are kept for:
# 24 hours in resolution of 5 seconds
# 30 days in resolution of 1 minute
# 1 year in resolution of 5 minutes
[user]
pattern = .*
retentions = 5s:24h,1m:30d,5m:1y