Deploy Functionbeat to your cloud provider

edit

After configuring Functionbeat and defining cloud functions for the services you want to monitor, deploy the functions to your cloud provider. To do this, you can:

Use the Functionbeat manager

edit

Use the built-in manager to deploy, update, or delete Functionbeat functions when you don’t have your own deployment infrastructure or process in place.

During deployment, the Functionbeat manager:

  • Exports an AWS CloudFormation template. You can inspect the template by running the export command.
  • Creates a zip package that includes the function code and functionbeat.yml config file.
  • Uploads the package to the specified cloud provider.

See Step 4: Deploy Functionbeat in the getting started to learn how to deploy functions by using the Functionbeat manager.

Use your own deployment infrastructure

edit

If you don’t want to use the Functionbeat manager, use your own deployment infrastructure. To do this, create a package, then deploy it to your cloud provider:

  1. Set the following environment variables:

    BEAT_STRICT_PERMS=false
    This setting makes the function skip the ownership check on the configuration file.
    ENABLED_FUNCTIONS=function-name-1,function-name-2

    Specifies a comma- separated list of functions that are enabled in the configuration file. For example, to package functions called my-kinesis and my-cloudwatch-logs, run:

    linux and mac:

    export BEAT_STRICT_PERMS=false
    export ENABLED_FUNCTIONS=my-kinesis,my-cloudwatch-logs

    win:

    set BEAT_STRICT_PERMS=false
    set ENABLED_FUNCTIONS=my-kinesis,my-cloudwatch-logs

    For easier management, we recommend having one Lambda per function.

  2. Run the package command to package the functions and dependencies into an archive. For example:

    linux and mac:

    ./functionbeat -v -e -d "*" package --output /path/to/file.zip

    win:

    .\functionbeat.exe -v -e -d "*" package --output /path/to/file.zip

    This command generates a deployment package (called file.zip in the example) that contains:

    • a binary, called functionbeat-aws, that contains the function code
    • the functionbeat.yml config file
    • /tmp/functionbeat.keystore, if a keystore is used
  3. If certificates are required, add the cert files to the zip package under the same path as the configured functionbeat.yml file.
  4. Deploy the package, using the infrastructure and automation supported by your cloud provider. For example, to deploy the package to AWS, export the AWS CloudFormation template managed by Functionbeat, and modify it to work with your infrastructure.