Skip to content

Instantly share code, notes, and snippets.

@kepstin
Created September 2, 2015 16:52
Show Gist options
  • Save kepstin/f50cf451ae51215e18a4 to your computer and use it in GitHub Desktop.
Save kepstin/f50cf451ae51215e18a4 to your computer and use it in GitHub Desktop.
#!/bin/bash
hostname="$(hostname -f)"
redis-cli info | tr -d '\015' | while IFS=: read key value
do
case "$key" in
'#'*|'') ;;
*)
echo "$hostname" "redis.$key" "$value"
;;
esac
done | zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -i -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment