The Kapacitor task scripts, can be used with InfluxDB to monitor timeseries data. can be used with kapacitor-alarm.
note: these task scripts only test in kapacitor-1.5
and influxdb-1.7
, some influx tag
or field
maybe different at old version.
the database
and retention policy
can be changed by -dbrp
option, or modify the line dbrp xxxx
which in the tick script:
# kapacitor define cpu_usage -tick cpu/cpu_usage.tick
after define task, you can enable the monitor:
# kapacitor enable cpu_usage
cpu_usage.tick
disk_bandwidth.tick
disk_iops.tick
disk_latency.tick
disk_used.tick
memory/memory_used.tick
system_load.tick
system_process.tick
system_swap.tick
network_connect.tick
network_traffic.tick
memcached_conn.tick
memcached_qps.tick
mongodb_active.tick
mongodb_conn.tick
mongodb_qps.tick
mongodb_queued.tick
mysql_conn.tick
mysql_qps_detect.tick
mysql_qps.tick
mysql_slave.tick
redis_conn.tick
redis_mem.tick
redis_qps.tick
redis_slave.tick
the following dependency packages should be installed:
perl-libwww-perl
perl-HTTP-Message
perl-DateTime
perl-JSON
perl-Data-Dumper
the check_tools
directory contains some useful utilities so that we can check custom timeseries data:
set_tick.sh # define and enable kapacitor tasks in batch way
exec_parse.pl # sample usage when you use the alert.exec() method
service_check.pl
service_check.tick
the service_check.pl
check the lastest system
, mysql
, redis
and memcached
items, then insert expire status to the "db"."autogen"."service_check". service_check.tick
use the isTimeExpire
filed to determine whether the service is alive or dead, or missing lastest data.
service_check.pl
can be run as crontab jobs, and the period time in service_check.tick
should be greater than crontab interval time.
$ cd kapacitor-tasks
$ bash check_tools/set_tick.sh -d -e
MIT/BSD