Chronograf provides a user interface for Kapacitor, InfluxData’s processing framework for creating alerts, running ETL jobs, and detecting anomalies in your data. This guide offers a lower-level insight into how Kapacitor interacts with Chronograf and introduces advanced Kapacitor usage within Chronograf.
Chronograf stores the information on the Alert History page as time-series data in InfluxDB. It stores it in the
chronograf database and in the
alerts measurement. By default, those data are subject to an infinite retention policy (RP), that is, InfluxDB stores them forever. Users who expect to have a large number of alerts and users who do not want to store their alert history forever, may want to shorten the duration of that RP.
Use Chronograf’s Admin page to modify the retention policy in the
chronograf database. In the Databases tab:
chronografdatabase and click on the infinity symbol (∞)
The minimum allowable duration is one hour (
1h) and the maximum is infinite (
INF). See the InfluxDB documentation for the list of acceptable duration units.
InfluxDB only keeps data in the
chronograf database that fall within that new duration; the system automatically deletes any data with timestamps that occur before the duration setting.
If you set the retention policy’s duration to one hour (
1h), InfluxDB automatically deletes any alerts that occurred before the past hour. Those alerts no longer appear in your InfluxDB instance or on Chronograf’s Alert History page.
Looking at the image below and assuming that the current time is 19:00 on April 27, 2017, only the first three alerts would appear in your alert history; they occurred within the previous hour (18:00 through 19:00). The fourth alert, which occurred on the same day at 16:58:50, is outside the previous hour and would no longer appear in InfluxDB’s
chronograf database or on Chronograf’s Alert History page.
Chronograf creates Kapacitor tasks using the information that you provide on the Rule Configuration page. It uses that information to communicate with Kapacitor and populate Chronograf’s alert pages. Pre-existing tasks, that is, TICKscripts that you created and enabled on your Kapacitor instance without using Chronograf, have limited functionality in the user interface.
In Chronograf, you can:
kapacitor delete taskscommand)
You cannot edit pre-existing tasks on Chronograf’s Alert Rules page. The
mytick task in the image below is a pre-existing task; its name appears on the Alert Rules page but you cannot click on it or edit its TICKscript in the interface. Currently, you must manually edit your existing tasks and TICKscripts on your machine.
© 2015 InfluxData, Inc.
Licensed under the MIT license.