summaryrefslogtreecommitdiffstats
path: root/telemetry/data_model.h
blob: b1c4ae7e5e358258de5a8f3e8c09e1a28d7b9e0e (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
 * Copyright (c) 2022 Cisco and/or its affiliates.
 */

#include "utils/common/common.h"

#define KAFKA_TOPIC_KEY "_TOPIC"
#define KAFKA_STREAM_TOPIC "stream"
#define KAFKA_METADATA_TOPIC "metadata"

/************** DATA SOURCES ******************************/
data_source_t packets_dsrc[1] = {
    {"packets", DS_TYPE_GAUGE, 0, NAN},
};

data_source_t interests_dsrc[1] = {
    {"interests", DS_TYPE_GAUGE, 0, NAN},
};

data_source_t data_dsrc[1] = {
    {"data", DS_TYPE_GAUGE, 0, NAN},
};

data_source_t combined_dsrc[2] = {
    {"packets", DS_TYPE_DERIVE, 0, NAN},
    {"bytes", DS_TYPE_DERIVE, 0, NAN},
};

/************** DATA SETS NODE ****************************/
data_set_t pkts_processed_ds = {
    "pkts_processed",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t pkts_interest_count_ds = {
    "pkts_interest_count",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t pkts_data_count_ds = {
    "pkts_data_count",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t pkts_from_cache_count_ds = {
    "pkts_from_cache_count",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t pkts_no_pit_count_ds = {
    "pkts_no_pit_count",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t pit_expired_count_ds = {
    "pit_expired_count",
    STATIC_ARRAY_SIZE(interests_dsrc),
    interests_dsrc,
};

data_set_t cs_expired_count_ds = {
    "cs_expired_count",
    STATIC_ARRAY_SIZE(data_dsrc),
    data_dsrc,
};

data_set_t cs_lru_count_ds = {
    "cs_lru_count",
    STATIC_ARRAY_SIZE(data_dsrc),
    data_dsrc,
};

data_set_t pkts_drop_no_buf_ds = {
    "pkts_drop_no_buf",
    STATIC_ARRAY_SIZE(packets_dsrc),
    packets_dsrc,
};

data_set_t interests_aggregated_ds = {
    "interests_aggregated",
    STATIC_ARRAY_SIZE(interests_dsrc),
    interests_dsrc,
};

data_set_t interests_retx_ds = {
    "interests_retx",
    STATIC_ARRAY_SIZE(interests_dsrc),
    interests_dsrc,
};

data_set_t interests_hash_collision_ds = {
    "interests_hash_collision",
    STATIC_ARRAY_SIZE(interests_dsrc),
    interests_dsrc,
};

data_set_t pit_entries_count_ds = {
    "pit_entries_count",
    STATIC_ARRAY_SIZE(interests_dsrc),
    interests_dsrc,
};

data_set_t cs_entries_count_ds = {
    "cs_entries_count",
    STATIC_ARRAY_SIZE(data_dsrc),
    data_dsrc,
};

data_set_t cs_entries_ntw_count_ds = {
    "cs_entries_ntw_count",
    STATIC_ARRAY_SIZE(data_dsrc),
    data_dsrc,
};

/************** DATA SETS FACE ****************************/
data_set_t irx_ds = {
    "irx",
    STATIC_ARRAY_SIZE(combined_dsrc),
    combined_dsrc,
};

data_set_t itx_ds = {
    "itx",
    STATIC_ARRAY_SIZE(combined_dsrc),
    combined_dsrc,
};

data_set_t drx_ds = {
    "drx",
    STATIC_ARRAY_SIZE(combined_dsrc),
    combined_dsrc,
};

data_set_t dtx_ds = {
    "dtx",
    STATIC_ARRAY_SIZE(combined_dsrc),
    combined_dsrc,
};