Created
April 15, 2014 23:49
-
-
Save nati/10790155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<source> | |
type exec | |
command sh /etc/td-agent/stats.sh | |
format tsv | |
keys hostname,nginx,memcached | |
tag stats | |
run_interval 5 | |
</source> | |
<match stats> | |
type copy | |
<store> | |
type map | |
tag "map.dstat.nginx-req" | |
time time | |
record {"value" => record["nginx"], "stat" => "nginx-req", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.memcached-incr" | |
time time | |
record {"value" => record["memcached"], "stat" => "memcached-incr", "host" => record["hostname"]} | |
</store> | |
</match> | |
<source> | |
type dstat | |
tag dstat | |
option -lcn | |
delay 5 | |
</source> | |
<match dstat> | |
type copy | |
<store> | |
type map | |
tag "map.dstat.loadavg-short" | |
time time | |
record {"value" => record["dstat"]["load avg"]["1m"], "stat" => "loadavg-short", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.cpu-usr" | |
time time | |
record {"value" => record["dstat"]["total cpu usage"]["usr"], "stat" => "cpu-usr", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.cpu-sys" | |
time time | |
record {"value" => record["dstat"]["total cpu usage"]["sys"], "stat" => "cpu-sys", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.cpu-hiq" | |
time time | |
record {"value" => record["dstat"]["total cpu usage"]["hiq"], "stat" => "cpu-hiq", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.cpu-siq" | |
time time | |
record {"value" => record["dstat"]["total cpu usage"]["siq"], "stat" => "cpu-siq", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.net-recv" | |
time time | |
record {"value" => record["dstat"]["net/total"]["recv"], "stat" => "net-recv", "host" => record["hostname"]} | |
</store> | |
<store> | |
type map | |
tag "map.dstat.net-send" | |
time time | |
record {"value" => record["dstat"]["net/total"]["send"], "stat" => "net-send", "host" => record["hostname"]} | |
</store> | |
</match> | |
<match map.dstat.*> | |
type elasticsearch | |
type_name dstat | |
host 監視サーバのIP | |
port 9200 | |
logstash_format true | |
logstash_prefix logstash | |
flush_interval 5s | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment