Merged in development (pull request #8)
Update documentation and example dashboards.
This commit is contained in:
commit
c823160bbe
40
README.md
40
README.md
|
@ -5,6 +5,26 @@ Java based system monitoring solution with support for plugins.
|
||||||
- Example dashboards are provided in the [doc/](doc) folder, which can be imported into your Grafana installation.
|
- Example dashboards are provided in the [doc/](doc) folder, which can be imported into your Grafana installation.
|
||||||
- Screenshots are available in the [downloads](https://bitbucket.org/mnellemann/sysmon/downloads/) section.
|
- Screenshots are available in the [downloads](https://bitbucket.org/mnellemann/sysmon/downloads/) section.
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
### Client
|
||||||
|
|
||||||
|
Runs on your hosts and collects metrics, which are sent to the central *server*.
|
||||||
|
|
||||||
|
[More information](client/README.md).
|
||||||
|
|
||||||
|
### Server
|
||||||
|
|
||||||
|
Receives aggregated metrics from clients and saves these into InfluxDB.
|
||||||
|
|
||||||
|
[More information](server/README.md).
|
||||||
|
|
||||||
|
### Plugins
|
||||||
|
|
||||||
|
Loaded by the client and provides extensions for doing the actual collecting of metrics.
|
||||||
|
|
||||||
|
[More information](plugins/README.md).
|
||||||
|
|
||||||
|
|
||||||
## Known problems
|
## Known problems
|
||||||
|
|
||||||
|
@ -25,23 +45,3 @@ If you rename a host, the metrics in InfluxDB will still be available by the old
|
||||||
USE sysmon;
|
USE sysmon;
|
||||||
DELETE WHERE hostname = 'unknown';
|
DELETE WHERE hostname = 'unknown';
|
||||||
```
|
```
|
||||||
|
|
||||||
## Components
|
|
||||||
|
|
||||||
### Client
|
|
||||||
|
|
||||||
Runs on your hosts and collects metrics, which are sent to the central *server*.
|
|
||||||
|
|
||||||
[More information](client/README.md).
|
|
||||||
|
|
||||||
### Server
|
|
||||||
|
|
||||||
Receives aggregated metrics from clients and saves these into InfluxDB.
|
|
||||||
|
|
||||||
[More information](server/README.md).
|
|
||||||
|
|
||||||
### Plugins
|
|
||||||
|
|
||||||
Loaded by the client and provides extensions for doing the actual collecting of metrics.
|
|
||||||
|
|
||||||
[More information](plugins/README.md).
|
|
|
@ -65,7 +65,7 @@
|
||||||
"gnetId": null,
|
"gnetId": null,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": null,
|
"id": null,
|
||||||
"iteration": 1631005716742,
|
"iteration": 1631013342292,
|
||||||
"links": [],
|
"links": [],
|
||||||
"panels": [
|
"panels": [
|
||||||
{
|
{
|
||||||
|
@ -126,6 +126,7 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"alias": "$col",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -893,6 +894,7 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"alias": "$col",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -1086,6 +1088,7 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"alias": "$col",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -1255,6 +1258,7 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"alias": "$col",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -1830,7 +1834,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Running Processes - By Processor Time",
|
"title": "Running Processes - User Time",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1966,7 +1970,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Running Processes - By Memory Usage",
|
"title": "Running Processes - Resident Memory",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2019,7 +2023,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Sysmon - Overview",
|
"title": "Sysmon - Host Overview",
|
||||||
"uid": "QkVPjseMk",
|
"uid": "QkVPjseMk",
|
||||||
"version": 44
|
"version": 46
|
||||||
}
|
}
|
|
@ -34,6 +34,12 @@
|
||||||
"name": "Stat",
|
"name": "Stat",
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "panel",
|
||||||
|
"id": "table",
|
||||||
|
"name": "Table",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "panel",
|
"type": "panel",
|
||||||
"id": "timeseries",
|
"id": "timeseries",
|
||||||
|
@ -59,7 +65,7 @@
|
||||||
"gnetId": null,
|
"gnetId": null,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": null,
|
"id": null,
|
||||||
"iteration": 1631005248811,
|
"iteration": 1631013505736,
|
||||||
"links": [],
|
"links": [],
|
||||||
"panels": [
|
"panels": [
|
||||||
{
|
{
|
||||||
|
@ -83,7 +89,11 @@
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "thresholds"
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"align": "left",
|
||||||
|
"displayMode": "auto"
|
||||||
},
|
},
|
||||||
"mappings": [],
|
"mappings": [],
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
|
@ -94,46 +104,10 @@
|
||||||
"value": null
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"unit": "string"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": []
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "base_process.user"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "displayName",
|
|
||||||
"value": "User"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "base_process.group"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "displayName",
|
|
||||||
"value": "Group"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "base_process.path"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "displayName",
|
|
||||||
"value": "Path"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"gridPos": {
|
"gridPos": {
|
||||||
"h": 6,
|
"h": 6,
|
||||||
|
@ -143,29 +117,25 @@
|
||||||
},
|
},
|
||||||
"id": 16,
|
"id": 16,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"showHeader": true,
|
||||||
"graphMode": "none",
|
"sortBy": []
|
||||||
"justifyMode": "center",
|
|
||||||
"orientation": "vertical",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"text": {},
|
|
||||||
"textMode": "value_and_name"
|
|
||||||
},
|
},
|
||||||
"pluginVersion": "8.0.6",
|
"pluginVersion": "8.0.6",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"groupBy": [],
|
"groupBy": [
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"pid"
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
],
|
||||||
"measurement": "base_process",
|
"measurement": "base_process",
|
||||||
"orderByTime": "ASC",
|
"orderByTime": "ASC",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "table",
|
||||||
"select": [
|
"select": [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -174,6 +144,10 @@
|
||||||
],
|
],
|
||||||
"type": "field"
|
"type": "field"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "last"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"user"
|
"user"
|
||||||
|
@ -188,6 +162,10 @@
|
||||||
],
|
],
|
||||||
"type": "field"
|
"type": "field"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "last"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"group"
|
"group"
|
||||||
|
@ -198,13 +176,17 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"path"
|
"prio"
|
||||||
],
|
],
|
||||||
"type": "field"
|
"type": "field"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "last"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"path"
|
"priority"
|
||||||
],
|
],
|
||||||
"type": "alias"
|
"type": "alias"
|
||||||
}
|
}
|
||||||
|
@ -234,7 +216,7 @@
|
||||||
"timeFrom": null,
|
"timeFrom": null,
|
||||||
"timeShift": null,
|
"timeShift": null,
|
||||||
"title": "Details",
|
"title": "Details",
|
||||||
"type": "stat"
|
"type": "table"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": "${DS_INFLUXDB-SYSMON}",
|
"datasource": "${DS_INFLUXDB-SYSMON}",
|
||||||
|
@ -271,7 +253,7 @@
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byName",
|
"id": "byName",
|
||||||
"options": "base_process.virt"
|
"options": "base_process.vsz"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
@ -336,7 +318,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -348,17 +330,17 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"mem_virt"
|
"mem_vsz"
|
||||||
],
|
],
|
||||||
"type": "field"
|
"type": "field"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"virt"
|
"vsz"
|
||||||
],
|
],
|
||||||
"type": "alias"
|
"type": "alias"
|
||||||
}
|
}
|
||||||
|
@ -467,7 +449,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
"null"
|
"previous"
|
||||||
],
|
],
|
||||||
"type": "fill"
|
"type": "fill"
|
||||||
}
|
}
|
||||||
|
@ -487,7 +469,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
|
@ -509,7 +491,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
|
@ -657,7 +639,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
|
@ -679,7 +661,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "last"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
|
@ -832,7 +814,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "mean"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -850,7 +832,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [],
|
"params": [],
|
||||||
"type": "mean"
|
"type": "sum"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"params": [
|
"params": [
|
||||||
|
@ -935,7 +917,7 @@
|
||||||
"type": "query"
|
"type": "query"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allValue": null,
|
"allValue": "",
|
||||||
"current": {},
|
"current": {},
|
||||||
"datasource": "${DS_INFLUXDB-SYSMON}",
|
"datasource": "${DS_INFLUXDB-SYSMON}",
|
||||||
"definition": "SHOW TAG VALUES FROM \"base_process\" WITH KEY = \"pid\" WHERE hostname =~ /$hostname/AND \"name\" =~ /$process/ AND time > now() - 60m",
|
"definition": "SHOW TAG VALUES FROM \"base_process\" WITH KEY = \"pid\" WHERE hostname =~ /$hostname/AND \"name\" =~ /$process/ AND time > now() - 60m",
|
||||||
|
@ -976,5 +958,5 @@
|
||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Sysmon - Process Explorer",
|
"title": "Sysmon - Process Explorer",
|
||||||
"uid": "Vjut5mS7k",
|
"uid": "Vjut5mS7k",
|
||||||
"version": 6
|
"version": 11
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
version=0.0.8
|
version=0.0.9
|
||||||
pf4jVersion=3.6.0
|
pf4jVersion=3.6.0
|
||||||
slf4jVersion=1.7.32
|
slf4jVersion=1.7.32
|
||||||
camelVersion=3.11.1
|
camelVersion=3.11.1
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
# System Monitor Plugins
|
# System Monitor Plugins
|
||||||
|
|
||||||
Collection of standard sysmon plugins.
|
Collection of standard sysmon plugins.
|
||||||
|
|
||||||
|
- [base](os-base/) - base OS metrics
|
||||||
|
- [aix](os-aix/) - AIX (and Power) specific metrics
|
||||||
|
- [linux](os-linux/) - Linux specific metrics
|
|
@ -71,7 +71,7 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
if(!includeList.contains(name)) {
|
if(!includeList.contains(name)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
log.debug("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize());
|
log.debug("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize() + " cmd: " + p.getCommandLine());
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
|
@ -79,9 +79,8 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
tagsMap.put("pid", String.valueOf(p.getProcessID()));
|
tagsMap.put("pid", String.valueOf(p.getProcessID()));
|
||||||
tagsMap.put("name", name);
|
tagsMap.put("name", name);
|
||||||
|
|
||||||
fieldsMap.put("path", p.getPath());
|
|
||||||
fieldsMap.put("mem_rss", p.getResidentSetSize());
|
fieldsMap.put("mem_rss", p.getResidentSetSize());
|
||||||
fieldsMap.put("mem_virt", p.getVirtualSize());
|
fieldsMap.put("mem_vsz", p.getVirtualSize());
|
||||||
fieldsMap.put("kernel_time", p.getKernelTime());
|
fieldsMap.put("kernel_time", p.getKernelTime());
|
||||||
fieldsMap.put("user_time", p.getUserTime());
|
fieldsMap.put("user_time", p.getUserTime());
|
||||||
fieldsMap.put("read_bytes", p.getBytesRead());
|
fieldsMap.put("read_bytes", p.getBytesRead());
|
||||||
|
@ -90,6 +89,7 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
fieldsMap.put("threads", p.getThreadCount());
|
fieldsMap.put("threads", p.getThreadCount());
|
||||||
fieldsMap.put("user", p.getUser());
|
fieldsMap.put("user", p.getUser());
|
||||||
fieldsMap.put("group", p.getGroup());
|
fieldsMap.put("group", p.getGroup());
|
||||||
|
fieldsMap.put("prio", p.getPriority());
|
||||||
|
|
||||||
measurementList.add(new Measurement(tagsMap, fieldsMap));
|
measurementList.add(new Measurement(tagsMap, fieldsMap));
|
||||||
}
|
}
|
||||||
|
|
10
server/doc/systemd.md
Normal file
10
server/doc/systemd.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# SystemD Notes
|
||||||
|
|
||||||
|
Setup as systemd service to start automatically at boot:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cp sysmon-server.service /etc/systemd/system/
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable sysmon-server
|
||||||
|
systemctl restart sysmon-server
|
||||||
|
```
|
Loading…
Reference in a new issue