Code

frontend: Let CONNECTION_QUERY support 'TIMESERIES' queries.
[sysdb.git] / src / include / frontend / connection.h
index 16ad39a28a51f5c8be014a89ad0714b410806a5c..e963c94e58d0b7f30aa445b38504cdf3a554fbcd 100644 (file)
@@ -225,6 +225,21 @@ int
 sdb_fe_exec_lookup(sdb_conn_t *conn, sdb_store_matcher_t *m,
                sdb_store_matcher_t *filter);
 
+/*
+ * sdb_fe_exec_timeseries:
+ * Execute the 'TIMESERIES' command. Send the time-series for the specified
+ * host's metric, serialized as JSON, to the client. See
+ * sdb_store_fetch_timeseries for details.
+ *
+ * Returns:
+ *  - 0 on success
+ *  - a negative value else
+ */
+int
+sdb_fe_exec_timeseries(sdb_conn_t *conn,
+               const char *hostname, const char *metric,
+               sdb_timeseries_opts_t *opts);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif