Skip to main content
vbarrios
Staff
Staff
October 18, 2024

Technical Tip: How to create a script for email alerts when new firmware is available

Description This article describes how to create an automation stitch to send alert emails for new available firmware events automatically.
Scope FortiOS.
Solution
  1. Create a new Automation Stitch: Go to Security Fabric -> Automation, select ‘Create New’, and Assign a name: new_firmware_available.
 

1.jpg

 

  1. Select Add Trigger, in the select entries section, select 'Create' at the bottom, and select the option 'FortiOS Event Log' under Miscellaneous:

     

    2.jpg
  2. Assign a name to the new automation trigger: 'new_firmware_available_trigger', select the Event drop-down list and search for 'new firmware', select the Event ID 32103, select Ok, then the new Highlighted entry, and apply.

     

    3.jpg

     

    4.jpg

     

  3. Select 'Add Action' and create a new action, Notifications select Email, then assign a name: new_firmware_available_email, and enter the email address where the alert will be received. Additionally, a subject can be configured. Proceed to select OK and the new action, then apply.

     

    5.jpg

     

    6.jpg

    CLI:

     

    config system automation-trigger

        edit "new_firmware_available_trigger"

            set event-type event-log

            set logid 32103

        next

    end

     

    config system automation-action

        edit "new_firmware_available_email"

            set action-type email

            set email-to "my_company_email@gmail.com"

            set email-subject "%%log.logdesc%%"

        next

    end

     

    config system automation-stitch

        edit "new_firmware_available"

            set trigger "new_firmware_available_trigger"

                config actions

                    edit 1

                        set action "new_firmware_available_email"

                        set required enable

                    next

                end

        next

    end

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT