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
See [README](https://github.com/AliceO2Group/Configuration#manual-installation) if you're missing any Configuration dependencies.
33
+
35
34
### libcurl (optional)
36
-
It should be present in your system or available in package manager, otherwise see: https://curl.haxx.se/download.html
35
+
It should be present in your system or available in package manager, otherwise go to [curl download page](see: https://curl.haxx.se/download.html).
37
36
38
37
### ApMon (optional)
39
38
~~~
@@ -62,71 +61,68 @@ Metrics consist of 4 parameters: name, value, timestamp and tags.I
62
61
| timestamp | chrono::time_point<std::chrono::system_clock>| no | current timestamp |
63
62
| tags | vector<Tag> | no | -**|
64
63
65
-
**Default tag set is generated per process and its attached to each metric:
64
+
**Default tag set is process specific and included in each metric:
66
65
+ hostname
67
66
+ PID
68
67
+ process name
69
68
70
-
See how backends handle tags in *Monitoring backends* section.
69
+
See how backends handle tags in [Monitoring backends](#monitoring-backends) section.
71
70
72
71
## Creating monitring instance
73
-
The most recommended way of getting (reference to) monitoring instance is via *MonitoringFactory*.
74
-
Before using the factory Configure method must be call providing path to cofiguration file/backend. It should be called only once per process (following calls will not have any effect).
72
+
1. The recommended way of getting (reference to) monitoring instance is via *MonitoringFactory*.
73
+
Before using the factory *Configure* method must be called providing URI to configuration file or backend. It should be called only once per process (following calls will not have any effect).
See [Getting started](#getting-started) section to learn more.
101
99
102
100
## Derived metrics
103
-
Library can calculate Derived metrics - use *addDerivedMetric(std::string name, DerivedMetricMode mode)* with one of two available modes:
104
-
+*DerivedMetricMode::RATE* - rate between two following metrics;
105
-
+*DerivedMetricMode::AVERAGE* - average value of all metrics stored in cache;
101
+
The module can also calculate derived metrics. To do so, use `addDerivedMetric(std::string name, DerivedMetricMode mode)` with one of two available modes:
102
+
+`DerivedMetricMode::RATE` - rate between two following metrics;
103
+
+`DerivedMetricMode::AVERAGE` - average value of all metrics stored in cache;
106
104
107
-
Derived metrics are generated as new value arrives.
108
-
Derived metric will have suffix added to its name.
105
+
Derived metrics are generated each time as new value is passed to the module. Their names are suffixed with derived mode.
109
106
110
107
## Processes monitoring
111
-
To enable process monitoring *ProcessMonitor.enable* flag in configuration file must be set to 1 (see section Configuration file).
112
-
The following metrics are generated every N seconds (N can be specified in the config - *ProcessMonitor.interval*):
113
-
1. etime - elapsed time since the process was started, in the form [[DD-]hh:]mm:ss
114
-
2. pcpu - cpu utilization of the process in "##.#" format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage. It will not add up to 100% unless you are lucky
115
-
3. pmem - ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage
116
-
4. bytesReceived - the total number of bytes of data received by the process (per interface)
117
-
5. bytesTransmitted - the total number of bytes of data transmitted by the process (per interface)
108
+
To enable process monitoring *ProcessMonitor.enable* flag in configuration file must be set to 1 - see [Configuration file](#configuration-file) section. The following metrics are generated every N seconds (N can be specified in the config - *ProcessMonitor.interval*):
109
+
+**etime** - elapsed time since the process was started, in the form [[DD-]hh:]mm:ss
110
+
+**pcpu** - cpu utilization of the process in "##.#" format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage. It will not add up to 100% unless you are lucky
111
+
+**pmem** - ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage
112
+
+**bytesReceived** - the total number of bytes of data received by the process (per interface)
113
+
+**bytesTransmitted** - the total number of bytes of data transmitted by the process (per interface).
118
114
119
115
## Monitoring backends
120
-
Metrics are pushed to one or multiple backends. The library currently supports three backends - see table below. Enabling/Disabling backends is done via configuration file.
116
+
Metrics are pushed to one or multiple backends. The module currently supports three backends - see table below. Enabling/Disabling backends is done via configuration file.
121
117
122
118
| Backend name | Description | Transport | Client-side requirements | Handling tags |
| InfluxDB | InfluxDB time series database | HTTP / UDP | cURL / boost asio | Supported by the backend|
120
+
| InfluxDB | InfluxDB time series database | HTTP / UDP (InfluxDB Line Protocol) | cURL / boost asio | Supported by InfluxDB Line Protocol|
125
121
| ApMonBackend | MonALISA Serivce | UDP | ApMon | Default tags concatenated with entity; Metric tags concatenated with name |
126
-
| InfoLoggerBackned| O2 Logging module | - |- | Displayed in the end |
127
-
| Flume | Collects, aggragate monitoring data |HTTP/JSON | cURL | In header (Flume Event)|
122
+
| InfoLoggerBackned| O2 Logging module | - |(as log message)| Added to the end of message|
123
+
| Flume | Collects, aggragate monitoring data |UDP (JSON)| boost asio| In Flume Event header|
128
124
129
-
Instruction how to install and configure server-sides backends are available in *Server-side backend installation and configuration* chapter.
125
+
Instruction how to install and configure server-sides backends are available in [Server-side backend installation and configuration](#server-side-backend-installation-and-configuration) section.
130
126
131
127
## Configuration file
132
128
+ AppMon
@@ -146,14 +142,14 @@ Instruction how to install and configure server-sides backends are available in
146
142
+ hostname
147
143
+ ProcessMonitor
148
144
+ enable - enable process monitor
149
-
+ interval - updates interval
145
+
+ interval - updates interval[]
150
146
+ DerivedMetrics
151
147
+ maxCacheSize - maximum size of vector
152
148
153
-
See sample in examples/SampleConfig.ini
149
+
See sample in [examples/config-default.ini](https://github.com/awegrzyn/Monitoring/blob/master/examples/config-default.ini).
154
150
155
151
## Getting started
156
-
Examples are available in *example* directory.
152
+
Examples are available in [example](https://github.com/awegrzyn/Monitoring/tree/master/examples) directory.
157
153
158
154
### Sending user defined metric - examples/1-Basic.cxx
## Server-side backend installation and configuration
248
244
249
-
### MonALISA
250
-
##### MonALISA Service
245
+
### MonALISA Service
251
246
To install and configure the MonALISA service (1 central server):
252
-
+ yum install monalisa-service
253
-
+ copy config/ml_env to /opt/monalisa-service/Service/CMD/
254
-
+ copy config/ml.properties to /opt/monalisa-service/Service/myFarm/
255
-
+ copy config/myFarm.conf to /opt/monalisa-service/Service/myFarm/
256
-
+ add following line to iptables and restart it: -A INPUT -p udp -m state --state NEW -m udp --dport 8884 -m comment --comment "MonALISA UDP packets" -j ACCEPT
257
-
+ /sbin/service MLD start
258
-
259
-
##### MonALISA Client
260
-
To install the MonALISA Client run:
261
-
+ yum install monalisa-client
247
+
+ `yum install monalisa-service`
248
+
+ copy `config/ml_env` to `/opt/monalisa-service/Service/CMD/`
249
+
+ copy `config/ml.properties` to `/opt/monalisa-service/Service/myFarm/`
250
+
+ copy `config/myFarm.conf` to `/opt/monalisa-service/Service/myFarm/`
251
+
+ add following line to iptables and restart it: `-A INPUT -p udp -m state --state NEW -m udp --dport 8884 -m comment --comment "MonALISA UDP packets" -j ACCEPT`
252
+
+ `/sbin/service MLD start`
262
253
263
254
### InfluxDB
264
-
Instructions are avaliable here: https://docs.influxdata.com/influxdb/v1.2/introduction/installation/
255
+
Instructions are available at [InfluxDB page](https://docs.influxdata.com/influxdb/v1.2/introduction/installation/).
265
256
266
257
### InfoLogger
267
-
There is no installation/configuration procedure needed.
258
+
The InfoLogger module is shared library which is linked during compilation time.
259
+
260
+
### Flume
261
+
See [Flume User Guide](https://flume.apache.org/FlumeUserGuide.html) documentation.
0 commit comments