How to add Bot Manager to an existent edge firewall with a template

Preview

The Bot Manager Integration Kit template provides an easy way to integrate the Bot Manager function in an existent edge firewall on Azion. This template automatically creates a new function instance for Bot Manager and a Rules Engine rule to run it in the selected edge firewall.


Before deploying this template, you must:

  • Have an edge firewall created in your account.
    • During the setup of the template, you must inform the ID of your existing edge firewall to add the Bot Manager instance. If the ID doesn’t exist, the execution will fail. Check how to configure and edit an edge firewall.
  • Have the Edge Functions module enabled in your account.
    • To do so, go to the Billing & Subscriptions section and activate the switch for the module.
    • If this module is activated, executing this template could generate usage-related costs. Check the pricing page for more information.
  • Launch the latest version of the Bot Manager integration.
    • Go to Azion Marketplace to install this integration by clicking the Get it Now button. Check the How to install Azion Bot Manager guide for more details.
    • If you didn’t install the Bot Manager function before deploying this template, the execution will fail and a log explaining the reason will be printed.

To use this template, access Azion Console and click the + Create button on the homepage.

This will open a modal where you can select Templates > Bot Manager Integration Kit card.


Once you’re on the template’s page, click the Settings tab to open the configuration form and provide the information to configure your application:

  • Edge Firewall ID *: the ID of your existing edge firewall to add the Bot Manager instance.
    • To get the ID, you can go to the Edge Firewall page, select the one you want to use, and copy the ID in the URL. You can also get it via Azion API.
    • This field is mandatory.

After completing all the information, click the Next button, located in the bottom-right corner. This will start the deployment process.


You can follow the deployment process through a window showing off the logs. When it’s complete, the deployment page appears, confirming the edge application has been successfully created.

This page shows information about the application and some options to continue your journey.

Now you can manage and adjust the settings through Azion Console.

The template verifies if the account complies with the requirements (if the latest version of Bot Manager is installed, the informed edge firewall exists, and the Edge Functions module is enabled) to create a function instance of the Bot Manager and create a Rules Engine rule to execute the function instance.

If it doesn’t comply with any of the requirements, the execution will fail and a log explaining the reason will be printed.

The function instance has the following JSON Args:

{
"threshold": 10,
"action": "allow",
"internal_logs": 2
}

Where:

  • threshold: the maximum score the request can reach before the function takes an action. If it has no value, the function won’t take action. Default value: 10.
  • action: the action to be taken by the function whenever the request’s score is greater or equals the defined threshold. Possible values: allow, custom_html, deny, drop, hold_connection, random_delay, and redirect. Default value: allow.
  • internal_logs: every execution of the Bot Manager writes report logs, no matter the score of the request.

You can calibrate and edit the arguments to better adjust the integration to your needs. Read more on How to manage bots.


After executing the template, the requests will generate logs that can be seen in Real-Time Events. By analyzing the logs generated by Bot Manager, you can get insights to understand if any changes in the function instance’s JSON Args are needed.

Read more on How to observe and calibrate rules.

You can also use Data Stream to monitor the activity.


All settings can be customized at any time you need through Azion Console. To manage and edit your edge application’s settings, proceed as follows:

  1. Access Azion Console > Edge Application.
  • You’ll be redirected to the Edge Application page. It lists all the edge applications you’ve created.
  1. Select the edge application related to this template.
  • The list is organized alphabetically. You can also use the search bar located in the upper-left corner of the list; currently, it filters only by Application Name.

After selecting the edge application you’ll work on, you’ll be directed to a page containing all the settings you can configure.

The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: xxxxxxxxxx.map.azionedge.net/. However, you can add a custom domain for users to access your edge application through it.

go to configuring a domain guide reference

Contributors