Git Product home page Git Product logo

kapacitor-tasks's Introduction

kapacitor-tasks

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.

How to use?

define the task

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

enable the task

after define task, you can enable the monitor:

# kapacitor enable cpu_usage

task list

cpu

cpu_usage.tick

disk

disk_bandwidth.tick
disk_iops.tick
disk_latency.tick
disk_used.tick

memory

memory/memory_used.tick

system

system_load.tick
system_process.tick
system_swap.tick

network

network_connect.tick
network_traffic.tick

memory

memcached_conn.tick
memcached_qps.tick

mongodb

mongodb_active.tick
mongodb_conn.tick
mongodb_qps.tick
mongodb_queued.tick

mysql

mysql_conn.tick
mysql_qps_detect.tick
mysql_qps.tick
mysql_slave.tick

redis

redis_conn.tick
redis_mem.tick
redis_qps.tick
redis_slave.tick

check tools

dependency

the following dependency packages should be installed:

perl-libwww-perl
perl-HTTP-Message
perl-DateTime
perl-JSON
perl-Data-Dumper

how to use?

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.

define and enable kapacitor tasks

$ cd kapacitor-tasks
$ bash check_tools/set_tick.sh -d -e

License

MIT/BSD

kapacitor-tasks's People

Contributors

arstercz avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.