Most vSphere shops already have three or four monitoring tools, and none of them agree on what a “host” is. VCF Operations knows the vCenter inventory but not the application. The Prometheus team knows the pods but not which ESX host they landed on. The log platform knows the syslog stream but cannot join it to anything. OpenTelemetry does not replace those tools by magic. What it gives you is one collection layer, one wire protocol and one naming scheme, so a VM, the host it runs on and the service inside it can finally be described with the same labels. This first part of the series explains what OpenTelemetry actually is in VMware terms, where it fits next to what you already run, and gets a real collector running on a Linux VM in about twenty minutes.

Level: beginner to intermediate  ·  Stack: vSphere 8 or VCF 9, OpenTelemetry Collector Contrib 0.166.0, any systemd Linux VM  ·  Build time: about 20 minutes for the first collector


Contents

  1. The problem OpenTelemetry solves for a vSphere team
  2. Metrics, logs and traces in vSphere terms
  3. Resources, attributes and semantic conventions
  4. Anatomy of the Collector
  5. Distributions, stability levels and the 2026 component renames
  6. Agent versus gateway
  7. Where it fits next to VCF Operations, Telegraf, Prometheus and perf charts
  8. Reference architecture for a vSphere estate
  9. Should you adopt it now: a decision checklist
  10. Workflow: your first collector on a Linux VM
  11. Troubleshooting the first install
  12. Series roadmap and what’s next

01. The problem OpenTelemetry solves for a vSphere team

Take a familiar incident. An application team reports that checkout is slow. The VM’s CPU graph in the vSphere Client looks fine. The datastore it lives on shows a latency bump in VCF Operations, but only as a five minute average. The Kubernetes team has pod metrics in Prometheus labelled with a node name that matches the VM name if someone remembered to keep them in sync. ESX logs are in a syslog server that nobody can query by VM. Every tool holds part of the answer, and the join between them is a person with four browser tabs.

OpenTelemetry (OTel) is a CNCF project that standardises three things, and it helps to keep them separate in your head:

  • A data model and wire protocol (OTLP). Metrics, logs and traces share one envelope with one way of describing where the data came from. OTLP runs over gRPC on port 4317 or HTTP on port 4318.
  • Semantic conventions. An agreed dictionary of names, such as host.name, k8s.pod.name or service.name, so every source labels things the same way.
  • The Collector. A single Go binary that receives or scrapes telemetry, transforms it, and sends it to one or more backends. For an infrastructure team this is the part you will actually operate.

What OTel is not matters just as much. It is not a database, not a dashboard and not an alerting engine. Data still lands in Prometheus, Mimir, Loki, Tempo, Elastic, Splunk or a commercial platform. The Collector is the pipe and the switchboard. That is why it slots in next to your existing tools instead of forcing a rip and replace.

The short version for a VMware admin. Think of the Collector as a programmable, vendor neutral syslog relay that also understands metrics and traces. It can poll vCenter, accept ESX syslog, receive data from agents inside guests, and fan all of it out to whatever backends your teams already use, with consistent labels attached on the way through.

02. Metrics, logs and traces in vSphere terms

OTel calls each kind of telemetry a signal. You already work with all three. They just have different names in the vSphere world.

SignalWhat it isvSphere equivalent you already knowTypical OTel source in a vSphere estate
MetricsNumeric measurements over time, with attributesPerformance counters behind the vSphere Client perf charts, esxtop columns, datastore capacityvcenter receiver polling vCenter, host_metrics inside guests, kubeletstats on Kubernetes nodes
LogsTimestamped records with a body and attributesvmkernel.log, hostd.log, vobd.log, vCenter events, guest OS logssyslog receiver for ESX remote syslog, filelog receiver for files inside guests
TracesThe path of one request through many services, as a tree of timed spansNo direct equivalent. The closest is following a vMotion task through vpxd and hostd logs by operation IDApplications instrumented with OTel SDKs sending OTLP to a collector

Metrics

An OTel metric has a name, a unit, a type and data points. The types that matter day to day are Gauge (a value right now, like datastore utilisation percent), Sum (a running total, which can be monotonic like bytes sent or non monotonic like VMs powered on) and Histogram (a distribution, mostly from applications). The unit is part of the metric, written in UCUM notation: ms, By for bytes, MiBy, %, MHz. When the data is exported to Prometheus, the unit usually becomes a suffix, so a metric in ms turns into something ending in _milliseconds. Part 2 shows exactly what the vCenter metrics look like after that translation.

One habit to unlearn: vSphere counters come with a rollup type baked into the name (cpu.ready.summation, disk.totalReadLatency.average). OTel metrics do not encode the rollup in the name. The receiver converts the counter into a sensible OTel type and unit, and the aggregation happens later in your query language.

Logs

An OTel log record has a timestamp, a severity, a body and attributes. A raw ESX syslog line arrives as a body string. The interesting work is parsing it into attributes such as the originating process (vmkernel, hostd, vobd), the device ID or the VOB event, so that you can count and alert on them instead of grepping. Part 3 builds that pipeline.

Traces

Traces come from application code, not from vSphere. So why should an infrastructure team care? Because a trace tells you which request was slow and which service and pod handled it. If that pod carries the name of its node, and the node VM carries the name of its ESX host and datastore, you can walk from a slow checkout all the way to a storage path. That join is the payoff of the whole series and it is what part 6 demonstrates.

03. Resources, attributes and semantic conventions

This is the concept that makes or breaks an OTel rollout, and it maps neatly onto the vSphere inventory tree.

  • Resource. The thing that produced the telemetry, described by a set of resource attributes. For a VM metric from the vCenter receiver that is attributes such as vcenter.datacenter.name, vcenter.cluster.name, vcenter.host.name and vcenter.vm.name. For a guest agent it is host.name and os.type.
  • Data point attributes. Dimensions of one measurement, such as direction=read or object=vmnic0. These are like the “instance” column in a vSphere perf chart.
  • Semantic conventions. The published registry of attribute and metric names. host.name, host.id, os.type, k8s.node.name, service.name and the system.* metric family are all defined there. A backend or dashboard that understands the conventions works with any compliant source.

There is an honest caveat here. There is no vSphere semantic convention. The vcenter.* resource attributes are defined by the vCenter receiver itself, and its generated documentation lists them with no semantic convention mapping. That is fine, but it means you own the join keys between vSphere data and everything else. The decision you need to make early is which attribute carries the VM identity everywhere:

SourceAttribute it naturally emitsJoin strategy
vCenter receivervcenter.vm.name, vcenter.vm.id (instance UUID)Treat as the authoritative VM identity
Agent collector in a guesthost.name from the OS hostnameKeep hostname equal to the VM name, or stamp vcenter.vm.name onto agent data with a processor
Kubernetes nodek8s.node.nameName node VMs identically in vCenter and Kubernetes. Part 5 covers this for VKS clusters.

Rule of thumb. VM names that differ from guest hostnames are the single biggest reason cross signal correlation fails in vSphere estates. Fix the naming standard before you build dashboards, not after.

04. Anatomy of the Collector

The Collector configuration is one YAML file with five top level sections. Four of them declare components and the fifth, service, wires them together. Declaring a component does nothing on its own. It only runs if a pipeline references it, which is the most common reason a first config “does nothing”.

Collector process (otelcol-contrib) RECEIVERS PROCESSORS (in order) EXPORTERS vcenter (API poll) host_metrics (local) syslog (ESX push) otlp (:4317 / :4318) 1. memory_limiter 2. resource_detection 3. transform / filter 4. batch debug (console) prometheus_remote_write otlp_http (Loki, Tempo) otlp_grpc (gateway) fan in fan out each pipeline: receivers, then processors in listed order, then exporters EXTENSIONS (outside the data path) health_check :13133, zpages, pprof, file_storage, authenticators
Figure 1. The shape of every pipeline. Simplified: in a real config the syslog receiver feeds a logs pipeline and the others feed metrics, but each pipeline fans in, runs processors in order and fans out the same way.
SectionJobvSphere analogy
receiversGet data in. Either pull (scrape vCenter, read host counters, tail a file) or listen (OTLP, syslog).The collector side of vCenter’s stats collection, or a syslog listener
processorsChange data in flight: protect memory, add or remove attributes, filter, batch.Roughly what vCenter rollups and stats levels do, but under your control
exportersSend data out to a backend, with queueing and retry.The syslog forwarder, or a vCenter alarm action
connectorsAct as an exporter for one pipeline and a receiver for another, for example to derive metrics from traces.No real analogy. You will not need them in this series until part 6.
extensionsCapabilities outside the data path: health checks, debugging pages, persistent queues, authentication.The VAMI health page
serviceLists enabled extensions, defines pipelines per signal, and configures the collector’s own logs and metrics.The part that actually turns things on

Pipelines are per signal

A pipeline has a type (metrics, logs or traces) and an optional name after a slash, such as metrics/vcenter. Any component can be instantiated more than once with the same slash naming: vcenter/site-a and vcenter/site-b are two independent receivers with their own config. Two properties of pipelines matter for operations:

  • Processor order is literal. The upstream guidance is to put memory_limiter first so it can push back on receivers before memory runs out, and batch after anything that drops data, so you do not batch records you are about to discard.
  • Exporters each get a full copy. Listing two exporters is how you dual write during a migration, for example to InfluxDB and Mimir at the same time while you compare dashboards.

05. Distributions, stability levels and the 2026 component renames

“The Collector” is a framework. What you download is a distribution: a build that includes a specific set of components. The project publishes several from the opentelemetry-collector-releases repository.

DistributionBinary and service nameWhat it containsUse it for
CoreotelcolA small, conservative set: OTLP, host_metrics, batch, memory_limiter, debug and a few moreAgents that only forward OTLP
Contribotelcol-contribAlmost everything in the contrib repository, including the vcenter and syslog receiversGateways, labs and this series
Kubernetesotelcol-k8sComponents curated for Kubernetes clustersPart 5
OTLPotelcol-otlpOnly OTLP in and outMinimal relays

Contrib is large and its attack surface is correspondingly large. In production, many teams build a custom distribution with the OpenTelemetry Collector Builder (ocb) that contains only the components they use. Start with contrib, write down which components your configs reference, and trim later. Vendor distributions, such as Grafana Alloy, also embed many of the same components (Alloy exposes the vCenter receiver as otelcol.receiver.vcenter), but configuration syntax differs, so the YAML in this series targets the upstream collector.

Stability levels are not decoration

Every component declares a stability level per signal in its README: development, alpha, beta, stable, and later deprecated or unmaintained. For the components in this series as of Collector 0.166.0:

ComponentStability (metrics unless noted)What that means for you
vcenter receiveralphaConfig keys and metric names can still change between releases. Pin your collector version and read the changelog before upgrades.
host_metrics receiverbetaBroadly settled, changes are announced with deprecation periods.
batch, memory_limiter, resource_detection, transform processorsbetaSafe to depend on.
otlp_http exporterstable (traces, metrics, logs)The safest way to move data between collectors and into OTLP native backends.
prometheus_remote_write exporterbetaWidely used for Prometheus, Mimir, Thanos and Cortex.
debug exporteralpha, with an explicitly unstable output formatFor eyeballing data only. Never parse its output.

The snake_case renames

If you copy configs from older blog posts, this will bite you. Through 2026 the project renamed many component types to snake_case and kept the old names as deprecated aliases that log a warning. Examples relevant to this series: hostmetrics became host_metrics (contrib v0.151.0), resourcedetection became resource_detection (v0.153.0), prometheusremotewrite became prometheus_remote_write (v0.154.0), and in core otlp and otlphttp exporters became otlp_grpc and otlp_http (v0.144.0). The OTLP receiver is still called otlp. Old names still work today, but they will be removed, so every template in this series uses the new names.

06. Agent versus gateway

The same binary runs in two roles, and a vSphere estate almost always ends up with both.

AgentGateway
Where it runsInside each guest VM, or as a DaemonSet on each Kubernetes nodeA small pool of dedicated VMs (or a Deployment) per site or per vCenter
What it collectsLocal things: OS metrics, local log files, OTLP from apps on the same boxRemote and shared things: vCenter API, ESX syslog, OTLP from all agents
ProcessingLight. Detect resource attributes, batch, forward.Heavy. Enrich, filter, route, hold credentials to backends, retry.
Failure impactOne VM loses visibilityA whole site loses visibility. Run at least two.
vSphere analogyVMware Tools in each guestvCenter itself: one place that talks to everything

Two vSphere specific rules fall out of this. First, the vCenter receiver belongs on a gateway, never on an agent: you want one poller per vCenter, not one per VM. Second, ESX hosts cannot run a collector themselves, so ESX telemetry always arrives at a gateway, either by API (metrics through vCenter) or by push (remote syslog). Keep gateway VMs on a management cluster that does not depend on the clusters they monitor, the same placement logic you already use for vCenter.

07. Where it fits next to VCF Operations, Telegraf, Prometheus and perf charts

Naming first. In VCF 9, VMware Aria Operations became VCF Operations, and Aria Operations for Logs became VCF Operations for logs. ESXi is called ESX from 9.0 onward. “vSphere with Tanzu” is now vSphere Supervisor, and TKG clusters on it are the vSphere Kubernetes Service (VKS). PowerCLI is now distributed as VCF.PowerCLI. I use the new names throughout and mention the old ones where people still search for them.

ToolWhat it does bestWhere OTel adds valueCoexistence pattern
vCenter perf chartsAuthoritative counters with 20 second real time detail for the last hour, zero setupRetention beyond vCenter’s rollups, cross system queries, alerting on anythingKeep using them for live troubleshooting. Use them as the reference when you validate a new pipeline.
VCF OperationsCapacity planning, what if analysis, compliance, vSphere aware alerting, licensing in VCF 9Correlation with application and Kubernetes telemetry, open storage and query languages, per team dashboards without per seat licensingRun both. VCF Operations stays the capacity and compliance tool reading vCenter through its own adapter. OTel feeds the shared observability stack. Do not duplicate alerts between them.
Telegraf and InfluxDBMature vsphere input plugin with a very wide counter selection and fine control over real time versus historical collection. VCF Operations itself uses Telegraf for its application and OS monitoring.One protocol for metrics, logs and traces, semantic conventions, no InfluxDB lock inA working Telegraf vSphere pipeline is not an emergency. Dual write during migration, or keep Telegraf for the counters the vCenter receiver does not expose (see part 2).
Prometheus exportersSimple scrape model, huge ecosystemLogs and traces, push from places Prometheus cannot reach, enrichment before storagePrometheus or Mimir remains the metrics store. The collector writes into it, and Prometheus 3 can also ingest OTLP natively with --web.enable-otlp-receiver.

The pattern that works is not “replace everything with OTel”. It is “make OTel the default path for anything new, and the place where signals get consistent labels”. Existing tools either keep their job or become backends behind the collector.

One more realistic note. The vCenter receiver exposes a curated set of host, VM, datastore, cluster, resource pool and vSAN metrics, not every vSphere counter. If your current dashboards depend on co-stop, datastore level latency or NFS counters, check part 2’s mapping table before you promise a cutover date.

08. Reference architecture for a vSphere estate

SOURCES vCenter (vpxd) vSphere API on 443 polled, never agent based ESX hosts remote syslog (TCP/TLS) vmkernel, hostd, vobd Guest VMs agent collector per VM host_metrics, filelog, apps VKS clusters DaemonSet agents kubeletstats, pod logs VCF Operations own vCenter adapter capacity, compliance unchanged by OTel Gateway collectors: 2 or more VMs per site, behind a VIP or DNS name vcenter receiver syslog receiver otlp receiver memory_limiter, resource_detection, transform, batch one vcenter receiver per vCenter, run on one gateway only BACKENDS Prometheus / Mimir metrics Loki logs Tempo traces remote write OTLP OTLP Grafana dashboards, alerting, and jumping between signals on shared labels Solid blue: telemetry pushed. Dashed: API polling. Grey arrows from Grafana: queries.
Figure 2. A reference layout for one site. Repeat the gateway pair per site and keep backends central, or regional if WAN links are thin.

The design choices behind the diagram, and why:

  1. One vCenter receiver per vCenter, on exactly one gateway. Polling receivers are not load balanced like push traffic. If both gateways run the same vcenter receiver you double the load on vCenter and write duplicate series. Either pin it to one node and accept a gap during failover, or run it active and passive with your existing VM HA. Part 2 goes deeper.
  2. Push traffic goes to a VIP. ESX syslog and agent OTLP can safely target both gateways through a load balancer or DNS name, because each record is independent.
  3. Agents stay thin. They detect their own resource attributes and forward OTLP. Backend credentials, routing and filtering live on the gateways, so rotating a Mimir token is a two VM change, not a two thousand VM change.
  4. VCF Operations is a sibling, not a source. It keeps reading vCenter directly. OTel does not need anything from it, and nothing in this design changes its licensing or data.
  5. Gateways live in the management domain. If the workload cluster has a storage problem, the thing that tells you about it should not be stored on that cluster.

09. Should you adopt it now: a decision checklist

Answer these honestly. Three or more “yes” answers in the first group and you have a real use case. Any “yes” in the second group means start in a lab and plan carefully before production.

Signs OTel is worth it now

  • Application or platform teams already send OTLP, or have been told to, and you want infrastructure data in the same place.
  • You run Kubernetes on vSphere (VKS or another distribution) and need to join pod, node VM and ESX host data.
  • You have Prometheus, Mimir, Loki or Grafana in house and want vSphere data there without maintaining a separate InfluxDB.
  • Your ESX syslog goes somewhere nobody queries, and you want parsed, alertable events.
  • You need to route the same data to two backends during a tool migration.
  • You want vendor neutral collection because the backend decision is not final.

Signs to wait or go slowly

  • Your only requirement is vSphere capacity planning and VCF Operations already does it well.
  • Your dashboards rely on counters the vCenter receiver does not emit, and you have no appetite to keep a second collector for them.
  • Change control cannot absorb an alpha component whose metric names may change between releases.
  • Nobody owns the backend. A collector with nowhere reliable to send data is just a new failure point.

Prerequisites before production

ItemDone when
Naming standardVM name equals guest hostname equals Kubernetes node name, documented and enforced at provisioning
Backend ownershipA named team owns retention, capacity and on call for the metrics, logs and traces stores
Collector version policyPinned version, upgrade cadence agreed, changelog review step in the change template
Service accountsRead only vCenter account per collector, password in an environment file, not in YAML
NetworkFirewall rules for 443 to vCenter, 514 or 6514 from ESX, 4317 and 4318 from agents, and egress to backends
Self monitoringCollector internal metrics scraped and an alert on “no data received for 10 minutes”
PlacementGateway VMs on the management cluster with anti affinity rules

10. Workflow: your first collector on a Linux VM

Goal: a contrib collector running under systemd on a small Linux VM, collecting the VM’s own OS metrics with host_metrics and printing them with the debug exporter. No backend is needed yet. This same VM becomes the gateway in part 2. Any systemd distribution works. The commands show the DEB path for Ubuntu or Debian and the RPM path for RHEL family systems. Use 2 vCPU, 4 GB RAM and 20 GB disk, which is plenty for a lab gateway.

Step 1. Download and verify the package

# Pin the version. Check the releases page before changing it.
OTEL_VERSION=0.166.0
ARCH=amd64     # or arm64
BASE=https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${OTEL_VERSION}

# Debian / Ubuntu
curl -fsSLO "${BASE}/otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.deb"
curl -fsSLO "${BASE}/otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.deb.sha256"
sha256sum otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.deb
cat otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.deb.sha256

# RHEL / Rocky / Alma: same, with .rpm instead of .deb

Verify: the hash printed by sha256sum matches the contents of the .sha256 file. If your VM has no internet access, download on a jump host and copy the package over. The release also publishes Sigstore bundles if your security team wants signature verification.

Step 2. Install

# Debian / Ubuntu
sudo dpkg -i otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.deb

# RHEL family
sudo rpm -ivh otelcol-contrib_${OTEL_VERSION}_linux_${ARCH}.rpm

# What the package created
systemctl cat otelcol-contrib | head -20
ls -l /etc/otelcol-contrib/
id otelcol-contrib

Verify: the unit file shows ExecStart=/usr/bin/otelcol-contrib $OTELCOL_OPTIONS, EnvironmentFile=/etc/otelcol-contrib/otelcol-contrib.conf and User=otelcol-contrib. The directory contains config.yaml and otelcol-contrib.conf, and a system user otelcol-contrib exists. Be aware that the package enables and starts the service immediately with a sample config that opens OTLP, Jaeger and Zipkin listeners on all interfaces. Step 3 replaces it.

Step 3. Write the first config

Back up the sample, then write /etc/otelcol-contrib/config.yaml. Every line is commented so you can see which section does what.

sudo cp /etc/otelcol-contrib/config.yaml /etc/otelcol-contrib/config.yaml.sample
sudo tee /etc/otelcol-contrib/config.yaml > /dev/null <<'EOF'
# /etc/otelcol-contrib/config.yaml
# Part 1 of "OpenTelemetry for vSphere admins": local OS metrics to the console.

extensions:
  health_check:
    endpoint: 127.0.0.1:13133        # GET / returns 200 when the collector is up

receivers:
  host_metrics:                      # was "hostmetrics" before v0.151.0
    collection_interval: 30s
    scrapers:
      cpu:
      memory:
      load:
      disk:
      filesystem:
      network:
      paging:

processors:
  memory_limiter:                    # always first
    check_interval: 1s
    limit_percentage: 75
    spike_limit_percentage: 15
  resource_detection/system:         # adds host.name and os.type
    detectors: [system]
    system:
      hostname_sources: [os]
  batch: {}                          # always last

exporters:
  debug:
    verbosity: basic                 # one summary line per batch; use "detailed" briefly to inspect

service:
  extensions: [health_check]
  telemetry:
    logs:
      level: info
  pipelines:
    metrics:
      receivers: [host_metrics]
      processors: [memory_limiter, resource_detection/system, batch]
      exporters: [debug]
EOF

Verify: the collector can parse it before you restart anything.

sudo -u otelcol-contrib /usr/bin/otelcol-contrib validate --config=/etc/otelcol-contrib/config.yaml && echo CONFIG_OK

Expected: CONFIG_OK and no error lines. A typo in a component name produces an error naming the unknown type. A component declared but not used in a pipeline is not an error, which is why reading the pipeline section twice is worth it.

Step 4. Restart and watch it start

sudo systemctl restart otelcol-contrib
sudo systemctl is-active otelcol-contrib
sudo journalctl -u otelcol-contrib --since "2 min ago" --no-pager | grep -E "Everything is ready|error|warn"

Expected: active, then a log line containing Everything is ready. Begin running and processing data. and no errors. If you see a warning about a deprecated component type, you used an old name such as hostmetrics. It still works, but fix it now.

Step 5. See the data

sudo journalctl -u otelcol-contrib -f --no-pager | grep '"data points"'

Expected: every 30 seconds, an info line from the debug exporter with the message Metrics and three counts: "resource metrics", "metrics" and "data points". The counts stay roughly constant from batch to batch. Exact numbers depend on how many CPUs, disks, filesystems and NICs the VM has.

To see actual metric names and attributes, switch verbosity to detailed, restart, look for one cycle, and switch it back. You should see metrics such as system.cpu.time, system.memory.usage, system.cpu.load_average.1m, system.filesystem.usage, system.disk.io and system.network.io, each under a resource carrying host.name and os.type. Leaving detailed output on fills the journal quickly.

Step 6. Check health and the collector’s own metrics

curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:13133/
curl -s http://127.0.0.1:8888/metrics | grep -E '^otelcol_(receiver_accepted|exporter_sent)_metric_points'

Expected: 200 from the health check. From port 8888, which is where the collector exposes its own Prometheus format metrics by default on 127.0.0.1, one or more otelcol_receiver_accepted_metric_points lines labelled with receiver="host_metrics" and otelcol_exporter_sent_metric_points lines labelled with exporter="debug", both increasing every cycle. Recent collectors export these counters without the _total suffix by default. These two counters are the ones to alert on later: accepted rising while sent stays flat means the backend is not taking data.

Step 7. Prepare for part 2

Create a place for secrets that is not the config file. The packaged unit already reads /etc/otelcol-contrib/otelcol-contrib.conf, but keeping credentials in their own file with tight permissions makes reviews and rotation easier.

sudo install -d -m 0755 /etc/systemd/system/otelcol-contrib.service.d
sudo tee /etc/systemd/system/otelcol-contrib.service.d/10-secrets.conf > /dev/null <<'EOF'
[Service]
EnvironmentFile=/etc/otelcol-contrib/secrets.env
EOF

sudo install -m 0640 -o root -g otelcol-contrib /dev/null /etc/otelcol-contrib/secrets.env
echo 'VCENTER_USERNAME=<SVC_ACCOUNT>@<DOMAIN>' | sudo tee -a /etc/otelcol-contrib/secrets.env > /dev/null
echo 'VCENTER_PASSWORD=<PASSWORD>' | sudo tee -a /etc/otelcol-contrib/secrets.env > /dev/null

sudo systemctl daemon-reload
sudo systemctl restart otelcol-contrib
systemctl show otelcol-contrib -p EnvironmentFiles

Expected: EnvironmentFiles= lists both otelcol-contrib.conf and secrets.env. The config file references these later as ${env:VCENTER_PASSWORD}, so the secret never appears in YAML or in version control. To keep the password out of shell history, edit the file with sudoedit instead of echo.

11. Troubleshooting the first install

SymptomLikely causeCheckFix
Service fails immediately, systemctl status shows exit code 1YAML syntax error or unknown component typeotelcol-contrib validate --config=/etc/otelcol-contrib/config.yamlFix the reported line. Tabs instead of spaces and a missing colon after a scraper name are the usual culprits.
unknown type: "vcenter" or similarRunning the core otelcol binary instead of otelcol-contribotelcol-contrib components | grep -A2 vcenterInstall the contrib package. Core does not include vSphere components.
Running, but no debug lines appearReceiver or exporter declared but not referenced in service.pipelinesRead the pipelines block, then check otelcol_receiver_accepted_metric_points on port 8888Add the component to the pipeline lists.
Warning about a deprecated component typeOld names such as hostmetrics, resourcedetection, otlphttpjournalctl -u otelcol-contrib | grep -i deprecatRename to the snake_case type. Behaviour is identical.
Bind error on 4317 or 4318 after installSample config still active, or another agent already listeningss -ltnp | grep -E '4317|4318'Replace the sample config as in step 3, or stop the conflicting agent.
${env:VCENTER_PASSWORD} resolves to emptyEnvironment file not loaded or not readable by the service usersystemctl show otelcol-contrib -p EnvironmentFiles and ls -l /etc/otelcol-contrib/secrets.envRun daemon-reload, check the drop-in path, set group to otelcol-contrib with mode 0640.
Journal fills disk quicklyDebug exporter left at detailedjournalctl --disk-usageSet verbosity: basic or remove the debug exporter once a real backend is configured.
Collector killed by the OOM killerNo memory_limiter, or limit set above what the VM hasjournalctl -k | grep -i oomKeep memory_limiter first in every pipeline. Consider also setting GOMEMLIMIT in the environment file, as the processor README recommends.

12. Series roadmap and what’s next

PartTopicYou will end up with
1Why and where it fits (this post)A running contrib collector and a reference architecture
2The vCenter receiver end to endHost, VM, datastore, cluster and vSAN metrics from vCenter with a least privilege account
3ESX syslog into OTelParsed vmkernel, hostd and vobd events you can count and alert on
4Backends and GrafanaPrometheus or Mimir, Loki and Tempo behind the gateway, with dashboards
5Kubernetes on vSphereDaemonSet agents plus gateway, with pods tied back to node VMs
6From trace to datastoreOne slow request followed from span to pod to VM to ESX host to datastore latency

Next up is part 2, the vCenter receiver end to end, which turns the VM you just built into a vCenter poller with a least privilege service account, a production style pipeline and a mapping from the esxtop and perf chart counters you know to the metrics the receiver actually emits. If you already run Telegraf against vCenter, my earlier write-up on wiring Grafana into vCenter covers the statistics model that both approaches depend on, and VCF Operations versus OpenTelemetry and Grafana goes deeper on the coexistence question from section 07. If you want to size gateways before you build them, sizing the OTel Collector for vSphere is the companion post.

Written against OpenTelemetry Collector Contrib 0.166.0 (released November 2026). Component names, stability levels and package layout were checked against the upstream READMEs, changelogs and the opentelemetry-collector-releases packaging files for that version. The vCenter receiver is alpha, so pin your version and re-check the README before upgrading.

2 responses

  1. […] is the gateway config for one vCenter, built on the VM from part 1. It uses the snake_case component names from current releases. Design notes follow the […]

  2. […] you are starting the OTel half from scratch, begin with part 1 of the OTel for vSphere admins series, which places OTel next to VCF Operations, Prometheus and Telegraf, then build the vCenter pipeline […]

Leave a Reply