- Deploy an OpenTelemetry Collector to collect host metrics.
- Configure your Collector using our configuration as a starting point.
Install the Collector Agent
Install the latest OpenTelemetry Collectorotelcol-contrib binary on your host system. If you have not installed a Collector before or need a refresher, follow the instructions in Install the Collector on the OpenTelemetry documentation.
Download our honeycomb-metrics-config.yaml file and use that to configure your Collector.
Set Environment Variables
Set the following environment variables before running the Collector:HNY_API_KEY: Your API key. Replace<YOUR_HONEYCOMB_API_KEY>with this value in the example below.HNY_DATASET: The name of the dataset you want to send these metrics to. Replace<YOUR_HONEYCOMB_DATASET>with this value in the following example.OTEL_RESOURCE_ATTRIBUTES: These attributes are added to each data point. Replacehellohostmetricswith the name of your service anddevelopmentwith the name of your environment in the following example.
Run the Collector Agent
After setting your environment variables, run the Collector binary with the following command.Customize Your Agent Configuration
Our host metrics Collector configuration (honeycomb-metrics-config.yaml) keeps your event volume low and gives you as much data as possible in each event.
Use it as the basis for your own configuration, making changes to better fit your observability needs and host environment.
Resource Attributes
You can add custom resource attributes to all your data points by changing theOTEL_RESOURCE_ATTRIBUTES environment variable.
Attributes are separated by the comma character (,).
Resource Detection Processor
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 use the resource detection processor to automatically add metadata about the host to every metric data point. Enable the resource detection processor for a host by adding a value from the list below toprocessors.resourcedetection.detectors:
- Docker:
docker - Google Cloud:
gce - EC2:
ec2 - ECS:
ecs - Azure:
azure
Metrics Collection Interval
Change how often host metrics are collected by settingreceivers.hostmetrics.collection_interval.
Disable a Metrics Scraper
You can also disable specific scrapers by removing them from the list inreceivers.hostmetrics.scrapers.
Debug Output Verbosity
Change debug logging verbosity by settingexporters.debug.verbosity to either detailed, normal, or basic.
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 ourhoneycomb-metrics-config.yaml file as a basis for your configuration, since it is designed to keep your event volume low while providing as much data as possible in each event.
Refer more about managing your metrics data volume, and about using your own Collector with this custom configuration.