Skip to content

Commit 2a7d1b7

Browse files
committed
Back merged
2 parents bfbb270 + 4d7aae4 commit 2a7d1b7

6 files changed

Lines changed: 16 additions & 5 deletions

File tree

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ Standards-Version: 4.1.2
1313

1414
Package: performance-diagnostics
1515
Architecture: any
16-
Depends: python3-bpfcc, python3-minimal, python3-psutil, telegraf, docker.io, influxdb2, curl
16+
Depends: python3-bpfcc, python3-minimal, python3-psutil, telegraf, docker-ce, influxdb2, curl
1717
Description: eBPF-based Performance Diagnostic Tools
1818
A collection of eBPF-based tools for diagnosing performance issues.

influxdb/delphix-influxdb-init

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,7 @@ umask "$old_umask"
212212

213213
rm -f "$INFLUXDB_SETUP_STATE_FILE"
214214
log "InfluxDB initialized successfully."
215+
216+
# Restart Telegraf so it picks up the InfluxDB output stanza written above.
217+
# This is only reached on first boot (subsequent boots exit early at the top).
218+
systemctl restart delphix-telegraf 2>/dev/null || true

influxdb/perf_influxdb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function enable_influxdb() {
3232
function disable_influxdb() {
3333
date
3434
echo "Disabling InfluxDB Metric Output"
35-
rm -rf $INFLUXDB_FLAG
35+
rm -f $INFLUXDB_FLAG
3636
systemctl restart delphix-telegraf
3737
}
3838

telegraf/delphix-telegraf-service

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ else
5151
fi
5252

5353
if influxdb_is_enabled && [[ -f $INFLUXDB_OUTPUT ]]; then
54-
cat $STORAGE_IO_INPUTS $INFLUXDB_OUTPUT >> $TELEGRAF_CONFIG
54+
if [[ -f $STORAGE_IO_INPUTS ]]; then
55+
cat $STORAGE_IO_INPUTS >> $TELEGRAF_CONFIG
56+
fi
57+
cat $INFLUXDB_OUTPUT >> $TELEGRAF_CONFIG
5558
fi
5659

5760
# Restrict permissions so the InfluxDB write token is not world-readable.

telegraf/telegraf.base

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# delphix-influxdb-init to /etc/telegraf/telegraf.outputs.influxdb and
1616
# appended here by delphix-telegraf-service when InfluxDB is enabled.
1717
# Use 'perf_influxdb enable|disable' to toggle and restart Telegraf.
18+
#
19+
# Fallback: discard all metrics when InfluxDB output is not appended
20+
# (e.g. InfluxDB disabled). Telegraf requires at least one output to start.
21+
[[outputs.discard]]
1822

1923
###############################################################################
2024
# INPUT PLUGINS #

telegraf/telegraf.inputs.playbook

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##############################################################################
22
# Performance Playbook (estat, nfs_threads) collection
33
# Note: estat_nfs, estat_iscsi, and estat_backend-io live in
4-
# telegraf.inputs.nfs_iscsi and are always collected when InfluxDB is
4+
# telegraf.inputs.storage_io and are always collected when InfluxDB is
55
# enabled, independent of playbook state.
66

77
# Collect output from "estat zpl -jm 10"
@@ -89,7 +89,7 @@
8989
###############################################################################
9090
# Convert strings from estat into integer values so they don't get dropped.
9191
# Scoped to playbook-only metrics; estat_nfs/iscsi have their own converter
92-
# in telegraf.inputs.nfs_iscsi.
92+
# in telegraf.inputs.storage_io.
9393
[[processors.converter]]
9494
namepass = ["estat_zpl", "estat_zio", "estat_zvol", "estat_zio-queue", "estat_metaslab-alloc"]
9595
[processors.converter.fields]

0 commit comments

Comments
 (0)