mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Fix linting issues.
This commit is contained in:
parent
675dedf1d4
commit
bffbc23a4e
2 changed files with 36 additions and 36 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# This file contains a munin-plugin to gather btrfs statistics per device.
|
# This file contains a munin-plugin to gather btrfs statistics per device.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# This file contains a munin-plugin to gather btrfs statistics per device.
|
# This file contains a munin-plugin to gather btrfs statistics per device.
|
||||||
#
|
#
|
||||||
|
@ -36,7 +36,7 @@ def munin_config(fs):
|
||||||
this_dev_info = fs.dev_info(this_device.devid)
|
this_dev_info = fs.dev_info(this_device.devid)
|
||||||
this_dev_name = this_dev_info.path.replace('/dev/', '')
|
this_dev_name = this_dev_info.path.replace('/dev/', '')
|
||||||
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
||||||
".label " + this_dev_name)
|
".label " + this_dev_name)
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
@ -47,14 +47,14 @@ def munin_config(fs):
|
||||||
print("graph_vlabel %")
|
print("graph_vlabel %")
|
||||||
print("graph_category disk")
|
print("graph_category disk")
|
||||||
print("graph_info This graph shows percentage used by btrfs on every \
|
print("graph_info This graph shows percentage used by btrfs on every \
|
||||||
device. Maesured in percentage of device capacity.")
|
device. Maesured in percentage of device capacity.")
|
||||||
|
|
||||||
devices = fs.devices()
|
devices = fs.devices()
|
||||||
for this_device in devices:
|
for this_device in devices:
|
||||||
this_dev_info = fs.dev_info(this_device.devid)
|
this_dev_info = fs.dev_info(this_device.devid)
|
||||||
this_dev_name = this_dev_info.path.replace('/dev/', '')
|
this_dev_name = this_dev_info.path.replace('/dev/', '')
|
||||||
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) +
|
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) +
|
||||||
".label " + this_dev_name)
|
".label " + this_dev_name)
|
||||||
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) + ".warning 95")
|
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) + ".warning 95")
|
||||||
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) + ".critical 98")
|
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) + ".critical 98")
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ def munin_values(fs):
|
||||||
for this_device in devices:
|
for this_device in devices:
|
||||||
this_dev_info = fs.dev_info(this_device.devid)
|
this_dev_info = fs.dev_info(this_device.devid)
|
||||||
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
||||||
".value " + str(this_dev_info.bytes_used))
|
".value " + str(this_dev_info.bytes_used))
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ def munin_values(fs):
|
||||||
this_dev_info = fs.dev_info(this_device.devid)
|
this_dev_info = fs.dev_info(this_device.devid)
|
||||||
usage = 100.0 * this_dev_info.bytes_used / this_dev_info.total_bytes
|
usage = 100.0 * this_dev_info.bytes_used / this_dev_info.total_bytes
|
||||||
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) +
|
print("btrfs_percent_" + fsid + "_" + str(this_device.devid) +
|
||||||
".value " + str(round(usage, 2)))
|
".value " + str(round(usage, 2)))
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue