Oracle Cloud Infrastructure Resource Monitoring — Alarm triggers Notification when Metrics satisfy Condition

Example Alarm — Sending an Email when a Function is invoked More then X times per Time Interval

  • Create Alarm Definition — using the function invocation count metric for function Hello — aggregating per minute
  • Create Notification Topic and associate Alarm Definition with this Topic
  • Create a Subscription on the Notification Topic — configured with my email address
  • Confirm the subscription of my email address my responding to a confirmation email sent to my email account
  • invoke function hello
  • wait for the email to arrive that tells me about the fact that there has been a minute during which at least one function call was made to hello
  • Name, Severity and Body
  • Resource Type and Scope (FaaS , lab-compartment), Metric (FunctionInvocationCount), Interval (1m) and Statistic (Sum)
  • Resource (metric dimension) resourceId (OCID for function hello) Note: I tried to work with resourceDisplayName as Dimension and lab1:hello as as Dimension Value; however, that did not seem to work — the Alarm was not triggered
  • Trigger Rule: > 0 (after at least 1 minute) — if the sum of the function invocation count for lab1:hello over 1 minute is greater than 0 i.e. if function hello is invoked, then trigger this alarm

And… Action



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store