Update doc/instructions.
Update example dashboards. Add more processes to default list.
This commit is contained in:
parent
dd475c6d23
commit
ba0313f84a
|
@ -28,7 +28,7 @@ get_pid() {
|
|||
}
|
||||
|
||||
is_running() {
|
||||
[ -f "$pid_file" ] && ps -p `get_pid` > /dev/null 2>&1
|
||||
[ -f "$pid_file" ] && ps -p $(get_pid) > /dev/null 2>&1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
@ -37,7 +37,7 @@ case "$1" in
|
|||
echo "Already started"
|
||||
else
|
||||
echo "Starting $name"
|
||||
cd "$dir"
|
||||
cd "$dir" || exit 1
|
||||
if [ -z "$user" ]; then
|
||||
$cmd $args >> "$stdout_log" 2>> "$stderr_log" &
|
||||
else
|
||||
|
@ -52,16 +52,14 @@ case "$1" in
|
|||
;;
|
||||
stop)
|
||||
if is_running; then
|
||||
echo -n "Stopping $name.."
|
||||
kill `get_pid`
|
||||
echo "Stopping $name.."
|
||||
kill $(get_pid)
|
||||
for i in 1 2 3 4 5 6 7 8 9 10
|
||||
# for i in `seq 10`
|
||||
do
|
||||
if ! is_running; then
|
||||
break
|
||||
fi
|
||||
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
echo
|
||||
|
|
|
@ -18,6 +18,9 @@ exclude_mount = [ "/boot/efi" ]
|
|||
|
||||
[extension.base_process]
|
||||
enabled = true
|
||||
include = [ "java", "mysqld", "postgres", "influxd" ]
|
||||
|
||||
|
||||
include = [
|
||||
"java", "node", "httpd", "mongod", "mysqld",
|
||||
"postgres", "influxd", "haproxy", "beam.smp",
|
||||
"filebeat", "corosync", "rsyslogd", "memcached",
|
||||
"db2sysc", "dsmserv", "mmfsd",
|
||||
]
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_INFLUXDB-HMCI",
|
||||
"label": "InfluxDB-hmci",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "influxdb",
|
||||
"pluginName": "InfluxDB"
|
||||
},
|
||||
{
|
||||
"name": "DS_INFLUXDB-SYSMON",
|
||||
"label": "InfluxDB-sysmon",
|
||||
|
@ -95,7 +87,7 @@
|
|||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-HMCI}"
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
|
@ -113,7 +105,7 @@
|
|||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-HMCI}"
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
|
@ -174,7 +166,7 @@
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 4
|
||||
|
@ -225,7 +217,7 @@
|
|||
"measurement": "base_info",
|
||||
"orderByTime": "DESC",
|
||||
"policy": "default",
|
||||
"query": "SELECT last(\"os_manufacturer\") AS \"manufacturer\", last(\"os_family\") AS \"family\", last(\"os_version\") AS \"version\", last(\"os_codename\") AS \"codename\", last(\"os_build\") AS \"build\", last(\"boot_time\") * 1000 AS \"boottime\" FROM \"base_info\" WHERE (\"hostname\" =~ /^$hostname$/) AND $timeFilter GROUP BY time($__interval), \"hostname\" fill(null) ORDER BY time DESC LIMIT 1000",
|
||||
"query": "SELECT last(\"os_manufacturer\") AS \"manufacturer\", last(\"os_family\") AS \"family\", last(\"os_version\") AS \"version\", last(\"os_codename\") AS \"codename\", last(\"os_build\") AS \"build\", last(\"boot_time\") * 1000 AS \"boottime\" FROM \"base_info\" WHERE (\"hostname\" =~ /^$hostname$/) AND $timeFilter GROUP BY time($__interval), \"hostname\" fill(previous) ORDER BY time DESC LIMIT 1000",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "table",
|
||||
|
@ -385,6 +377,10 @@
|
|||
{
|
||||
"destinationType": "time",
|
||||
"targetField": "Boot Time"
|
||||
},
|
||||
{
|
||||
"destinationType": "string",
|
||||
"targetField": "OS Version"
|
||||
}
|
||||
],
|
||||
"fields": {}
|
||||
|
@ -409,7 +405,7 @@
|
|||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
"y": 9
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
|
@ -679,7 +675,7 @@
|
|||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 8
|
||||
"y": 9
|
||||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
|
@ -860,7 +856,7 @@
|
|||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
"y": 14
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 29,
|
||||
|
@ -1162,7 +1158,7 @@
|
|||
"h": 6,
|
||||
"w": 4,
|
||||
"x": 12,
|
||||
"y": 13
|
||||
"y": 14
|
||||
},
|
||||
"id": 19,
|
||||
"options": {
|
||||
|
@ -1336,7 +1332,7 @@
|
|||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 13
|
||||
"y": 14
|
||||
},
|
||||
"id": 17,
|
||||
"options": {
|
||||
|
@ -1509,7 +1505,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 19
|
||||
"y": 20
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
|
@ -1666,7 +1662,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 19
|
||||
"y": 20
|
||||
},
|
||||
"id": 30,
|
||||
"options": {
|
||||
|
@ -1824,7 +1820,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 28
|
||||
"y": 29
|
||||
},
|
||||
"id": 31,
|
||||
"options": {
|
||||
|
@ -1970,7 +1966,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 28
|
||||
"y": 29
|
||||
},
|
||||
"id": 18,
|
||||
"options": {
|
||||
|
@ -2082,7 +2078,7 @@
|
|||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 37
|
||||
"y": 38
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 24,
|
||||
|
@ -2261,8 +2257,7 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2274,7 +2269,7 @@
|
|||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 37
|
||||
"y": 38
|
||||
},
|
||||
"id": 25,
|
||||
"options": {
|
||||
|
@ -2399,8 +2394,7 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
|
@ -2416,7 +2410,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 47
|
||||
"y": 48
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
|
@ -2589,8 +2583,7 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"value": null
|
||||
"color": "transparent"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
|
@ -2610,7 +2603,7 @@
|
|||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 47
|
||||
"y": 48
|
||||
},
|
||||
"id": 26,
|
||||
"options": {
|
||||
|
@ -2728,8 +2721,7 @@
|
|||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2838,7 +2830,7 @@
|
|||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 56
|
||||
"y": 57
|
||||
},
|
||||
"id": 22,
|
||||
"options": {
|
||||
|
@ -3094,6 +3086,6 @@
|
|||
"timezone": "",
|
||||
"title": "Sysmon Agent - Host Overview",
|
||||
"uid": "QkVPjseMk",
|
||||
"version": 29,
|
||||
"version": 30,
|
||||
"weekStart": ""
|
||||
}
|
|
@ -9,13 +9,13 @@
|
|||
"pluginName": "InfluxDB"
|
||||
}
|
||||
],
|
||||
"__elements": [],
|
||||
"__elements": {},
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "8.4.7"
|
||||
"version": "9.0.7"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
|
@ -52,7 +52,10 @@
|
|||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
|
@ -72,11 +75,14 @@
|
|||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"iteration": 1657627348578,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 24,
|
||||
|
@ -88,12 +94,25 @@
|
|||
"content": "## Metrics are collected by an agent running inside of each LPAR / VM / Host.\n \n For more information: [bitbucket.org/mnellemann/sysmon](https://bitbucket.org/mnellemann/sysmon)\n ",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "8.4.7",
|
||||
"pluginVersion": "9.0.7",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"transparent": true,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "5KYZifB7z"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
|
@ -103,6 +122,15 @@
|
|||
"id": 4,
|
||||
"panels": [],
|
||||
"repeat": "hostname",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "5KYZifB7z"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "${hostname}",
|
||||
"type": "row"
|
||||
},
|
||||
|
@ -119,7 +147,8 @@
|
|||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
"displayMode": "auto",
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
|
@ -153,9 +182,13 @@
|
|||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "8.4.7",
|
||||
"pluginVersion": "9.0.7",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -320,7 +353,7 @@
|
|||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "8.4.7",
|
||||
"pluginVersion": "9.0.7",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
|
@ -479,7 +512,7 @@
|
|||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "8.4.7",
|
||||
"pluginVersion": "9.0.7",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
|
@ -642,6 +675,10 @@
|
|||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -821,6 +858,10 @@
|
|||
"targets": [
|
||||
{
|
||||
"alias": "$col",
|
||||
"datasource": {
|
||||
"type": "influxdb",
|
||||
"uid": "${DS_INFLUXDB-SYSMON}"
|
||||
},
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
|
@ -912,7 +953,7 @@
|
|||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"schemaVersion": 35,
|
||||
"schemaVersion": 36,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
|
@ -38,6 +38,9 @@ public class BaseProcessExtension implements MetricExtension {
|
|||
add("rsyslogd");
|
||||
add("postgres");
|
||||
add("memcached");
|
||||
add("db2sysc");
|
||||
add("dsmserv");
|
||||
add("mmfsd");
|
||||
}};
|
||||
|
||||
private final long minUptimeInSeconds = 300;
|
||||
|
|
|
@ -28,7 +28,7 @@ get_pid() {
|
|||
}
|
||||
|
||||
is_running() {
|
||||
[ -f "$pid_file" ] && ps -p `get_pid` > /dev/null 2>&1
|
||||
[ -f "$pid_file" ] && ps -p $(get_pid) > /dev/null 2>&1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
@ -37,7 +37,7 @@ case "$1" in
|
|||
echo "Already started"
|
||||
else
|
||||
echo "Starting $name"
|
||||
cd "$dir"
|
||||
cd "$dir" || exit 1
|
||||
if [ -z "$user" ]; then
|
||||
$cmd $args >> "$stdout_log" 2>> "$stderr_log" &
|
||||
else
|
||||
|
@ -52,16 +52,14 @@ case "$1" in
|
|||
;;
|
||||
stop)
|
||||
if is_running; then
|
||||
echo -n "Stopping $name.."
|
||||
kill `get_pid`
|
||||
echo "Stopping $name.."
|
||||
kill $(get_pid)
|
||||
for i in 1 2 3 4 5 6 7 8 9 10
|
||||
# for i in `seq 10`
|
||||
do
|
||||
if ! is_running; then
|
||||
break
|
||||
fi
|
||||
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
echo
|
||||
|
|
Loading…
Reference in a new issue