Skip to content

Commit 39b9a95

Browse files
committed
DLPX-96312 Sending all data to influxDB now
1 parent e7b0552 commit 39b9a95

6 files changed

Lines changed: 17 additions & 61 deletions

File tree

influxdb/delphix-influxdb-init

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ cat >"$INFLUXDB_OUTPUT" <<EOF
184184
token = "$WRITE_TOKEN"
185185
organization = "$INFLUXDB_ORG"
186186
bucket = "$INFLUXDB_BUCKET"
187-
namepass = ["cpu", "disk", "diskio", "mem", "net", "procstat", "processes", "swap", "system", "zfs", "estat_nfs", "estat_iscsi"]
188187
EOF
189188
# Enforce restrictive permissions so the write token is not world-readable.
190189
chmod 640 "$INFLUXDB_OUTPUT"

telegraf/delphix-telegraf-service

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,8 @@ else
5050
fi
5151
fi
5252

53-
if playbook_is_enabled || influxdb_is_enabled; then
54-
cat $NFS_ISCSI_INPUTS >> $TELEGRAF_CONFIG
55-
fi
56-
5753
if influxdb_is_enabled && [[ -f $INFLUXDB_OUTPUT ]]; then
58-
cat $INFLUXDB_OUTPUT >> $TELEGRAF_CONFIG
54+
cat $NFS_ISCSI_INPUTS $INFLUXDB_OUTPUT >> $TELEGRAF_CONFIG
5955
fi
6056

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

telegraf/telegraf.base

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,9 @@
1111
###############################################################################
1212
# OUTPUT PLUGINS #
1313
###############################################################################
14-
# Define the main metric output file, excluding aggregated stats and
15-
# Performance Playbook (estat) data.
16-
[[outputs.file]]
17-
files = ["/var/log/telegraf/metrics.json"]
18-
rotation_max_size = "50MB"
19-
rotation_max_archives = 9
20-
data_format = "json"
21-
namedrop = ["*estat_*", "agg_*", "zfs", "zpool*", "zcache*", "docker*"]
22-
23-
# Define output file for ZFS related metrics
24-
[[outputs.file]]
25-
files = ["/var/log/telegraf/metrics_zfs.json"]
26-
rotation_max_size = "30MB"
27-
rotation_max_archives = 5
28-
data_format = "json"
29-
namepass = ["zpool*", "zcache*", "zfs"]
30-
31-
# Define output file for Performance Playbook (estat) metrics
32-
[[outputs.file]]
33-
files = ["/var/log/telegraf/metrics_estat.json"]
34-
rotation_max_size = "30MB"
35-
rotation_max_archives = 5
36-
data_format = "json"
37-
namepass = ["*estat_*"]
38-
39-
# Define output file for aggregate statistics
40-
[[outputs.file]]
41-
files = ["/var/log/telegraf/metric_aggregates.json"]
42-
rotation_max_size = "30MB"
43-
rotation_max_archives = 5
44-
data_format = "json"
45-
namepass = ["agg_*"]
46-
47-
# InfluxDB output is managed via /etc/telegraf/telegraf.outputs.influxdb (written by
48-
# delphix-influxdb-init) and the /etc/telegraf/INFLUXDB_ENABLED flag.
14+
# All metrics are ingested into InfluxDB. The output stanza is written by
15+
# delphix-influxdb-init to /etc/telegraf/telegraf.outputs.influxdb and
16+
# appended here by delphix-telegraf-service when InfluxDB is enabled.
4917
# Use 'perf_influxdb enable|disable' to toggle and restart Telegraf.
5018

5119
###############################################################################
@@ -64,15 +32,10 @@
6432
[[inputs.disk]]
6533
mount_points = ["/","/domain0"]
6634

67-
# Get disk I/O stats
35+
# Get disk I/O stats, excluding ZFS zvol devices (zd*) which are internal
36+
# ZFS block devices not useful for performance diagnostics.
6837
[[inputs.diskio]]
69-
70-
# Track stats for the current metric files
71-
[[inputs.filestat]]
72-
files = ["/var/log/telegraf/metrics.json",
73-
"/var/log/telegraf/metrics_estat.json",
74-
"/var/log/telegraf/metrics_zfs.json",
75-
"/var/log/telegraf/metric_aggregates.json"]
38+
tagdrop = {name = ["zd*"]}
7639

7740
# Get Memory stats
7841
[[inputs.mem]]

telegraf/telegraf.inputs.dct

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,5 @@
1111
]
1212
docker_label_exclude = ["com.docker.compose.*", "resty*"]
1313

14-
[[outputs.file]]
15-
files = ["/var/log/telegraf/metrics_docker.json"]
16-
rotation_max_size = "30MB"
17-
rotation_max_archives = 5
18-
data_format = "json"
19-
namepass = ["docker*"]
20-
2114
####################### End of Docker/DCT services Metrics #######################
2215

telegraf/telegraf.inputs.nfs_iscsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
##############################################################################
2-
# NFS server I/O and iSCSI target I/O — included when InfluxDB is enabled
3-
# but Performance Playbook is not (playbook already contains these inputs).
2+
# NFS server I/O and iSCSI target I/O collection.
3+
# Always included when InfluxDB is enabled, independent of playbook state.
44

5+
# Collect output from "estat nfs -jm 10"
56
[[inputs.execd]]
67
command = ["estat", "nfs", "-jm", "10"]
78
name_override = "estat_nfs"
@@ -14,6 +15,7 @@
1415
]
1516
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]
1617

18+
# Collect output from "estat iscsi -jm 10"
1719
[[inputs.execd]]
1820
command = ["estat", "iscsi", "-jm", "10"]
1921
name_override = "estat_iscsi"

telegraf/telegraf.inputs.playbook

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##############################################################################
22
# Performance Playbook (estat, nfs_threads) collection
3-
# Note: estat_nfs and estat_iscsi are in telegraf.inputs.nfs_iscsi so they
4-
# are also available when only InfluxDB is enabled (without the full playbook).
3+
# Note: estat_nfs and estat_iscsi live in telegraf.inputs.nfs_iscsi and are
4+
# always collected when InfluxDB is enabled, independent of playbook state.
55

66
# Collect output from "estat zpl -jm 10"
77
[[inputs.execd]]
@@ -99,8 +99,11 @@
9999
###############################################################################
100100
# PROCESSOR PLUGINS #
101101
###############################################################################
102-
# Convert strings from estat into integer values so they don't get dropped
102+
# Convert strings from estat into integer values so they don't get dropped.
103+
# Scoped to playbook-only metrics; estat_nfs/iscsi have their own converter
104+
# in telegraf.inputs.nfs_iscsi.
103105
[[processors.converter]]
106+
namepass = ["estat_zpl", "estat_zio", "estat_zvol", "estat_backend-io", "estat_zio-queue", "estat_metaslab-alloc"]
104107
[processors.converter.fields]
105108
integer = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)"]
106109

0 commit comments

Comments
 (0)