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.
|
||||
- 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
|
||||
|
||||
|
@ -25,23 +45,3 @@ If you rename a host, the metrics in InfluxDB will still be available by the old
|
|||
USE sysmon;
|
||||
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,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"iteration": 1631005716742,
|
||||
"iteration": 1631013342292,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
|
@ -126,6 +126,7 @@
|
|||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -893,6 +894,7 @@
|
|||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -1086,6 +1088,7 @@
|
|||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -1255,6 +1258,7 @@
|
|||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -1830,7 +1834,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"title": "Running Processes - By Processor Time",
|
||||
"title": "Running Processes - User Time",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
|
@ -1966,7 +1970,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"title": "Running Processes - By Memory Usage",
|
||||
"title": "Running Processes - Resident Memory",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
|
@ -2019,7 +2023,7 @@
|
|||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Sysmon - Overview",
|
||||
"title": "Sysmon - Host Overview",
|
||||
"uid": "QkVPjseMk",
|
||||
"version": 44
|
||||
"version": 46
|
||||
}
|
|
@ -34,6 +34,12 @@
|
|||
"name": "Stat",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "table",
|
||||
"name": "Table",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "timeseries",
|
||||
|
@ -59,7 +65,7 @@
|
|||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"iteration": 1631005248811,
|
||||
"iteration": 1631013505736,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
|
@ -83,7 +89,11 @@
|
|||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
"mode": "fixed"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
|
@ -94,46 +104,10 @@
|
|||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"unit": "string"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
|
@ -143,29 +117,25 @@
|
|||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "center",
|
||||
"orientation": "vertical",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"text": {},
|
||||
"textMode": "value_and_name"
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "8.0.6",
|
||||
"targets": [
|
||||
{
|
||||
"groupBy": [],
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
"pid"
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
],
|
||||
"measurement": "base_process",
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
"resultFormat": "table",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
|
@ -174,6 +144,10 @@
|
|||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"user"
|
||||
|
@ -188,6 +162,10 @@
|
|||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"group"
|
||||
|
@ -198,13 +176,17 @@
|
|||
[
|
||||
{
|
||||
"params": [
|
||||
"path"
|
||||
"prio"
|
||||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"path"
|
||||
"priority"
|
||||
],
|
||||
"type": "alias"
|
||||
}
|
||||
|
@ -234,7 +216,7 @@
|
|||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Details",
|
||||
"type": "stat"
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": "${DS_INFLUXDB-SYSMON}",
|
||||
|
@ -271,7 +253,7 @@
|
|||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "base_process.virt"
|
||||
"options": "base_process.vsz"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
|
@ -336,7 +318,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
|
@ -348,17 +330,17 @@
|
|||
[
|
||||
{
|
||||
"params": [
|
||||
"mem_virt"
|
||||
"mem_vsz"
|
||||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"virt"
|
||||
"vsz"
|
||||
],
|
||||
"type": "alias"
|
||||
}
|
||||
|
@ -467,7 +449,7 @@
|
|||
},
|
||||
{
|
||||
"params": [
|
||||
"null"
|
||||
"previous"
|
||||
],
|
||||
"type": "fill"
|
||||
}
|
||||
|
@ -487,7 +469,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
|
@ -509,7 +491,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
|
@ -657,7 +639,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
|
@ -679,7 +661,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "last"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
|
@ -832,7 +814,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "mean"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
|
@ -850,7 +832,7 @@
|
|||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "mean"
|
||||
"type": "sum"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
|
@ -935,7 +917,7 @@
|
|||
"type": "query"
|
||||
},
|
||||
{
|
||||
"allValue": null,
|
||||
"allValue": "",
|
||||
"current": {},
|
||||
"datasource": "${DS_INFLUXDB-SYSMON}",
|
||||
"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": "",
|
||||
"title": "Sysmon - Process Explorer",
|
||||
"uid": "Vjut5mS7k",
|
||||
"version": 6
|
||||
"version": 11
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
version=0.0.8
|
||||
version=0.0.9
|
||||
pf4jVersion=3.6.0
|
||||
slf4jVersion=1.7.32
|
||||
camelVersion=3.11.1
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# System Monitor 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)) {
|
||||
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, Object> fieldsMap = new HashMap<>();
|
||||
|
@ -79,9 +79,8 @@ public class BaseProcessExtension implements MetricExtension {
|
|||
tagsMap.put("pid", String.valueOf(p.getProcessID()));
|
||||
tagsMap.put("name", name);
|
||||
|
||||
fieldsMap.put("path", p.getPath());
|
||||
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("user_time", p.getUserTime());
|
||||
fieldsMap.put("read_bytes", p.getBytesRead());
|
||||
|
@ -90,6 +89,7 @@ public class BaseProcessExtension implements MetricExtension {
|
|||
fieldsMap.put("threads", p.getThreadCount());
|
||||
fieldsMap.put("user", p.getUser());
|
||||
fieldsMap.put("group", p.getGroup());
|
||||
fieldsMap.put("prio", p.getPriority());
|
||||
|
||||
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