4.39 VmUptime

Use the VirtualCenter_VmUptime Knowledge Script to monitor virtual machine uptime in days. Virtual machine uptime is the time elapsed since the last system startup. This script raises an event when a virtual machine is rebooted, and it collects data for virtual machine uptime.

NOTE:

  • If the parent host of the monitored virtual machine is in maintenance mode, this Knowledge Script will not generate events.

  • The VirtualCenter_VmUptime Knowledge Script is supported on vSphere 5.0 or later.

4.39.1 Resource Object

vSphere virtual machine

4.39.2 Default Schedule

By default, this script runs every 5 minutes.

4.39.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Job Failure Notification

Raise event when uptime metrics are not available?

Select Yes to raise an event if virtual machine uptime metrics are not available. The default is unselected.

Event severity when uptime metrics are not available

Set the event severity level, from 1 to 40, to indicate the importance of an event in which uptime metrics are not available. The default is 15.

Event severity when AppManager failed to get metrics

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to retrieve virtual machine uptime status from vCenter. The default is 15.

Event severity when AppManager failed to log in

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to log in to vCenter. The default is 5.

Event severity when VmUptime job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the VmUptime job fails unexpectedly. The default is 5.

Additional Settings

Event Details

Event detail format

Select either HTML Table or Plain Text as the format for event detail. The default is HTML Table.

Monitor Uptime

Event Notification

Raise event if virtual machine reboots?

Select Yes to raise an event if the virtual machine reboots. The default is Yes.

Event severity when virtual machine reboots

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the virtual machine reboots. The default is 15.

Data Collection

Collect data for uptime?

Select Yes to collect data for graphs and reports. When enabled, data collection returns a datastream for the virtual machine uptime in days. The default is unselected.