Page
Library
Module
Module type
Parameter
Class
Class type
Source
Tezt_performance_regression.InfluxDBSourceSend and retrieve data points from InfluxDB.
Credentials used to authenticate to the database.
type config = | V1_8 of {url : Uri.t;database : string;credentials : credentials option;measurement_prefix : string;timeout : float;}InfluxDB configuration.
url is the base URL of the InfluxDB API.
database is the name of the InfluxDB database to read from and write to.
credentials are used to authenticate to this database. If not provided, it will try to connect without authenticating (insecure mode).
measurement_prefix is prepended to all measurement names when sending data points and in SELECT queries.
tags is added to the tags of all data points when sending data points.
Measurement names for data points.
Tag names for data points.
Field names for data points.
Field values for data points.
Unix timestamps as returned by Unix.gettimeofday.
type data_point = private {measurement : measurement;first_field : field * field_value;other_fields : (field * field_value) list;timestamp : timestamp;}Data points (see function data_point).
val data_point :
?tags:(tag * string) list ->
?other_fields:(field * field_value) list ->
?timestamp:timestamp ->
measurement ->
(field * field_value) ->
data_pointCreate a data point.
Usage: data_point measurement key_value
Data points are composed of:
measurement;tags to complete the name;(key, value) fields, composed of key_value and other_fields;timestamp (default value is now). See the documentation of InfluxDB for more information about those components.Add a tag to a data point.
Convert a data point to a string for display purposes.
Push data points to InfluxDB.
Return Error message if the data could not be sent, where message is a human-readable error message.
This section provides a select type that is an AST of InfluxQL SELECT queries, and a function to perform those queries.
See the documentation of InfluxQL here: https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data
Time interval specifications for InfluxQL queries.
Grafana_interval denotes $__interval, a placeholder that Grafana replaces with an interval which is proportional to the selected time window size. Use this in a GROUP BY clause. Example: ~group_by: (Time {interval = Grafana_interval; tag = None; fill = Some Previous}). If you try to actually query a select with this, query raises Invalid_arg.
type func = | COUNT| DISTINCT| INTEGRAL of time_interval| MEAN| MEDIAN| MODE| SPREAD| STDDEV| SUMFunctions for InfluxQL SELECT queries.
Get the name of the column for a given function in query results.
Arguments of functions for InfluxQL SELECT queries.
Columns to retrieve using InfluxQL SELECT queries.
Operators for tag comparisons in WHERE clauses.
Operators for field comparisons in WHERE clauses.
type where = | Tag of string * tag_operator * string| Field of string * field_operator * field_value| Or of where * where| And of where * where| Grafana_time_filterWHERE clauses of InfluxQL SELECT queries.
Grafana_time_filter denotes $timeFilter, a placeholder that Grafana replaces with a predicate on time which denotes the time window that the user selected in Grafana. If you try to actually query a select with this, query raises Invalid_arg.
Fill argument of GROUP BY time clauses.
type group_by = | Tags of tag list| Time of {interval : time_interval;tag : tag option;fill : fill option;}GROUP BY clauses of InfluxQL SELECT queries.
ORDER BY clauses of InfluxQL SELECT queries.
type select = {columns : column list;from : from;where : where option;group_by : group_by option;order_by : order_by option;limit : int option;slimit : int option;}InfluxQL SELECT queries.
val select :
from:from ->
?where:where ->
?group_by:group_by ->
?order_by:order_by ->
?limit:int ->
?slimit:int ->
column list ->
selectMake an InfluxQL SELECT query.
Convert a SELECT query to a string for display purposes.
If grafana is true, allow Grafana_time_filter and Grafana_interval. Default is false.
Prepend the measurement of the innermost SELECT query with the configured prefix.
This is automatically done by query.
Data points returned when making a SELECT query.
Convert a data point returned by a SELECT query to a human-readable string.
Perform a SELECT query.
Get a value from a data point in a query result.
Example: get "count" JSON.as_int
Convert results from a SELECT query into a string for debugging purposes.