Skip to content

Commit e7b0552

Browse files
committed
DLPX-96312 Add nfs and iscsi data in influxDb
1 parent e5e0587 commit e7b0552

4 files changed

Lines changed: 45 additions & 28 deletions

File tree

influxdb/delphix-influxdb-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ 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"]
187+
namepass = ["cpu", "disk", "diskio", "mem", "net", "procstat", "processes", "swap", "system", "zfs", "estat_nfs", "estat_iscsi"]
188188
EOF
189189
# Enforce restrictive permissions so the write token is not world-readable.
190190
chmod 640 "$INFLUXDB_OUTPUT"

telegraf/delphix-telegraf-service

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ BASE_CONFIG=/etc/telegraf/telegraf.base
33
DOSE_INPUTS=/etc/telegraf/telegraf.inputs.dose
44
DCT_INPUTS=/etc/telegraf/telegraf.inputs.dct
55
PLAYBOOK_INPUTS=/etc/telegraf/telegraf.inputs.playbook
6+
NFS_ISCSI_INPUTS=/etc/telegraf/telegraf.inputs.nfs_iscsi
67
INFLUXDB_OUTPUT=/etc/telegraf/telegraf.outputs.influxdb
78
PLAYBOOK_FLAG=/etc/telegraf/PLAYBOOK_ENABLED
89
INFLUXDB_FLAG=/etc/telegraf/INFLUXDB_ENABLED
@@ -49,6 +50,10 @@ else
4950
fi
5051
fi
5152

53+
if playbook_is_enabled || influxdb_is_enabled; then
54+
cat $NFS_ISCSI_INPUTS >> $TELEGRAF_CONFIG
55+
fi
56+
5257
if influxdb_is_enabled && [[ -f $INFLUXDB_OUTPUT ]]; then
5358
cat $INFLUXDB_OUTPUT >> $TELEGRAF_CONFIG
5459
fi

telegraf/telegraf.inputs.nfs_iscsi

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
##############################################################################
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).
4+
5+
[[inputs.execd]]
6+
command = ["estat", "nfs", "-jm", "10"]
7+
name_override = "estat_nfs"
8+
signal = "none"
9+
restart_delay = "30s"
10+
data_format = "json"
11+
tag_keys = [
12+
"name",
13+
"axis"
14+
]
15+
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]
16+
17+
[[inputs.execd]]
18+
command = ["estat", "iscsi", "-jm", "10"]
19+
name_override = "estat_iscsi"
20+
signal = "none"
21+
restart_delay = "30s"
22+
data_format = "json"
23+
tag_keys = [
24+
"name",
25+
"axis"
26+
]
27+
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]
28+
29+
# Convert estat string fields to integers so they are not dropped by Telegraf.
30+
[[processors.converter]]
31+
namepass = ["estat_nfs", "estat_iscsi"]
32+
[processors.converter.fields]
33+
integer = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)"]
34+
35+
# End of NFS/iSCSI section
36+
##############################################################################

telegraf/telegraf.inputs.playbook

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
##############################################################################
2-
# Performance Playbook (estat, nfs_threads) collection
3-
4-
# Collect output from "estat nfs -jm 10"
5-
[[inputs.execd]]
6-
command = ["estat", "nfs", "-jm", "10"]
7-
name_override = "estat_nfs"
8-
signal = "none"
9-
restart_delay = "30s"
10-
data_format = "json"
11-
tag_keys = [
12-
"name",
13-
"axis"
14-
]
15-
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]
16-
17-
# Collect output from "estat iscsi -jm 10"
18-
[[inputs.execd]]
19-
command = ["estat", "iscsi", "-jm", "10"]
20-
name_override = "estat_iscsi"
21-
signal = "none"
22-
restart_delay = "30s"
23-
data_format = "json"
24-
tag_keys = [
25-
"name",
26-
"axis"
27-
]
28-
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]
2+
# 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).
295

306
# Collect output from "estat zpl -jm 10"
317
[[inputs.execd]]

0 commit comments

Comments
 (0)