> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# VMware vCenter alert integration

> Receive VMware vCenter Server 6.x, 7.x, and 8.x alarm traps through flashduty-vmware-snmp, grouped by alarm and target object and resolved when the alarm returns to normal.

VMware vCenter Server alarm actions can send SNMP traps, not HTTP webhooks. Deploy `flashduty-vmware-snmp` on an internal Linux or Windows host to receive UDP traps and forward them over HTTPS to Flashduty On-call. Stateful alarms are grouped by vCenter instance, target object, and alarm name, and resolve automatically when the alarm returns to normal. vCenter Server 6.x, 7.x, and 8.x are supported.

## In Flashduty On-call

Get an integration push URL in either of the two ways below.

### Use a dedicated integration

1. In the Flashduty console, select **Channels** and open a channel
2. Select **Settings** → **Integrations** → **Dedicated integrations**, then select **Add integration**
3. Select **VMware vCenter** and select **Save**
4. Open the generated integration card and copy the **Push URL**

### Use a shared integration

1. In the Flashduty console, select **Integration Center → Alert Events**
2. Select **VMware vCenter** and enter an integration name
3. Configure the default route and select a channel; you can add more rules under **Routing** after creation
4. Select **Save** and copy the generated **Push URL**

## Configure the forwarder and vCenter

**1. Deploy flashduty-vmware-snmp on an internal host**

Prepare a Linux or Windows (64-bit or 32-bit) host that can receive UDP packets from vCenter and reach `api.flashcat.cloud:443` over HTTPS:

> [tab] Linux (amd64 / arm64)
>
> Download the archive for your CPU architecture and install the `systemd` service:
>
> ```bash theme={null}
> ARCH=amd64   # Change to arm64 on ARM64 hosts
> curl -fsSLO "https://static.flashcat.cloud/flashduty-vmware-snmp/v0.1.0/flashduty-vmware-snmp_0.1.0_linux_${ARCH}.tar.gz"
> curl -fsSLO "https://static.flashcat.cloud/flashduty-vmware-snmp/v0.1.0/sha256sums.txt"
> grep "linux_${ARCH}.tar.gz" sha256sums.txt | sha256sum -c -
>
> tar -xzf "flashduty-vmware-snmp_0.1.0_linux_${ARCH}.tar.gz"
> sudo install -m 0755 flashduty-vmware-snmp /usr/local/bin/flashduty-vmware-snmp
> sudo install -m 0644 flashduty-vmware-snmp.service /etc/systemd/system/flashduty-vmware-snmp.service
> ```
>
> Create `/etc/flashduty/vmware-snmp.env` with `0600` permissions (choose a community string such as `vc-trap`) and start the service:
>
> ```bash theme={null}
> sudo install -d -m 0755 /etc/flashduty
> sudo tee /etc/flashduty/vmware-snmp.env >/dev/null <<'EOF'
> VMWARE_SNMP_LISTEN=0.0.0.0:162
> VMWARE_SNMP_PUSH_URL='{integration_url}'
> VMWARE_SNMP_COMMUNITY=vc-trap
> EOF
> sudo chmod 0600 /etc/flashduty/vmware-snmp.env
>
> sudo systemctl daemon-reload
> sudo systemctl enable --now flashduty-vmware-snmp
> ```

> [tab] Windows (64-bit / 32-bit)
>
> Open PowerShell **as Administrator**, detect 64-bit (`amd64`) or 32-bit (`386`) Windows automatically, verify the SHA-256 checksum, and extract to `C:\Program Files\Flashduty`:
>
> ```powershell theme={null}
> $Arch = if ([Environment]::Is64BitOperatingSystem) { "amd64" } else { "386" }
> $Zip  = "flashduty-vmware-snmp_0.1.0_windows_$Arch.zip"
> $Base = "https://static.flashcat.cloud/flashduty-vmware-snmp/v0.1.0"
>
> Invoke-WebRequest -Uri "$Base/$Zip" -OutFile $Zip
> Invoke-WebRequest -Uri "$Base/sha256sums.txt" -OutFile sha256sums.txt
> $Expected = ((Select-String -Path sha256sums.txt -Pattern "windows_$Arch\.zip").Line -split '\s+')[0]
> if ((Get-FileHash $Zip -Algorithm SHA256).Hash.ToLower() -ne $Expected.ToLower()) {
>   throw "SHA256 mismatch"
> }
>
> New-Item -ItemType Directory -Force -Path "C:\Program Files\Flashduty", "C:\ProgramData\Flashduty" | Out-Null
> Expand-Archive -Path $Zip -DestinationPath "C:\Program Files\Flashduty" -Force
> ```
>
> Write `C:\ProgramData\Flashduty\vmware-snmp.env`, restrict file ACLs to `SYSTEM` and `Administrators`, allow inbound `UDP 162`, and register the Windows service:
>
> ```powershell theme={null}
> @"
> VMWARE_SNMP_LISTEN=0.0.0.0:162
> VMWARE_SNMP_PUSH_URL='{integration_url}'
> VMWARE_SNMP_COMMUNITY=vc-trap
> VMWARE_SNMP_LOG_FILE=C:\ProgramData\Flashduty\vmware-snmp.log
> "@ | Set-Content -Encoding UTF8 "C:\ProgramData\Flashduty\vmware-snmp.env"
>
> icacls "C:\ProgramData\Flashduty\vmware-snmp.env" /inheritance:r /grant:r "SYSTEM:(R)" "Administrators:(F)"
>
> # Stop the built-in Windows SNMP Trap service if it is holding UDP 162
> if (Get-Service SNMPTRAP -ErrorAction SilentlyContinue) {
>   Stop-Service SNMPTRAP -Force
>   Set-Service SNMPTRAP -StartupType Disabled
> }
>
> New-NetFirewallRule -DisplayName "Flashduty VMware SNMP" -Direction Inbound -Protocol UDP -LocalPort 162 -Action Allow
>
> New-Service -Name FlashdutyVMwareSNMP -DisplayName "Flashduty VMware SNMP" -BinaryPathName '"C:\Program Files\Flashduty\flashduty-vmware-snmp.exe" --env-file "C:\ProgramData\Flashduty\vmware-snmp.env"' -StartupType Automatic
> sc.exe failure FlashdutyVMwareSNMP reset= 86400 actions= restart/3000/restart/3000/restart/3000
> Start-Service FlashdutyVMwareSNMP
> ```

Forwarder options (available via environment variables, `--env-file`, and CLI flags):

| Environment variable / flag | Default | Description |
| :- | :- | :- |
| `VMWARE_SNMP_PUSH_URL` / `--push-url` | Required | Flashduty integration push URL `{integration_url}`; pass it through a restricted `.env` file rather than `--push-url` so `integration_key` does not appear in process listings |
| `VMWARE_SNMP_LISTEN` / `--listen` | `0.0.0.0:162` | UDP listen address; the Linux `systemd` unit binds port 162 without root via `CAP_NET_BIND_SERVICE` |
| `VMWARE_SNMP_COMMUNITY` / `--community` | Empty (accept all) | Comma-separated allowlist of accepted SNMP community strings; the community string is never forwarded |
| `VMWARE_SNMP_QUEUE_SIZE` / `--queue-size` | `10000` | In-memory FIFO queue capacity; traps are delivered one at a time in order and retried for up to 10 minutes on network or 5xx errors |
| `VMWARE_SNMP_TIMEOUT` / `--timeout` | `10s` | Per-request HTTPS timeout |
| `VMWARE_SNMP_LOG_FILE` / `--log-file` | Standard output | JSON log file path (recommended when running as a Windows service) |
| `--env-file` | Empty | Path to a `KEY=VALUE` configuration file |
| `--send-test` | `false` | Send one vCenter diagnostic SNMPv1 trap to `--listen` and exit |

`flashduty-vmware-snmp` accepts SNMPv1 and SNMPv2c traps and does not support SNMPv3. Allow inbound `UDP 162` on the host firewall.

**2. Configure SNMP receivers in vCenter Server**

**Where**: vSphere Client › select the top-level **vCenter Server** instance › **Configure** › **Settings → General** › **Edit** › **SNMP receivers**

| Field | Value |
| :- | :- |
| Primary Receiver URL | IP address or hostname of the `flashduty-vmware-snmp` host |
| Enable receiver | Selected |
| Receiver port | `162` (or the port configured in `VMWARE_SNMP_LISTEN`) |
| Community string | Same value as `VMWARE_SNMP_COMMUNITY`, for example `vc-trap` |

Select **Save**.

> [!WARNING]
>
> Configure alarm destinations under **SNMP receivers** in the vSphere Client rather than running `snmp.set` alone in the VCSA Appliance Shell. VCSA runs two separate SNMP agents: `vpxd` sends alarm traps as SNMPv1 to the vSphere Client receivers, whereas the Appliance Shell configures the OS-level agent, which does not forward vCenter alarm traps by default.

**3. Enable Send SNMP traps and reset rules on vCenter alarms**

**Where**: vSphere Client › select an inventory object (such as vCenter Server) › **Configure** › **More → Alarm Definitions** › create or edit an alarm

1. Turn on **Send SNMP traps** in the alarm trigger rules
2. Enable both trigger transitions and recovery transitions (for example **Normal → Warning**, **Warning → Critical**, **Warning → Normal**, and **Critical → Normal**)
3. If the alarm has **Reset rules** (stateful event alarms), turn on **Send SNMP traps** in the reset rules as well; otherwise vCenter sends no recovery trap when the alarm returns to green

vCenter enforces a default 5-minute action throttling window per alarm, so rapid repeated transitions within 5 minutes may be suppressed.

**4. Verify connectivity and the alert lifecycle**

Run the built-in test command on the forwarder host to send a vCenter diagnostic trap to the local listener and verify end-to-end delivery:

> [tab] Linux
>
> ```bash theme={null}
> sudo /usr/local/bin/flashduty-vmware-snmp --env-file /etc/flashduty/vmware-snmp.env --send-test
> ```

> [tab] Windows
>
> ```powershell theme={null}
> & "C:\Program Files\Flashduty\flashduty-vmware-snmp.exe" --env-file "C:\ProgramData\Flashduty\vmware-snmp.env" --send-test
> ```

Flashduty opens an Info alert titled `VMware vCenter SNMP test notification` (vCenter also sends this `vpxdDiagnostic` trap on service startup); close it manually after confirming delivery. Next, make a real vCenter alarm trigger and return to normal, confirm that the same Flashduty alert updates and recovers, and check that the integration shows **Latest event time**.

## Alert Key and recovery

Flashduty parses `vpxdAlarmInfo` (`.1.3.6.1.4.1.6876.4.3.0.203`) from `VMWARE-VC-EVENT-MIB`. Obsolete vCenter 4.x `vpxdAlarm` (`.201`) traps and unrelated SNMP traps are ignored.

Because `vpxdAlarmInfo` carries neither an alarm definition ID nor a vSphere MoRef, Flashduty derives the Alert Key from four fields:

* The vCenter UDP source IP observed by the forwarder (`source`)
* Target object type (`vmwVpxdTargetObjType`: `host`, `vm`, `other`, or `unknown`)
* Target object name (`vmwVpxdTargetObj`)
* Alarm name (the prefix before the first `" - "` on the first line of `vmwVpxdObjValue`: built-in alarms send their system name such as `alarm.VmCPUUsageAlarm`, and custom alarms send their display name)

Changes to metric values, event timestamps, `vmwVpxdOldStatus`, or `vmwVpxdNewStatus` do not change the Alert Key. Keep these protocol limits in mind:

* **Renamed inventory objects**: if a VM or host is renamed while an alarm is active, the recovery trap carries the new object name, so close the earlier alert manually
* **Same name across datacenters**: two objects of the same type and name under one vCenter share an Alert Key when they trigger the same alarm
* **Stateless alarms (one-shot)**: preconfigured stateless alarms (such as **Host connection failure** and **Health status changed**) send `Unset` status and never emit a recovery trap; each occurrence opens a separate alert, which you can close manually or expire with the channel [auto-resolve timeout](https://docs.flashduty.com/en/on-call/channel/create-edit.md)
* **vCenter 6.0 and 6.5 built-in host connection alarm**: **Host connection and power state** can emit inconsistent alarm-name prefixes across transitions in some 6.0 and 6.5 environments, preventing automatic recovery

## Status and severity

Recovery is determined from `vmwVpxdNewStatus` (case-insensitive), supporting both legacy color values and newer severity names:

| vCenter `vmwVpxdNewStatus` | Flashduty status or severity |
| :- | :- |
| `Red`, `Critical`, `赤` | Critical (trigger) |
| `Yellow`, `Warning` | Warning (trigger) |
| `Green`, `Normal`, `緑` | Recovered |
| `Gray`, `Grey`, `Unknown` | Info (trigger) |
| `Unset` | Warning (stateless one-shot alert; does not auto-recover) |
| Empty or unrecognized value | Warning (trigger; raw value preserved in the `new_status` label) |

Each alert includes these labels:

| Label | Source |
| :- | :- |
| `check` | Alarm name extracted from `vmwVpxdObjValue` |
| `resource` | `vmwVpxdTargetObj` (host name, VM name, or `Datacenters`) |
| `vcenter` | Source IP address of the vCenter sender |
| `target_type` | `host`, `vm`, `other`, or `unknown` |
| `old_status`, `new_status` | Raw `vmwVpxdOldStatus` and `vmwVpxdNewStatus` values |
| `snmp_version` | `1` or `2c` |

## Troubleshooting

* **No traps arrive**: on Linux check `sudo journalctl -u flashduty-vmware-snmp -f`; on Windows inspect `C:\ProgramData\Flashduty\vmware-snmp.log` and confirm `Get-Service FlashdutyVMwareSNMP` is `Running` (and that the built-in Windows `SNMPTRAP` service is not holding `UDP 162`). Verify `UDP 162` is open on the host firewall and that the receiver and community string are enabled under **SNMP receivers** in the vSphere Client (not only in the Appliance Shell)
* **Logs show `rejected` with status 400**: verify that `VMWARE_SNMP_PUSH_URL` is the complete **VMware vCenter** push URL including `integration_key`
* **Alerts do not recover**: confirm that recovery transitions are enabled on the alarm action, that **Send SNMP traps** is also enabled under **Reset rules** for stateful event alarms, and that the alarm is not stateless (`new_status=Unset`)
* **Rapid consecutive transitions are missing**: wait out vCenter's default 5-minute alarm action throttling window before retesting

For vendor details, see Broadcom's [Using SNMP Traps with vCenter Server](https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-monitoring-and-performance/snmp-and-vsphere/using-snmp-traps-with-vcenter-server.html).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.