Host Metrics | Honeycomb

We use cookies or similar technologies to personalize your online experience & tailor marketing to you. Many of our product features require cookies to function properly.

Read our privacy policy I accept cookies from this site

Host Metrics

This feature is available as part of the Honeycomb Enterprise plan.

OpenTelemetry Collector can be deployed as an agent running on individual hosts, where it will regularly collect and forward diagnostic information about the system it runs on. For example, it can collect regular samples of CPU, memory, disk, and network utilization so that this data can be visualized in a Honeycomb query. These instructions describe how to install and run OpenTelemetry Collector in this way, and send the data it collects into Honeycomb.

How It Works  🔗

OpenTelemetry Collector can be widely deployed across all your hosts as an agent. It can then be configured to scrape a specific set of system metrics at a regular interval (for example, once every 10 seconds), batch that data, and forward it to Honeycomb for querying and display. Each data point will be tagged with information about the host it was collected from, so that you can calculate aggregations across arbitrary subsets of production hosts.

An architecture diagram depicting OpenTelemetry Collector running on a host, scraping metrics and sending data to Honeycomb over OTLP.

Installing and running OpenTelemetry Collector agents  🔗

The easiest way to get started collecting host metrics is by using one of our Collector binaries.

Download a binary that is compatible with your system, along with the honeycomb-metrics-config.yaml file. Run the binary with the command below (substituting xxxxx with your API key, hostmetrics with the name of the dataset you would like to send metrics to, otelcol_hny_linux_amd64 with the path to the binary you are using, foozle with your service name, and production with your environment):

HNY_API_KEY=xxxxx \
HNY_DATASET=hostmetrics \
OTEL_RESOURCE_ATTRIBUTES='service.name=foozle,deployment.environment=production' \
./otelcol_hny_linux_amd64 --config ./honeycomb-metrics-config.yaml

A process will start and begin sending metrics to your dataset every 10 seconds.

Customizing the Agent Configuration  🔗

You can add custom resource attributes to all your datapoints by changing the OTEL_RESOURCE_ATTRIBUTES environment variable. Attributes are separated by the comma character (,). (See more information about attributes and this environment variable.)

If your host is deployed using Docker, Google Cloud, Google Kubernetes Engine, Amazon EC2, Amazon ECS, Amazon Elastic Beanstalk, Amazon EKS, or Azure, you can utilize the resource detection processor to automatically add metadata about the host to every metric data point. (See more information about the resource detection processor.) To enable the resource detection processor, edit the config file and add a value from the list below to processors.resourcedetection.detectors:

  • Docker: docker
  • Google Cloud: gce
  • EC2: ec2
  • ECS: ecs
  • Azure: azure

You can change the log level by editing the config file and adjusting exporters.logging.logLevel to debug, info, warn, or error. See more information about the logging exporter.

You can tweak the collection interval of your hostmetrics by adjusting receivers.hostmetrics.collection_interval. You can also disable specific scrapers by removing them from the list in receivers.hostmetrics.scrapers. See more information about the hostmetrics receiver.

Using a Custom Build of OpenTelemetry Collector  🔗

It is possible to use a different build of OpenTelemetry Collector to send host metrics to Honeycomb. If you do this, we still recommend using our honeycomb-metrics-config.yaml file as a basis for your configuration, since it is designed to keep your event volume low while providing you with as much data as possible in each event.

See more about managing your metrics data volume, and about using your own collector with this configuration.