View usage and estimate your bill

This page applies to Apigee, but not to Apigee hybrid.

View Apigee Edge documentation.

There are several tools you can use to view your Apigee gateway node usage, monitor your billing, and estimate projected costs. This topic discusses how billing or organization administrators can:

View Apigee gateway node usage

You can use Metrics Explorer in Cloud Monitoring to view your Apigee gateway node usage at a given moment in time. Whether you use the Configuration tab or the MQL query, the graphical output of the Metrics Explorer represents a gauge metric. That is, each point on the graph records the Apigee gateway node utilization of your Apigee instance across all environments in each region at the time of measurement.

To view Apigee gateway node usage in Metrics Explorer, use the following steps:

  1. Open the Metrics Explorer page in the Google Cloud console.

    Go to Metrics Explorer

  2. In the toolbar, select the Explorer tab.
  3. Select the Configuration tab.
  4. Expand the Select a metric menu, enter Apigee in the filter bar, and then use the submenus to select the resource type, category, and metric:
    1. In the Active resources menu, select Apigee environment instance.
    2. In the Active metric categories menu, select Environment.
    3. In the Active metrics menu, select Apigee gateway nodes.
  5. Click Apply.
  6. In the Filters section:
    1. Use the Group By menu to group by resource label. Select both env and location from the list options to group by environment and location.
    2. Select Sum from the Aggregator menu.
    3. Optional. Set the Minimum alignment period to 1 minute to view node usage per minute.
  7. Click OK to apply the filters.

Alternatively, you can use the MQL tab in the Metrics Explorer page to view the same data:

  1. In the toolbar, select the Explorer tab.
  2. Select the MQL tab.
  3. Enter the following query to view the number of Apigee gateway nodes across all in environments in each region:
    fetch apigee.googleapis.com/EnvironmentInstance
    | metric 'apigee.googleapis.com/environment/instance/gateway_nodes'
    | group_by 1m, [value_gateway_nodes_aggregate: aggregate(value.gateway_nodes)]
    | every 1m
    | group_by [resource.location, resource.env], [value_gateway_nodes_aggregate_aggregate: aggregate(value_gateway_nodes_aggregate)]

Once you have configured your view of the data using the Resource & Metric selection or the MQL query, you can save the data to a custom dashboard for future reference. To save your selected view:

  1. Click the Save Chart button in the chart pane of the Explorer tab.
  2. In the Save Chart Dialog, enter the following information:
    • Chart title field: Enter a name for the chart, or use the suggested title.
    • Dashboard dropdown: Select an existing dashboard or select New Dashboard to create and name a new dashboard. Your chart will be saved to the selected dashboard.
  3. Click Save.

Once saved, you can access your chart by navigating to the Dashboards Overview page in the Google Cloud console and viewing the dashboard you selected.

To learn more about creating and managing custom views using Cloud Monitoring, see Dashboards and charts.

Configure a Cloud Monitoring alert

Once you have configured metrics reporting for your Apigee gateway node usage in Cloud Monitoring, you can enable a metric-based alerting policy. Alerting gives timely awareness to problems in your cloud applications so you can resolve the problems quickly. For example, you can configure an alerting policy to monitor Apigee gateway node usage. For more information, see How alerting works.

You can add a metric-based alerting policy to your Google Cloud project by using the Google Cloud console, the Cloud Monitoring API, or the Google Cloud CLI. When you use the Google Cloud console, you can enable a recommended alert or you can create an alert by starting from the Alerting page of Cloud Monitoring.

The general steps required to create a metric-based alerting policy are outlined in Create metric-based alert policies. To configure an alerting policy specifically based on Apigee gateway node usage, you can follow the steps in Create a resource-group alerting policy.

Use the following configuration details to customize your alert for Apigee gateway node usage:

  • In the Select a metric section of the Create policy pane, enter Apigee in the filter bar, and then use the submenus to select the resource type, category, and metric:
    • In the Active resources menu, select Apigee environment instance.
    • In the Active metric categories menu, select Environment.
    • In the Active metrics menu, select Apigee gateway nodes.
  • In the Add Filters section, use the Group By menu to group by resource label. Select both env and location from the list options to group by environment and location.

View resource usage by billing account

To view Apigee gateway node and Analytics API calls usage by billing account, follow these steps:

  1. From anywhere in the Cloud console, click Navigation menu and select Billing.
  2. If you have more than one billing account, select Go to linked billing account to view the current project's billing account. To locate a different billing account, select Manage billing accounts and choose the account for which you'd like to get usage reports.
  3. Select Reports.
  4. Select Group By > SKU. This menu might be hidden; you can access it by clicking Show Filters.
  5. From the SKUs drop-down list, make the following selections:
    1. Apigee gateway nodes
    2. Analytics API calls

    You can also select just one of these SKUs if you don't want to group your usage data.

    Note: If your usage of any of these SKUs is 0, they don't appear in the Group By > SKU pull-down menu.

  6. Your usage data, filtered by the SKUs you selected, appears: The user interface showing usage data filtered
      by SKU.

To learn more about viewing billing reports and cost trends, see View your billing reports and cost trends.

Configure a Cloud Billing alert

You can be notified if your billable or forecasted charges exceed a set budget by creating an alert using the Budgets and alerts page of the Google Cloud console.

To configure a billing alert, follow the steps outlined in the Set budgets and budget alerts. For complete Cloud Billing documentation, including details of the roles and permissions required to set budgets and alerts, see Cloud Billing documentation.

Estimate your bill

Once you have the usage data you want, as described on this page, you can estimate your future bill in two ways:

  • Use the Google Cloud pricing calculator.
  • Compare usage data with the Apigee pricing table.

Use the Google Cloud pricing calculator

To use the pricing calculator to estimate your bill:

  1. Open the Google Cloud Pricing Calculator.

    Go to the Pricing Calculator

  2. Search for or select the Apigee product.
  3. Enter the name of the environment you want to use to estimate pricing.
  4. Select the criteria to use for estimating traffic load:
    • Monthly API Calls: Enter the average monthly API calls for the environment.
    • Transactions Per Second (TPS): Enter the average (TPS) for the environment.
  5. Enter the number of regions for the environment.
  6. Click Add to estimate.

Once the estimate is generated, you can email, save or download the estimate for future reference.

Additional networking charges apply and are billed separately. You can use the calculator to add additional charges to your estimate, such as networking data transfer, Cloud load balancing, Cloud DNS, Cloud KMS, and Compute Engine services. See Pay-as-you-go example pricing to learn more about cost estimates for other products and services.

Compare usage data with pricing information

You can also compare your current usage data with prices found in this table to get a reasonable approximation of your future bills.

For more information on best practices for implementing your Apigee policies and targets to optimize performance, see the API Proxy used for testing. More recommendations can be found in the Introduction to Antipatterns.

Answer billing questions

Use the following resources to get help with any other billing questions: