Use Vector to send host metrics to Honeybadger Insights
You can use Vector to track metrics on your servers (like CPU, memory usage, disk usage, etc.) and send the metrics to Insights. Here’s a sample configuration that will encode the metrics into the newline-delimited JSON format that our API expects:
# Put this in /etc/vector/vector.yamlsources:  host:    type: "host_metrics"
sinks:  honeybadger_events:    type: "http"    inputs: ["host"]    uri: "https://api.honeybadger.io/v1/events"    request:      headers:        X-API-Key: "PROJECT_API_KEY"    encoding:      codec: "json"    framing:      method: "newline_delimited"The metrics look like this in the Insights UI:

Here’s an example BadgerQL query you can use to get a snapshot of the disk usage:
fields @ts, tags.mountpoint::str, round(gauge.value::float * 100, 2) as used_percentage| filter namespace::str == "host"| filter name::str == "filesystem_used_ratio"| filter gauge.value::float > 0.0| filter tags.filesystem::str not in ["tmpfs", "devtmpfs", "squashfs"]| sort @ts| limit 1 by tags.mountpoint
Additional information about how to configure Vector to capture host metrics can be found here.
The easiest way to run Vector is via Docker. Here’s a sample
Docker Compose configuration you can use,
assuming your Vector configuration is in a file named vector.yaml:
version: "3.2"services:  vector:    image: timberio/vector:latest-alpine    volumes:      - "vector.yaml:/etc/vector/vector.yaml:ro"