Skip to main content

host_totals

Creates, updates, deletes, gets or lists a host_totals resource.

Overview

Namehost_totals
TypeResource
Iddatadog.infrastructure.host_totals

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
total_activeinteger (int64)Total number of active host (UP and ???) reporting to Datadog.
total_upinteger (int64)Number of host that are UP and reporting to Datadog.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_host_totalsselectfromThis 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.

NameDatatypeDescription
sitestringThe 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.
frominteger (int64)Number of seconds from which you want to get total number of active hosts.

SELECT examples

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 }}'
;