You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metrics need to match backends verbosity in order to be sent, eg. backend with `/info` verbosity will accept `Info` and `Prod` metrics only.
108
106
109
-
110
107
#### Tags
111
108
Each metric can be tagged with any number of [predefined tags](include/Monitoring/Tags.h).
112
109
In order to do so use `addTag(tags::Key, tags::Value)` or `addTag(tags::Key, unsigned short)` methods. The latter method allows assigning numeric value to a tag.
@@ -153,18 +150,18 @@ See how it works in the example: [examples/10-Buffering.cxx](examples/10-Bufferi
153
150
154
151
### Calculating derived metrics
155
152
The module can calculate derived metrics. To do so, use optional `DerivedMetricMode mode` parameter of `send` method:
156
-
+`DerivedMetricMode::NONE` - no action,
157
-
+`DerivedMetricMode::RATE` - rate between two following metrics,
158
-
+`DerivedMetricMode::AVERAGE` - average value of all metrics stored in cache.
153
+
+`DerivedMetricMode::NONE` - no action,
154
+
+`DerivedMetricMode::RATE` - rate between two following metrics,
155
+
+`DerivedMetricMode::AVERAGE` - average value of all metrics stored in cache.
159
156
160
157
Derived metrics are generated each time as new value is passed to the module. Their names are suffixed with derived mode name.
161
158
162
159
See how it works in the example: [examples/4-RateDerivedMetric.cxx](examples/4-RateDerivedMetric.cxx).
163
160
164
161
### Global tags
165
162
Glabal tags are tags that are added to each metric. The following tags are set to global by library itself:
166
-
-`hostname`
167
-
-`name` - process name
163
+
+`hostname`
164
+
+`name` - process name
168
165
169
166
You can add your own global tag by calling `addGlobalTag(std::string_view key, std::string_view value)` or `addGlobalTag(tags::Key, tags::Value)`.
170
167
@@ -173,9 +170,9 @@ You can add your own global tag by calling `addGlobalTag(std::string_view key, s
173
170
enableProcessMonitoring([interval in seconds]);
174
171
```
175
172
The following metrics are generated every interval:
176
-
+ **cpuUsedPercentage** - percentage of a core usage over time interval
177
-
+ **involuntaryContextSwitches** - involuntary context switches over time interval
178
-
+ **memoryUsagePercentage** - ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage (Linux only)
173
+
+ **cpuUsedPercentage** - percentage of a core usage over time interval
174
+
+ **involuntaryContextSwitches** - involuntary context switches over time interval
175
+
+ **memoryUsagePercentage** - ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage (Linux only)
179
176
180
177
### Automatic metric updates
181
178
Sometimes it's necessary to provide value every exact interval of time (even though value does not change). This can be done using `AutoPushMetric`.
@@ -188,8 +185,8 @@ See how it works in the example: [examples/11-AutoUpdate.cxx](examples/11-AutoUp
188
185
## System monitoring, server-side backends installation and configuration
189
186
This guide explains manual installation. For `ansible` deployment see [AliceO2Group/system-configuration](https://gitlab.cern.ch/AliceO2Group/system-configuration/tree/master/ansible) gitlab repo.
0 commit comments