REST Resource: organizations.environments.stats

Resource: Stats

Encapsulates a stats response.

JSON representation
{
  "environments": [
    {
      object (EnvironmentStats)
    }
  ],
  "hosts": [
    {
      object (HostStats)
    }
  ],
  "metaData": {
    object (Metadata)
  }
}
Fields
environments[]

object (EnvironmentStats)

List of query results on the environment level.

hosts[]

object (HostStats)

List of query results grouped by host.

metaData

object (Metadata)

Metadata information.

EnvironmentStats

Encapsulates the environment wrapper:

"environments": [ { "metrics": [ { "name": "sum(message_count)", "values": [ "2.52056245E8" ] } ], "name": "prod" } ]

JSON representation
{
  "name": string,
  "metrics": [
    {
      object (Metric)
    }
  ],
  "dimensions": [
    {
      object (DimensionMetric)
    }
  ]
}
Fields
name

string

Name of the environment.

metrics[]

object (Metric)

In the final response, only one of the following fields will be present based on the dimensions provided. If no dimensions are provided, then only top-level metrics is provided. If dimensions are included, then there will be a top-level dimensions field under environments which will contain metrics values and the dimension name.

Example:

"environments": [ { "dimensions": [ { "metrics": [ { "name": "sum(message_count)", "values": [ "2.14049521E8" ] } ], "name": "nit_proxy" } ], "name": "prod" } ]

or

"environments": [ { "metrics": [ { "name": "sum(message_count)", "values": [ "2.19026331E8" ] } ], "name": "prod" } ]

List of metric values.

dimensions[]

object (DimensionMetric)

List of metrics grouped under dimensions.

Metric

Encapsulates the metric data point. For example:

{ "name": "sum(message_count)", "values" : [ { "timestamp": 1549004400000, "value": "39.0" }, { "timestamp" : 1548997200000, "value" : "0.0" } ] }

or

{ "name": "sum(message_count)", "values" : ["39.0"] }

JSON representation
{
  "name": string,
  "values": array
}
Fields
name

string

Metric name.

values

array (ListValue format)

List of metric values. Possible value formats include: "values":["39.0"] or "values":[ { "value": "39.0", "timestamp": 1232434354} ]

DimensionMetric

Encapsulates a metric grouped by dimension.

JSON representation
{
  "name": string,
  "metrics": [
    {
      object (Metric)
    }
  ]
}
Fields
name

string

Name of the dimension.

metrics[]

object (Metric)

List of metrics.

HostStats

Encapsulates the hostname wrapper:

"hosts": [ { "metrics": [ { "name": "sum(message_count)", "values": [ "2.52056245E8" ] } ], "name": "example.com" } ]

JSON representation
{
  "name": string,
  "metrics": [
    {
      object (Metric)
    }
  ],
  "dimensions": [
    {
      object (DimensionMetric)
    }
  ]
}
Fields
name

string

Hostname used in query.

metrics[]

object (Metric)

In the final response, only one of the following fields will be present based on the dimensions provided. If no dimensions are provided, then only the top-level metrics are provided. If dimensions are included, then there will be a top-level dimensions field under hostnames which will contain metrics values and the dimension name. Example:

"hosts": [ { "dimensions": [ { "metrics": [ { "name": "sum(message_count)", "values": [ "2.14049521E8" ] } ], "name": "nit_proxy" } ], "name": "example.com" } ]

OR

```"hosts": [
       {
           "metrics": [
               {
                   "name": "sum(message_count)",
                    "values": [
                       "2.19026331E8"
                   ]
               }
           ],
           "name": "example.com"
       }
   ]```

List of metric values.

dimensions[]

object (DimensionMetric)

List of metrics grouped under dimensions.

Methods

get

Retrieve metrics grouped by dimensions.