Browse code

modules: readme files regenerated - statsd ... [skip ci]

Kamailio Dev authored on 10/06/2021 17:01:14
Showing 1 changed files
... ...
@@ -27,21 +27,23 @@ Eloy Coto Pereiro
27 27
 
28 28
               3.1. statsd_set(key, value)
29 29
               3.2. statsd_gauge(key, value)
30
-              3.3. statsd_start(key)
31
-              3.4. statsd_stop(key)
32
-              3.5. statsd_incr(key)
33
-              3.6. statsd_decr(key)
30
+              3.3. statsd_histogram(key, value)
31
+              3.4. statsd_start(key)
32
+              3.5. statsd_stop(key)
33
+              3.6. statsd_incr(key)
34
+              3.7. statsd_decr(key)
34 35
 
35 36
    List of Examples
36 37
 
37 38
    1.1. Set ip parameter
38 39
    1.2. Set port parameter
39 40
    1.3. statsd_set usage
40
-   1.4. statsd_set usage
41
-   1.5. statsd_start usage
42
-   1.6. statsd_stop usage
43
-   1.7. statsd_incr usage
44
-   1.8. statsd_decr usage
41
+   1.4. statsd_gauge usage
42
+   1.5. statsd_histogram usage
43
+   1.6. statsd_start usage
44
+   1.7. statsd_stop usage
45
+   1.8. statsd_incr usage
46
+   1.9. statsd_decr usage
45 47
 
46 48
 Chapter 1. Admin Guide
47 49
 
... ...
@@ -57,10 +59,11 @@ Chapter 1. Admin Guide
57 59
 
58 60
         3.1. statsd_set(key, value)
59 61
         3.2. statsd_gauge(key, value)
60
-        3.3. statsd_start(key)
61
-        3.4. statsd_stop(key)
62
-        3.5. statsd_incr(key)
63
-        3.6. statsd_decr(key)
62
+        3.3. statsd_histogram(key, value)
63
+        3.4. statsd_start(key)
64
+        3.5. statsd_stop(key)
65
+        3.6. statsd_incr(key)
66
+        3.7. statsd_decr(key)
64 67
 
65 68
 1. Overview
66 69
 
... ...
@@ -103,10 +106,11 @@ modparam("statsd", "port", "8125")
103 106
 
104 107
    3.1. statsd_set(key, value)
105 108
    3.2. statsd_gauge(key, value)
106
-   3.3. statsd_start(key)
107
-   3.4. statsd_stop(key)
108
-   3.5. statsd_incr(key)
109
-   3.6. statsd_decr(key)
109
+   3.3. statsd_histogram(key, value)
110
+   3.4. statsd_start(key)
111
+   3.5. statsd_stop(key)
112
+   3.6. statsd_incr(key)
113
+   3.7. statsd_decr(key)
110 114
 
111 115
 3.1.  statsd_set(key, value)
112 116
 
... ...
@@ -139,7 +143,7 @@ failure_route[tryagain] {
139 143
 
140 144
    The statsd server collects gauges under the stats.gauges prefix.
141 145
 
142
-   Example 1.4. statsd_set usage
146
+   Example 1.4. statsd_gauge usage
143 147
 ...
144 148
 route [gauge_method]{
145 149
     statsd_gauge("method"+$rm, "+1");
... ...
@@ -147,7 +151,23 @@ route [gauge_method]{
147 151
 }
148 152
 ...
149 153
 
150
-3.3.  statsd_start(key)
154
+3.3.  statsd_histogram(key, value)
155
+
156
+   The histograms are a measure of time, but they are calculated at the
157
+   server side. As the data exported by the client is the same, this is
158
+   just an alias for the Timer type.
159
+
160
+   This function can be used in ALL ROUTES.
161
+
162
+   The statsd server collects histograms under the stats.histograms
163
+   prefix.
164
+
165
+   Example 1.5. statsd_histogram usage
166
+...
167
+    statsd_histogram("latency", 1000);
168
+...
169
+
170
+3.4.  statsd_start(key)
151 171
 
152 172
    statsd_start set an avp with the key name, and when statsd_stop(key) is
153 173
    used, the module will send statsd the difference in milliseconds. this
... ...
@@ -161,14 +181,14 @@ route [gauge_method]{
161 181
    count of each timer for each period (by the time it can be seen in
162 182
    graphite, that's usually per minute).
163 183
 
164
-   Example 1.5. statsd_start usage
184
+   Example 1.6. statsd_start usage
165 185
 ...
166 186
 statsd_start("long_mysql_query");
167 187
 sql_query("ca", "select sleep(0.2)", "ra");
168 188
 statsd_stop("long_mysql_query");
169 189
 ...
170 190
 
171
-3.4.  statsd_stop(key)
191
+3.5.  statsd_stop(key)
172 192
 
173 193
    statsd_stop(key) get the avp string with the key and calculate the
174 194
    difference from the start time. When finished the milliseconds used
... ...
@@ -176,33 +196,33 @@ statsd_stop("long_mysql_query");
176 196
 
177 197
    This function can be used in all routes.
178 198
 
179
-   Example 1.6. statsd_stop usage
199
+   Example 1.7. statsd_stop usage
180 200
 ...
181 201
 statsd_start("long_mysql_query");
182 202
 sql_query("ca", "select sleep(0.2)", "ra");
183 203
 statsd_stop("long_mysql_query");
184 204
 ...
185 205
 
186
-3.5.  statsd_incr(key)
206
+3.6.  statsd_incr(key)
187 207
 
188 208
    Increment a statsd counter
189 209
 
190 210
    This function can be used in all routes.
191 211
 
192
-   Example 1.7. statsd_incr usage
212
+   Example 1.8. statsd_incr usage
193 213
 ...
194 214
 if(geoip_match("$si", "src")){
195 215
     statsd_incr("country."+$(gip(src=>cc)));
196 216
 }
197 217
 ...
198 218
 
199
-3.6.  statsd_decr(key)
219
+3.7.  statsd_decr(key)
200 220
 
201 221
    Decrement a counter
202 222
 
203 223
    This function can be used in all routes.
204 224
 
205
-   Example 1.8. statsd_decr usage
225
+   Example 1.9. statsd_decr usage
206 226
 ...
207 227
 if (t_check_status("408")) {
208 228
     statsd_decr("kamailio.successfulCalls");