Skip to content

Instantly share code, notes, and snippets.

@Ianvdl
Created September 13, 2023 07:12
Show Gist options
  • Save Ianvdl/2633de808d5a1be83f4c5eef045866d1 to your computer and use it in GitHub Desktop.
Save Ianvdl/2633de808d5a1be83f4c5eef045866d1 to your computer and use it in GitHub Desktop.
Monitoring MegaRAID using Telegraf
# Documented at https://ivdl.co.za/2023/09/12/monitoring-megaraid-arrays-using-telegraf-and-megaraidsas-status-on-linux/
# Covers megaraidsas-status and megacli
# Modifications to sudoers file required - documented above
[[inputs.exec]]
commands = ["bash -c 'sudo megaraidsas-status | grep RAID | grep -q -v degraded && echo true || echo false'"]
name_override = "megaraid_optimal"
value_field_name = "is_optimal"
data_format = "value"
data_type = "boolean"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment