I want to create stackdriver metrics, based on the ip and the frequency of requests an ip makes.
Therefore I would like to group by ip (the IP address of a requesting client) my loadbalancer logs, and if the number of requests exceed a threshold sent a notification.
Edit:
A workaround to achieve this.
- Go to Stackdriver Logging and create a User-defined Metric that counts the total requests.
- Fire an alarm when requests exceed a threshold.
- Alarms call a lambda function that create a sync from stackdriver to bigquery
- Execute the queries in order to find out the ip that causes the trouble