Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Check graylog stream for firewall blocks
# STREAM_ID needs to be replaced with Graylog STREAMID.
DC1_FGT_DENY="$(curl -s --netrc-file /etc/icinga2/secrets/graylog_auth_file -k -H 'Accept: application/json' -X GET "" | jq '.total_results')"
DC2_FGT_DENY="$(curl -s --netrc-file /etc/icinga2/secrets/graylog_auth_file -k -H 'Accept: application/json' -X GET "" | jq '.total_results')"
echo "Blocked packages: DC1 $DC1_FGT_DENY, DC2 $DC2_FGT_DENY|dc1=$DC1_FGT_DENY dc2=$DC2_FGT_DENY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment