0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-05-18 15:11:22 +00:00
netdata_netdata/web/api/queries/weights.h
Costa Tsaousis ccf0f6b6f4
/api/v1/weights endpoint ()
* /api/v1/weights endpoints

* high resolution anomaly rate in parallel with queries; points and options in /api/v1/weights reflect the truth

* context printing

* merged metric_correlations with weights API; added parameter tier to select the tier to run the query; weight api now returns points per tier; added swagger info about weights api

* moved metric_correlations files to web/api/queries as weights

* added contexts filtering; renamed correlated_dimensions; weights API is always enabled; code cleanup

* allow returning zero results
2022-08-01 21:47:14 +03:00

33 lines
1.1 KiB
C

// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef NETDATA_API_WEIGHTS_H
#define NETDATA_API_WEIGHTS_H 1
#include "query.h"
typedef enum {
WEIGHTS_METHOD_MC_KS2 = 1,
WEIGHTS_METHOD_MC_VOLUME = 2,
WEIGHTS_METHOD_ANOMALY_RATE = 3,
} WEIGHTS_METHOD;
typedef enum {
WEIGHTS_FORMAT_CHARTS = 1,
WEIGHTS_FORMAT_CONTEXTS = 2,
} WEIGHTS_FORMAT;
extern int enable_metric_correlations;
extern int metric_correlations_version;
extern WEIGHTS_METHOD default_metric_correlations_method;
extern int web_api_v1_weights (RRDHOST *host, BUFFER *wb, WEIGHTS_METHOD method, WEIGHTS_FORMAT format,
RRDR_GROUPING group, const char *group_options,
long long baseline_after, long long baseline_before,
long long after, long long before,
long long points, RRDR_OPTIONS options, SIMPLE_PATTERN *contexts, int tier, int timeout);
extern WEIGHTS_METHOD weights_string_to_method(const char *method);
extern const char *weights_method_to_string(WEIGHTS_METHOD method);
extern int mc_unittest(void);
#endif //NETDATA_API_WEIGHTS_H