Skip to content

Instantly share code, notes, and snippets.

@vvgsrk
Created August 10, 2022 19:31
Show Gist options
  • Save vvgsrk/9610b8b249f2dc5c0210eb378713e5e7 to your computer and use it in GitHub Desktop.
Save vvgsrk/9610b8b249f2dc5c0210eb378713e5e7 to your computer and use it in GitHub Desktop.
Find forbidden IP's on Snowflake
SELECT *
FROM TABLE(rest_event_history(
'scim',
DATEADD('minutes',-3600,CURRENT_TIMESTAMP()),
CURRENT_TIMESTAMP(),
200))
WHERE details like '%FORBIDDEN%'
AND DATE_TRUNC('DAY', event_timestamp) = '2022-08-10'
ORDER BY event_timestamp DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment