Summarize disk device metrics, add some more READMEs.

This commit is contained in:
Mark Nellemann 2021-05-18 07:14:57 +02:00
parent cca1c099df
commit b6cae0da9e
12 changed files with 229 additions and 163 deletions

View file

@ -1,49 +1,18 @@
# System Monitor
# System Monitor / System Observer
... or some better name.
## Agent
## Client
Runs on your host and collects metrics. Metrics are aggregated and sent to central *collector*.
Runs on your hosts and collects metrics. Metrics are aggregated and sent to the central *server*.
## Collector
## Server
Receives aggregated measurements from agents and saves metrics info InfluxDB.
Receives aggregated measurements from clients and saves metrics into InfluxDB.
### Build & Test
Use the gradle build tool, which will download all required dependencies:
```shell
./gradlew clean build
```
### Local Testing
#### InfluxDB container
Start the InfluxDB container:
```shell
docker run --name=influxdb --rm -d -p 8086:8086 influxdb:1.8-alpine
```
To execute the Influx client from within the container:
```shell
docker exec -it influxdb influx
```
#### Grafana container
Start the Grafana container, linking it to the InfluxDB container:
```shell
docker run --name grafana --link influxdb:influxdb --rm -d -p 3000:3000 grafana/grafana:7.1.3
```
Setup Grafana to connect to the InfluxDB container by defining a new datasource on URL *http://influxdb:8086* named *sysmon*.
## Plugins
Loaded by the client and provides extensions for doing the actual metric monitoring.

13
client/README.md Normal file
View file

@ -0,0 +1,13 @@
# Client
Client component.
## Development
### Build & Test
Use the gradle build tool, which will download all required dependencies:
```shell
./gradlew clean build
```

3
plugins/README.md Normal file
View file

@ -0,0 +1,3 @@
# Plugins
Collections of base plugins.

View file

@ -11,19 +11,19 @@ import java.util.regex.Pattern;
public class AixDiskStat {
private static final Logger log = LoggerFactory.getLogger(AixProcessorStat.class);
private static final Logger log = LoggerFactory.getLogger(AixDiskStat.class);
// Disks: % tm_act Kbps tps Kb_read Kb_wrtn
// hdisk0 1.0 752.0 81.0 740 12
private final Pattern pattern = Pattern.compile("^(hdisk\\d+)\\s+(\\d+\\.?\\d*)\\s+\\s+(\\d+\\.?\\d*)\\s+\\s+(\\d+\\.?\\d*)\\s+(\\d+)\\s+(\\d+)");
private String device;
private Float tmAct; // Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive).
private Float kbps; // Indicates the amount of data transferred (read or written) to the drive in KB per second.
private Float tps; // Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size.
private Long kbRead; // The total number of KB read.
private Long kbWritten; // The total number of KB written.
//private String device;
//private Float tmAct = 0.0f; // Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive).
private Float kbps = 0.0f; // Indicates the amount of data transferred (read or written) to the drive in KB per second.
private Float tps = 0.0f; // Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size.
private Long kbRead = 0l; // The total number of KB read.
private Long kbWritten = 0l; // The total number of KB written.
AixDiskStat(List<String> lines) {
@ -33,13 +33,12 @@ public class AixDiskStat {
if (line.startsWith("hdisk")) {
Matcher matcher = pattern.matcher(line);
if (matcher.find() && matcher.groupCount() == 6) {
device = matcher.group(1);
tmAct = Float.parseFloat(matcher.group(2));
kbps = Float.parseFloat(matcher.group(3));
tps = Float.parseFloat(matcher.group(4));
kbRead = Long.parseLong(matcher.group(5));
kbWritten = Long.parseLong(matcher.group(6));
break;
//device = matcher.group(1);
//tmAct = Float.parseFloat(matcher.group(2));
kbps += Float.parseFloat(matcher.group(3));
tps += Float.parseFloat(matcher.group(4));
kbRead += Long.parseLong(matcher.group(5));
kbWritten += Long.parseLong(matcher.group(6));
}
}
@ -50,16 +49,13 @@ public class AixDiskStat {
public Map<String, String> getTags() {
Map<String, String> tags = new HashMap<>();
tags.put("device", device);
return tags;
}
public Map<String, Object> getFields() {
Map<String, Object> fields = new HashMap<>();
fields.put("reads", kbRead * 1024); // from Kb to b
fields.put("writes", kbWritten * 1024); // from Kb to b
fields.put("reads", kbRead * 1024); // from Kb to bytes
fields.put("writes", kbWritten * 1024); // from Kb to bytes
return fields;
}
}

View file

@ -15,7 +15,7 @@ class AixDiskTest extends Specification {
AixDiskStat stats = extension.processCommandOutput(lines)
then:
stats.getTags().get("device") == "hdisk0"
//stats.getTags().get("device") == "hdisk0"
stats.getFields().get("reads") == 757760l
stats.getFields().get("writes") == 12288l

View file

@ -72,16 +72,17 @@ public class LinuxDiskExtension implements MetricExtension {
protected LinuxDiskProcLine processFileOutput(List<String> inputLines) {
List<String> lines = new ArrayList<>(inputLines.size());
for(String line : inputLines) {
String[] splitStr = line.trim().split("\\s+");
String device = splitStr[2];
if (device.matches("[sv]d[a-z]{1}") || device.matches("nvme[0-9]n[0-9]")) {
//log.warn("Going for: " + line);
return new LinuxDiskProcLine(line);
lines.add(line);
}
}
return null;
return new LinuxDiskProcLine(lines);
}
}

View file

@ -1,9 +1,17 @@
package org.sysmon.plugins.sysmon_linux;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
public class LinuxDiskProcLine {
// Sectors to bytes - each sector is 512 bytes - https://lkml.org/lkml/2015/8/17/269
static final private int SECTOR_BYTE_SIZE = 512;
private static final int SECTOR_BYTE_SIZE = 512;
private static final Logger log = LoggerFactory.getLogger(LinuxDiskProcLine.class);
/*
== ===================================
@ -41,57 +49,56 @@ public class LinuxDiskProcLine {
== =====================================
*/
private final int major;
private final int minor;
private final String device; // device name
private final Long readsCompleted; // successfully
private final Long readsMerged;
private final Long sectorsRead; // 512 bytes pr. sector
private final Long timeSpentReading; // ms
private final Long writesCompleted; // successfully
private final Long writesMerged;
private final Long sectorsWritten; // 512 bytes pr. sector
private final Long timeSpentWriting; // ms
private final Long ioInProgress;
private final Long timeSpentOnIo; // ms
private final Long timeSpentOnIoWeighted;
private Long readsCompleted = 0l; // successfully
private Long readsMerged = 0l;
private Long sectorsRead = 0l; // 512 bytes pr. sector
private Long timeSpentReading = 0l; // ms
private Long writesCompleted = 0l; // successfully
private Long writesMerged = 0l;
private Long sectorsWritten = 0l; // 512 bytes pr. sector
private Long timeSpentWriting = 0l; // ms
private Long ioInProgress = 0l;
private Long timeSpentOnIo = 0l; // ms
private Long timeSpentOnIoWeighted = 0l;
private final Long discardsCompleted; // successfully
private final Long discardsMerged;
private final Long sectorsDiscarded; // 512 bytes pr. sector
private final Long timeSpentDiscarding; // ms
private Long discardsCompleted = 0l; // successfully
private Long discardsMerged = 0l;
private Long sectorsDiscarded = 0l; // 512 bytes pr. sector
private Long timeSpentDiscarding = 0l; // ms
private final Long flushRequestsCompleted;
private final Long timeSpentFlushing; // ms
private Long flushRequestsCompleted = 0l;
private Long timeSpentFlushing = 0l; // ms
LinuxDiskProcLine(String procString) {
LinuxDiskProcLine(List<String> procLines) {
String[] splitStr = procString.trim().split("\\s+");
for(String procLine : procLines) {
String[] splitStr = procLine.trim().split("\\s+");
if (splitStr.length < 14) {
throw new UnsupportedOperationException("Linux proc DISK string error: " + procString);
throw new UnsupportedOperationException("Linux proc DISK string error: " + procLine);
}
this.major = Integer.parseInt(splitStr[0]);
this.minor = Integer.parseInt(splitStr[1]);
this.device = splitStr[2];
this.readsCompleted = Long.parseLong(splitStr[3]);
this.readsMerged = Long.parseLong(splitStr[4]);
this.sectorsRead = Long.parseLong(splitStr[5]);
this.timeSpentReading = Long.parseLong(splitStr[6]);
this.writesCompleted = Long.parseLong(splitStr[7]);
this.writesMerged = Long.parseLong(splitStr[8]);
this.sectorsWritten = Long.parseLong(splitStr[9]);
this.timeSpentWriting = Long.parseLong(splitStr[10]);
this.ioInProgress = Long.parseLong(splitStr[11]);
this.timeSpentOnIo = Long.parseLong(splitStr[12]);
this.timeSpentOnIoWeighted = Long.parseLong(splitStr[13]);
//this.major = Integer.parseInt(splitStr[0]);
//this.minor = Integer.parseInt(splitStr[1]);
//this.device = splitStr[2];
this.readsCompleted += Long.parseLong(splitStr[3]);
this.readsMerged += Long.parseLong(splitStr[4]);
this.sectorsRead += Long.parseLong(splitStr[5]);
this.timeSpentReading += Long.parseLong(splitStr[6]);
this.writesCompleted += Long.parseLong(splitStr[7]);
this.writesMerged += Long.parseLong(splitStr[8]);
this.sectorsWritten += Long.parseLong(splitStr[9]);
this.timeSpentWriting += Long.parseLong(splitStr[10]);
this.ioInProgress += Long.parseLong(splitStr[11]);
this.timeSpentOnIo += Long.parseLong(splitStr[12]);
this.timeSpentOnIoWeighted += Long.parseLong(splitStr[13]);
if (splitStr.length >= 18) {
this.discardsCompleted = Long.parseLong(splitStr[10]);
this.discardsMerged = Long.parseLong(splitStr[11]);
this.sectorsDiscarded = Long.parseLong(splitStr[12]);
this.timeSpentDiscarding = Long.parseLong(splitStr[13]);
this.discardsCompleted += Long.parseLong(splitStr[10]);
this.discardsMerged += Long.parseLong(splitStr[11]);
this.sectorsDiscarded += Long.parseLong(splitStr[12]);
this.timeSpentDiscarding += Long.parseLong(splitStr[13]);
} else {
this.discardsCompleted = null;
this.discardsMerged = null;
@ -100,17 +107,13 @@ public class LinuxDiskProcLine {
}
if (splitStr.length == 20) {
this.flushRequestsCompleted = Long.parseLong(splitStr[14]);
this.timeSpentFlushing = Long.parseLong(splitStr[15]);
this.flushRequestsCompleted += Long.parseLong(splitStr[14]);
this.timeSpentFlushing += Long.parseLong(splitStr[15]);
} else {
this.flushRequestsCompleted = null;
this.timeSpentFlushing = null;
}
}
public String getDevice() {
return device;
}
public Long getTimeSpentOnIo() {

View file

@ -19,7 +19,6 @@ public class LinuxDiskStat {
LinuxDiskStat(LinuxDiskProcLine proc1, LinuxDiskProcLine proc2) {
device = proc1.getDevice();
iotime = proc2.getTimeSpentOnIo() - proc1.getTimeSpentOnIo();
writes = proc2.getBytesWritten() - proc1.getBytesWritten();
reads = proc2.getBytesRead() - proc1.getBytesRead();
@ -28,7 +27,6 @@ public class LinuxDiskStat {
public Map<String, String> getTags() {
Map<String, String> tags = new HashMap<>();
tags.put("device", device);
return tags;
}

View file

@ -16,8 +16,7 @@ class LinuxDiskTest extends Specification {
LinuxDiskProcLine procLine = extension.processFileOutput(lines)
then:
procLine.getDevice() == "nvme0n1"
procLine.getTimeSpentOnIo() == 79560l
procLine.getTimeSpentOnIo() == 11145860l
}
@ -34,10 +33,9 @@ class LinuxDiskTest extends Specification {
LinuxDiskStat diskStat = new LinuxDiskStat(procLine1, procLine2)
then:
diskStat.getTags().get("device") == "nvme0n1"
diskStat.getFields().get("iotime") == 272l
diskStat.getFields().get("writes") == 40407040l
diskStat.getFields().get("reads") == 80896l
diskStat.getFields().get("iotime") == 180l
diskStat.getFields().get("writes") == 108371968l
diskStat.getFields().get("reads") == 69632l
}
}

View file

@ -1,15 +1,37 @@
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
259 0 nvme0n1 89537 20714 7233785 14446 43973 46453 4226674 41656 0 79560 58009 0 0 0 0 2066 1906
259 1 nvme0n1p1 126 510 7421 38 2 0 2 0 0 84 38 0 0 0 0 0 0
259 2 nvme0n1p2 100 0 7383 20 14 13 216 12 0 100 32 0 0 0 0 0 0
259 3 nvme0n1p3 89207 20204 7213629 14363 41894 46440 4226456 39721 0 79456 54085 0 0 0 0 0 0
253 0 dm-0 109349 0 7211632 27872 89689 0 4226456 291556 0 80344 319428 0 0 0 0 0 0
253 1 dm-1 109109 0 7201162 28096 88502 0 4241000 276900 0 80356 304996 0 0 0 0 0 0
253 2 dm-2 194 0 8616 16 0 0 0 0 0 52 16 0 0 0 0 0 0
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 16 sdb 15523 0 778578 15410 1235474 0 2576771080 15272521 0 2807848 13508964 4483 0 10704576 430177
8 17 sdb1 61 0 7808 25 0 0 0 0 0 124 0 0 0 0 0
8 18 sdb2 15432 0 765650 15368 1235474 0 2576771080 15272521 0 2807776 13508964 4483 0 10704576 430177
8 0 sda 104 0 14592 38 0 0 0 0 0 84 0 0 0 0 0
8 1 sda1 40 0 5120 13 0 0 0 0 0 44 0 0 0 0 0
8 2 sda2 35 0 4480 11 0 0 0 0 0 48 0 0 0 0 0
8 112 sdh 15436 0 774800 14143 1291771 0 2668257800 14432388 0 2766076 12590576 4481 0 10753632 429042
8 113 sdh1 63 0 8064 25 0 0 0 0 0 108 0 0 0 0 0
8 114 sdh2 15341 0 761104 14099 1291771 0 2668257800 14432388 0 2766004 12590576 4481 0 10753632 429042
8 80 sdf 15469 0 780896 14971 1236059 0 2578265288 15245725 0 2806616 13478156 4467 0 10718944 429768
8 81 sdf1 51 0 6528 21 0 0 0 0 0 108 0 0 0 0 0
8 82 sdf2 15386 0 768608 14933 1236059 0 2578265288 15245725 0 2806536 13478156 4467 0 10718944 429768
8 64 sde 84 0 12032 31 0 0 0 0 0 68 0 0 0 0 0
8 65 sde1 35 0 4480 11 0 0 0 0 0 48 0 0 0 0 0
8 66 sde2 21 0 2688 7 0 0 0 0 0 32 0 0 0 0 0
8 48 sdd 15477 0 783016 14070 1294855 0 2674196624 14430912 0 2764980 12589804 4486 0 10742472 431291
8 49 sdd1 54 0 6912 22 0 0 0 0 0 124 0 0 0 0 0
8 50 sdd2 15391 0 770728 14031 1294855 0 2674196624 14430912 0 2764892 12589804 4486 0 10742472 431291
8 96 sdg 84 0 12032 30 0 0 0 0 0 68 0 0 0 0 0
8 97 sdg1 35 0 4480 9 0 0 0 0 0 48 0 0 0 0 0
8 98 sdg2 21 0 2688 6 0 0 0 0 0 36 0 0 0 0 0
8 32 sdc 163 0 23552 53 0 0 0 0 0 120 0 0 0 0 0
8 33 sdc1 61 0 7808 17 0 0 0 0 0 80 0 0 0 0 0
8 34 sdc2 49 0 6272 14 0 0 0 0 0 64 0 0 0 0 0
253 0 dm-0 61671 33607 3083626 59257 5058159 549228 10497490792 60849327 0 2963124 53553488 17917 0 42919624 1720506
253 1 dm-1 119 0 15232 56 0 0 0 0 0 128 56 0 0 0 0
253 2 dm-2 95933 0 3059818 150440 1851360 0 10497490792 14498304 0 2903572 16394660 17917 0 42919624 1745916
253 3 dm-3 95068 0 2947010 147552 1848978 0 10497185896 14497724 0 2894408 16391216 17917 0 42919624 1745940
253 4 dm-4 765 0 99968 2984 2382 0 304896 2260 0 10944 5244 0 0 0 0

View file

@ -1,15 +1,37 @@
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
259 0 nvme0n1 89537 20714 7233943 14446 44354 46795 4305594 42289 0 79832 58659 0 0 0 0 2078 1923
259 1 nvme0n1p1 126 510 7421 38 2 0 2 0 0 84 38 0 0 0 0 0 0
259 2 nvme0n1p2 100 0 7383 20 14 13 216 12 0 100 32 0 0 0 0 0 0
259 3 nvme0n1p3 89207 20204 7213629 14363 42263 46782 4305376 40338 0 79728 54701 0 0 0 0 0 0
253 0 dm-0 109349 0 7211632 27872 90394 0 4305376 293624 0 80628 321496 0 0 0 0 0 0
253 1 dm-1 109109 0 7201162 28096 89181 0 4320008 278720 0 80640 306816 0 0 0 0 0 0
253 2 dm-2 194 0 8616 16 0 0 0 0 0 52 16 0 0 0 0 0 0
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 16 sdb 15524 0 778714 15411 1235495 0 2576820040 15272945 0 2807896 13509340 4483 0 10704576 430177
8 17 sdb1 61 0 7808 25 0 0 0 0 0 124 0 0 0 0 0
8 18 sdb2 15433 0 765786 15370 1235495 0 2576820040 15272945 0 2807824 13509340 4483 0 10704576 430177
8 0 sda 104 0 14592 38 0 0 0 0 0 84 0 0 0 0 0
8 1 sda1 40 0 5120 13 0 0 0 0 0 44 0 0 0 0 0
8 2 sda2 35 0 4480 11 0 0 0 0 0 48 0 0 0 0 0
8 112 sdh 15436 0 774800 14143 1291798 0 2668314304 14432870 0 2766120 12591012 4481 0 10753632 429042
8 113 sdh1 63 0 8064 25 0 0 0 0 0 108 0 0 0 0 0
8 114 sdh2 15341 0 761104 14099 1291798 0 2668314304 14432870 0 2766048 12591012 4481 0 10753632 429042
8 80 sdf 15469 0 780896 14971 1236084 0 2578318232 15246204 0 2806660 13478588 4467 0 10718944 429768
8 81 sdf1 51 0 6528 21 0 0 0 0 0 108 0 0 0 0 0
8 82 sdf2 15386 0 768608 14933 1236084 0 2578318232 15246204 0 2806580 13478588 4467 0 10718944 429768
8 64 sde 84 0 12032 31 0 0 0 0 0 68 0 0 0 0 0
8 65 sde1 35 0 4480 11 0 0 0 0 0 48 0 0 0 0 0
8 66 sde2 21 0 2688 7 0 0 0 0 0 32 0 0 0 0 0
8 48 sdd 15477 0 783016 14070 1294878 0 2674249880 14431341 0 2765024 12590196 4486 0 10742472 431291
8 49 sdd1 54 0 6912 22 0 0 0 0 0 124 0 0 0 0 0
8 50 sdd2 15391 0 770728 14031 1294878 0 2674249880 14431341 0 2764936 12590196 4486 0 10742472 431291
8 96 sdg 84 0 12032 30 0 0 0 0 0 68 0 0 0 0 0
8 97 sdg1 35 0 4480 9 0 0 0 0 0 48 0 0 0 0 0
8 98 sdg2 21 0 2688 6 0 0 0 0 0 36 0 0 0 0 0
8 32 sdc 163 0 23552 53 0 0 0 0 0 120 0 0 0 0 0
8 33 sdc1 61 0 7808 17 0 0 0 0 0 80 0 0 0 0 0
8 34 sdc2 49 0 6272 14 0 0 0 0 0 64 0 0 0 0 0
253 0 dm-0 61672 33607 3083762 59259 5058255 549228 10497702456 60851154 0 2963168 53555128 17917 0 42919624 1720506
253 1 dm-1 119 0 15232 56 0 0 0 0 0 128 56 0 0 0 0
253 2 dm-2 95934 0 3059954 150440 1851381 0 10497702456 14498688 0 2903616 16395044 17917 0 42919624 1745916
253 3 dm-3 95069 0 2947146 147552 1848999 0 10497397560 14498108 0 2894452 16391600 17917 0 42919624 1745940
253 4 dm-4 765 0 99968 2984 2382 0 304896 2260 0 10944 5244 0 0 0 0

41
server/README.md Normal file
View file

@ -0,0 +1,41 @@
# Server
Server component.
## Development
### Build & Test
Use the gradle build tool, which will download all required dependencies:
```shell
./gradlew clean build
```
### Local Testing
#### InfluxDB container
Start the InfluxDB container:
```shell
docker run --name=influxdb --rm -d -p 8086:8086 influxdb:1.8-alpine
```
To execute the Influx client from within the container:
```shell
docker exec -it influxdb influx
```
#### Grafana container
Start the Grafana container, linking it to the InfluxDB container:
```shell
docker run --name grafana --link influxdb:influxdb --rm -d -p 3000:3000 grafana/grafana:7.1.3
```
Setup Grafana to connect to the InfluxDB container by defining a new datasource on URL *http://influxdb:8086* named *sysmon*.