host_totals
Creates, updates, deletes, gets or lists a host_totals resource.
Overview
| Name | host_totals |
| Type | Resource |
| Id | datadog.infrastructure.host_totals |
Fields
The following fields are returned by SELECT queries:
- get_host_totals
| Name | Datatype | Description |
|---|---|---|
total_active | integer (int64) | Total number of active host (UP and ???) reporting to Datadog. |
total_up | integer (int64) | Number of host that are UP and reporting to Datadog. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_host_totals | select | from | This endpoint returns the total number of active and up hosts in your Datadog account.<br />Active means the host has reported in the past hour, and up means it has reported in the past two hours. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
from | integer (int64) | Number of seconds from which you want to get total number of active hosts. |
SELECT examples
- get_host_totals
This endpoint returns the total number of active and up hosts in your Datadog account.<br />Active means the host has reported in the past hour, and up means it has reported in the past two hours.
SELECT
total_active,
total_up
FROM datadog.infrastructure.host_totals
WHERE from = '{{ from }}'
;