Skip to content

Instantly share code, notes, and snippets.

@ApigeeSamples
Created June 1, 2012 09:40
Show Gist options
  • Save ApigeeSamples/2850788 to your computer and use it in GitHub Desktop.
Save ApigeeSamples/2850788 to your computer and use it in GitHub Desktop.
2000 requests per month (On exceeding the limit (1000 requests), send an alert to local disk.)
<Quota name="QuotaPolicy">
<Interval>1</Interval>
<TimeUnit>month</TimeUnit>
<Allow count="2000" />
<Alert count="1000" >
<NotificationIntervalInSec>5</NotificationIntervalInSec>
<File>
<Message>Quota has exceeded. Allowed quota={ratelimit.allowed.count}, Used quota={ratelimit.used.count}, Quota expires at {ratelimt.expiry.time}</Message>
<FileName>quota_exceeded.log</FileName>
<FileRotationOptions rotateFileOnStartup="true">
<FileRotationType>SIZE</FileRotationType>
<MaxFileSizeInMB>50</MaxFileSizeInMB>
<MaxFilesToRetain>10</MaxFilesToRetain>
</FileRotationOptions>
</File>
</Alert>
</Quota>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment