Debian Codegraph @

src/modules/influxdbc/README

raw
1 ASYNC Module
2
3 Daniel-Constantin Mierla
4
5 <[email protected]>
6
7 Edited by
8
9 Daniel-Constantin Mierla
10
11 <[email protected]>
12
13 Copyright © 2024 asipto.com
14 __________________________________________________________________
15
16 Table of Contents
17
18 1. Admin Guide
19
20 1. Overview
21 2. Dependencies
22
23 2.1. Kamailio Modules
24 2.2. External Libraries or Applications
25
26 3. Parameters
27
28 3.1. server (int)
29 3.2. port (int)
30 3.3. database (int)
31
32 4. Functions
33
34 4.1. influxdbc_measure(name)
35 4.2. influxdbc_measureend()
36 4.3. influxdbc_sub(name)
37 4.4. influxdbc_subend()
38 4.5. influxdbc_push()
39 4.6. influxdbc_long(name, value)
40
41 List of Examples
42
43 1.1. Set server parameter
44 1.2. Set port parameter
45 1.3. Set database parameter
46 1.4. influxdbc_measure() usage
47 1.5. influxdbc_measureend() usage
48 1.6. influxdbc_sub() usage
49 1.7. influxdbc_subend() usage
50 1.8. influxdbc_push() usage
51 1.9. influxdbc_long() usage
52
53 Chapter 1. Admin Guide
54
55 Table of Contents
56
57 1. Overview
58 2. Dependencies
59
60 2.1. Kamailio Modules
61 2.2. External Libraries or Applications
62
63 3. Parameters
64
65 3.1. server (int)
66 3.2. port (int)
67 3.3. database (int)
68
69 4. Functions
70
71 4.1. influxdbc_measure(name)
72 4.2. influxdbc_measureend()
73 4.3. influxdbc_sub(name)
74 4.4. influxdbc_subend()
75 4.5. influxdbc_push()
76 4.6. influxdbc_long(name, value)
77
78 1. Overview
79
80 This module provides a client connector for InfluxDB.
81
82 2. Dependencies
83
84 2.1. Kamailio Modules
85 2.2. External Libraries or Applications
86
87 2.1. Kamailio Modules
88
89 The following modules must be loaded before this module:
90 * none.
91
92 2.2. External Libraries or Applications
93
94 The following libraries or applications must be installed before
95 running Kamailio with this module loaded:
96 * none.
97
98 3. Parameters
99
100 3.1. server (int)
101 3.2. port (int)
102 3.3. database (int)
103
104 3.1. server (int)
105
106 Address of InfluxDB server.
107
108 Default value is empty.
109
110 Example 1.1. Set server parameter
111 ...
112 modparam("influxdbc", "server", "127.0.0.1")
113 ...
114
115 3.2. port (int)
116
117 Address of InfluxDB server.
118
119 Default value is 8086.
120
121 Example 1.2. Set port parameter
122 ...
123 modparam("influxdbc", "port", 8808)
124 ...
125
126 3.3. database (int)
127
128 Database of InfluxDB server.
129
130 Default value is empty.
131
132 Example 1.3. Set database parameter
133 ...
134 modparam("influxdbc", "database", "stats")
135 ...
136
137 4. Functions
138
139 4.1. influxdbc_measure(name)
140 4.2. influxdbc_measureend()
141 4.3. influxdbc_sub(name)
142 4.4. influxdbc_subend()
143 4.5. influxdbc_push()
144 4.6. influxdbc_long(name, value)
145
146 4.1. influxdbc_measure(name)
147
148 Start a measure group with the given name.
149
150 This function can be used from ANY_ROUTE.
151
152 Example 1.4. influxdbc_measure() usage
153 ...
154 request_route {
155 ...
156 influxdbc_measure("stats");
157 ...
158 }
159 ...
160
161 4.2. influxdbc_measureend()
162
163 End the current measure group.
164
165 This function can be used from ANY_ROUTE.
166
167 Example 1.5. influxdbc_measureend() usage
168 ...
169 request_route {
170 ...
171 influxdbc_measureend();
172 ...
173 }
174 ...
175
176 4.3. influxdbc_sub(name)
177
178 Start a measure subgroup with the given name.
179
180 This function can be used from ANY_ROUTE.
181
182 Example 1.6. influxdbc_sub() usage
183 ...
184 request_route {
185 ...
186 influxdbc_sub("grp1");
187 ...
188 }
189 ...
190
191 4.4. influxdbc_subend()
192
193 End the current measure subgroup.
194
195 This function can be used from ANY_ROUTE.
196
197 Example 1.7. influxdbc_subend() usage
198 ...
199 request_route {
200 ...
201 influxdbc_subend();
202 ...
203 }
204 ...
205
206 4.5. influxdbc_push()
207
208 Push accumulated values to the server.
209
210 This function can be used from ANY_ROUTE.
211
212 Example 1.8. influxdbc_push() usage
213 ...
214 request_route {
215 ...
216 influxdbc_push();
217 ...
218 }
219 ...
220
221 4.6. influxdbc_long(name, value)
222
223 Save the pair with provided name and value. Both parameters can have
224 variables.
225
226 This function can be used from ANY_ROUTE.
227
228 Example 1.9. influxdbc_long() usage
229 ...
230 request_route {
231 ...
232 influxdbc_long("active", "$shv(active)");
233 ...
234 }
235 ...