Skip to content

Instantly share code, notes, and snippets.

@cherts
Last active February 3, 2020 05:19
Show Gist options
  • Select an option

  • Save cherts/e924fb09683e9d86cdc1f0ef3e354d2d to your computer and use it in GitHub Desktop.

Select an option

Save cherts/e924fb09683e9d86cdc1f0ef3e354d2d to your computer and use it in GitHub Desktop.
Check mounted filesystem in zabbix-agent
# Test
# zabbix_agentd -t vfs.fs.mounted["/","rw"]
# Return 1 if fs / is mounted rw mode, else return 0
UserParameter=vfs.fs.mounted[*],findmnt -nr -o source -T "$1" -O "$2" > /dev/null && echo 1 || echo 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment