SumoMetricsFunction<UniqueSuffix>——The App Service that hosts the EventHubs_Metrics Azure function. It runs in an App Service plan named SumoMetricsAppServicePlan<UniqueSuffix>(by default the standard App Service plan is configured). The Azure function is triggered by Azure Event Hubs.

sumoametlogs<UniqueSuffix>——The storage account used to store the output of the EventHubs_Metrics Azure function.

Step 3. Configure environment variables

The following environment variables are supported in the EventHubs Lambda function. You can either update the variables in the template or using the Azure console.

Environment Variable

Description

SumoLabsMetricEndpoint

A variable for the Sumo HTTP endpoint URL. You must update the variable value to the URL for the HTTP source you defined in Step 1. Configure an HTTP source. To find the source's URL, go to Manage > Collection > Collection, navigate the the hosted collector with the HTTP source, and click Show URL next to the source.

AzureEventHubConnectionString

A variable containing a connection string for the source Event Hub. The ARM template populates this variable.

To determine the connection string for an existing Event Hub:

Click Event Hubs in the left pane, and then select the Event Hub Namespace containing the source Event Hub.

A variable containing a connection string for sumoaudfail<UniqueSuffix>storage account . The ARM template populates this variable.

To determine the connection string for an existing storage account:

Select Storage accounts in the left pane. Then, select the storage account that contains the Blob Container.

Under Settings, select Access keys, and make a note of the connection string.

To configure environment variables using the Azure console

Click Function Apps in the left panel of the Azure console

Search for and select the SumoMetricsFunction<UniqueSuffix>App that you created above.

Go to Application Settings.

To update an environment variable, under the Application Settings heading, click the existing value of the variable, and update it.

Save your changes.

If you choose configure the use of an existing Event Hub or Storage Account you should delete Event Hub or Storage Account created by the ARM template, otherwise, you will be charged for those resources.

Step 4. Create a Blob Container

Create a blob container to store failover data from Event Hub. This procedure assumes that you name the container "sumomet-failover".

To create a blob container:

Select Storage accounts in the left pane.

On the Storage accounts page, select "sumometfail<UniqueSuffix>".

Under Blob Service, select Containers.

To add a new container, select + Container, enter the Name, and select Private for the Public Access Level. Click OK.

Test the function by going to index.js, and clicking Run. To test the receiving endpoint, go to Sumo and use Sumo LiveTail to see the data immediately.

Step 5. Export metrics for a particular resource to Event Hub

Follow theses steps to export metrics for a resource to Event Hub.

From the left pane, select ALL Services.

Search for and select "Monitor".

In the Monitor pane, select Diagnostic Settings under Settings.

Select the resource for which you want to export metrics. If diagnostics is not enabled click Turn on Diagnostics Settings.

Once diagnostics are enabled, click Add a diagnostic setting.

The Diagnostic Settings page appears.

In the left pane

Enter a name for the diagnostic setting.

Click the Stream to an event hub checkbox.

Select Configure event hub. The right pane appears.

In the right pane:

Choose a Subscription.

Select SumoMetricsNamespace<UniqueSuffix> as the event hub namespace.

Select insights-metrics-pt1m as the event hub name.

Select an event hub policy name. You can use the default policy RootManageSharedAccessKey.