Configuration of business metrics definitions

read our blog post about the business metrics feature


On this page you will learn how to add, edit and delete a business metrics definition. The data for a business metric comes from a provider's API. Teevity supports 5 business metrics providers: New Relic, Amazon S3 Flat Files, Amazon CloudWatch Metrics, Google Analytics and Cloud Usage data.

Add, edit and delete a business metrics definition

The business metrics definitions are configured in the preferences page 1 under the section "Business Driven Cost Analytics" 2.

You can then see your current business metrics definitions, add a new one 1, edit and even duplicate an existing one 2. The rest of this document will describe the common parameters of a business metrics definiton and the ones specific to each provider.

Common parameters of a business metrics provider

A business metric definition has 5 required parameters regardless of the provider:

New Relic

Teevity is using the API v2 of New Relic to collect data.

Amazon S3 Flat Files

Your business metrics data can come from a flat file where the metric is saved as a predefined format.

Metric files format and location

Metrics file content

The file content must be a series of values separated by a comma (,). The first value in the file is for the first hour of the month. When values are missing, you can just type two consecutive commas. You don't have to provide all the values for the hours of the month if it's not over yet (i.e., if we are mid-month, there will only be approximately 15*24 values in the file). A file example is available here.

Access Control to your AWS environment

Regardless of the method described below, you can optionally declare a role to assume for the access to the S3 bucket, if so you will need to enter the id of the account where the role TeevityPollerRole_BusinessMetrics resides 5.

If you use the method based on an IAM User, you can enter the Access Key and Secret Key of the user 4

Or if you use an "IAM Cross Account External Trust Relationship", you will have to enter the id of the account where the role TeevityCrossAccountTrustRole resides 1. You will need also the External id provided 2

You can use this AWS CLI based script to configure the access control if you choose the method "IAM Cross Account External Trust Relationship".

Amazon CloudWatch Metrics

You can use the metrics generated by Amazon CloudWatch like the number of requests of an Elastic Load Balancer, an API Gateway or traffic etc.

Google Analytics

To use Google Analytics as a business metric provider you will need to link your account to Teevity and set the Id of the View report.

Using OAuth to give access to your Google Analytics data

1 First you will need to give a name to the accout you are going to link.

2  Then an url will be generated. Copy and paste it somewhere, you will need it for the next step.

3  Go to your Google Cloud Console and create or use an existing project. And then go to the credentials section of the project.

4 Create new credentials and choose "OAuth client ID".

5 Choose "Web application" as application type,. Enter a name and as the "Authorized Javascript origins" 6 and finally the url copied from the previous step in the "Authorized redirect URIs" field 7. Click on "Create".

8 On the details page of the credentials you have just created, click on the "Download json" button

9 Open the json file with a text editor and copy-paste the entire content in the text aera of 10 the business metrics definition page.

Click next and open the link 11 as requested by the instructions.

Give your consent 12.

You will be redirected to the homepage of the Teevity website, the process has sucessfully finished, your Google Analytics account is now linked.

Configure the Google Analytics provider

You just have to give the ViewID from Google Analytics 13.

Cloud Usage Detailed Data

You can use your own cloud usage data as a proxy or a pulse of the business activity. For example, it can be the network traffic exposed by the egress in your cloud usage data.

1 the UUID of the report with the usage data. Learn more about how to explore and build a report of your usage data. The UUID is found in the URL of the report :

Advanced Mode

We also provide an advanced mode where you can edit the configuration of your business metric definitions direcly in a json format. You can switch between the normal and advanced modes by clicking the cog button 1

The json editor will display a red indicator if an error is detected in the content of the configuration 2. When you have finished editing the configuration, click on the cog button to return to the basic mode 1 and then click on the "apply modifications" button to save your modifications.

Use the business metrics in your reports

When you consult your cloud spending in the Dynamic Cost Explorer, you can select a business metrics to corrolate:

Then if you click on the submit button, the business metrics and the cost factored (here per 1000 requests) will be displayed: