forked from netdata/netdata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rrddimvar.h
56 lines (40 loc) · 1.63 KB
/
rrddimvar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef NETDATA_RRDDIMVAR_H
#define NETDATA_RRDDIMVAR_H 1
#include "rrd.h"
// variables linked to individual dimensions
// We link variables to point the values that are already
// calculated / processed by the normal data collection process
// This means, there will be no speed penalty for using
// these variables
struct rrddimvar {
char *prefix;
char *suffix;
char *key_id; // dimension id
char *key_name; // dimension name
char *key_contextid; // context + dimension id
char *key_contextname; // context + dimension name
char *key_fullidid; // chart type.chart id + dimension id
char *key_fullidname; // chart type.chart id + dimension name
char *key_fullnameid; // chart type.chart name + dimension id
char *key_fullnamename; // chart type.chart name + dimension name
RRDVAR_TYPE type;
void *value;
RRDVAR_OPTIONS options;
RRDVAR *var_local_id;
RRDVAR *var_local_name;
RRDVAR *var_family_id;
RRDVAR *var_family_name;
RRDVAR *var_family_contextid;
RRDVAR *var_family_contextname;
RRDVAR *var_host_chartidid;
RRDVAR *var_host_chartidname;
RRDVAR *var_host_chartnameid;
RRDVAR *var_host_chartnamename;
struct rrddim *rrddim;
struct rrddimvar *next;
};
extern void rrddimvar_rename_all(RRDDIM *rd);
extern RRDDIMVAR *rrddimvar_create(RRDDIM *rd, RRDVAR_TYPE type, const char *prefix, const char *suffix, void *value, RRDVAR_OPTIONS options);
extern void rrddimvar_free(RRDDIMVAR *rs);
#endif //NETDATA_RRDDIMVAR_H