Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Monitoring
  • Getting started
    • All guides
      • Creating alerts
      • Creating a notification channel with a recipient
      • Creating a notification channel that invokes a function
      • Creating a webhook that calls an external API
      • Creating an escalation policy
      • Deleting an alert
  • Access management
  • Terraform reference
  • Release notes
  1. Step-by-step guides
  2. Working with alerts
  3. Creating a notification channel that invokes a function

Creating a notification channel that invokes a function

Written by
Yandex Cloud
Updated at April 17, 2025

You can specify a Cloud Functions function for notification method. This function will be invoked when an alert fires or in an escalation as a standard notification channel.

To set up notifications with Cloud Functions:

Management console
  1. In the management console, go to the folder containing the resources you monitor in Monitoring.
  2. From the list of services, select Cloud Functions.
  3. Create a function and a function version.
  4. In the settings, enable asynchronous invocation.
  5. Create a service account with the functions.functionInvoker and functions.viewer roles. You will need that account to invoke your function.
  6. From the list of services, select Monitoring.
  7. Click Create channel.
  8. Enter a name for your notification channel.
  9. From the Method list, select Cloud Functions.
  10. From the Service account list, select an account for running the function.
  11. Click Create.

Message format when invoking a function in Cloud FunctionsMessage format when invoking a function in Cloud Functions

When invoking a function in Cloud Functions, the alert or escalation will send a JSON message with details of the triggered alert to the event argument in the function entry point:

{
    "alertId": "",
    "alertName": "",
    "folderId": "",
    "status": "",
    "annotations": {
        "key1": "value1",
        "key2": "value2"
    }
}
  • alertId: ID of the triggered alert (text).
  • alertName: Name of the triggered alert (text).
  • folderId: ID of the folder the alert was triggered in (text).
  • status: Alert status (text).
  • annotations: Values of annotations for the triggered alert (key:value dictionary).

For an example of invoking a function, see Webhook using Cloud Functions.

Was the article helpful?

Previous
Creating a notification channel with a recipient
Next
Creating a webhook that calls an external API
Yandex project
© 2025 Yandex.Cloud LLC