zertotag

Description

This command verifies that eligible virtual machines have a tag in a vCenter category named Zerto - Protection Automation. The hyphen may also be an en dash (U+2013) to support the category name used by Zerto DRaaS protection automation.

The command reports CRITICAL for every eligible VM without a tag in that category. It also reports CRITICAL when the required category does not exist. Tagging API, authentication, permission, and connection failures are reported as UNKNOWN.

The vCenter account needs permission to list tagging categories, tags, and tag associations.

The command exports the following performance data:

labeldescription
discovered_vmsVMs discovered in the selected vCenter or --vihost scope.
vmsEligible VMs evaluated for tag compliance.
tagged_vmsEligible VMs with a matching tag.
missing_vmsEligible VMs without a matching tag.
offline_vmsPowered-off non-template VMs excluded by default.
ignored_vmsVMs excluded by --include or --exclude.
template_vmsTemplates excluded from the check.
rest_api_callsvCenter REST requests, including authentication.

Options

Besides the general options, this command supports the following options:

optionsdescription
--vihost VIHOSTOnly check VMs on this ESXi host. If omitted, check all known VMs.
--include REGEXOnly check VMs whose names match this regular expression. May be provided more than once.
--exclude REGEXDo not check VMs whose names match this regular expression. May be provided more than once.
--include-powered-offInclude powered-off VMs. Powered-off VMs are excluded by default.

Templates are always excluded. The selected --port and SSL verification settings are used for both the SOAP inventory query and vCenter tagging API.

Examples

check_vsphere zertotag -nossl \
  -s vcenter.example.com \
  -u naemon@vsphere.local \
  --include-powered-off