Google Cloud functions can be called when an automation stitch is triggered.
- Go to Security Fabric > Automation.
- Click Create New.
- Enter a name for the stitch, and select the FortiGate devices that it will be applied to.
- Select a trigger, such as Security Rating Summary.
- Select Google Cloud Function and configure its settings.
The action name.
The amount of time after the previous action before this action executes, in seconds (0 - 3600, default = 0).
The API gateway URL, in the format:
The CLI must be used to manually enter the individual parameters.
The HTTP request header name and value. Multiple headers can be added.
Click to add another action.
Actions can be reorganized as needed by dragging and dropping.
- Click OK.
- Create an automation action:
config system automation-action edit "google-echo" set action-type google-cloud-function set gcp-function-region "us-central1" set gcp-project "dev-project-001-166400" set gcp-function-domain "cloudfunctions.net" set gcp-function "jlum-echo" set headers "echo-header:echo-value" next end
- Create an automation trigger:
config system automation-trigger edit "auto-google1" set event-type security-rating-summary next end
- Create the automation stitch:
config system automation-stitch edit "auto-google1" set trigger "auto-google1" set action "google-echo" next end
When the automation stitch is triggered, the FortiGate shows the stitch trigger time:
In Google Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished: