How can we help?

How do I use variables in alert descriptions?

Follow

When you create alerts, or modify preconfigured alerts, you can include a variable in the alert description. The variable provides more detail about the device or interface that triggered the alert.

Variables must relate to the alert condition

Any variables you set must relate to the alert condition. The variables available for each alert condition are shown in the tables below.

Example

You create an alert with a trigger condition of Device Online Status. Looking at the table below, you can see the variables you can add to the alert description include device make, device model, and device serial number.

Your alert description with variables included looks like this:

A device has recently gone $deviceOnlineStatusString. Device details are: Make $deviceMake, model $deviceModel, and serial number $deviceSerialNumber.

When the alert triggers, you’ll see this message:

A device has recently gone offline. Device details are: Make Cisco, model 2801, and serial number FTX1113W12Y.

If you set a variable that doesn’t relate to the alert condition, it will not return any information.

Example

You create an alert with a trigger condition of Interface Utilization. In the alert description, you include a variable about interface utilization. But you also include a variable about interface packet error count.

Your alert description looks like this:

This interface is at $interfaceUtilization%.0% utilization and the interface packet error counts are $interfaceErrorCount.

Because the packet error count variable doesn’t relate to the interface utilization condition, the result for that variable is null. When the alert triggers, you’ll see this message:

This interface is at 50% utilization and the interface packet error counts are .

Variables must be entered exactly as shown

When you add a variable to an alert description, you must enter it exactly as shown below. If you enter the variable without the dollar sign, for example, you’ll receive the plain text  of the variable (e.g., deviceOnlineStatusString) rather than the appropriate value (e.g., online) in your alert message.

Percentage-based variables

Percentage-based variables default to a zero decimal place value. You can change the zero decimal place value to two decimal places by changing %.0% to %.2%. Excluding %.0% altogether results in a value with no rounding (e.g., 29.833333333333332).

Date/time-based variables

Date/time-based variables default to the following format: Thu Feb 12 21:37:15 UTC 2015. But you can define the date/time format differently if you prefer. These are the formats that can be used:

  • Date (mm/dd/yy) - %tm/%td/%ty
  • Date (YY-MM-DD) - %tY-%tm-%td
  • 24-hour clock (hh:mm) - %tH:%tM
  • 24-hour clock (hh:mm:ss) - %tH:%tM:%tS
  • 12-hour clock (hh:mm am/pm) - %tI:%tM %Tp
  • 12-hour clock (hh:mm:ss am/pm) - %tI:%tM:%tS %Tp

Enter date/time variables as shown in this example:

The last snapshot taken was on $lastSnapshot%tI:$lastSnapshot%tM:$lastSnapshot%tS $lastSnapshot%Tp at $lastSnapshot%tm/$lastSnapshot%td/$lastSnapshot%ty

Device alert conditions

Condition name

Variable value(s)

Age of the Last Snapshot (Day)

$lastSnapshotAgeInDays day(s)

$vmName

$lastSnapshot

$snapshotSize GB

Auvik Collector Approval Status

$collectorApprovalStatusString

Auvik collector offline duration

$virtualApplianceOfflineDuration minute(s)

Auvik collector online status

$collectorConnectionStatusString

CPU Utilization

$cpuUtilization%.0%

Device Online Status

$deviceOnlineStatusString

$deviceMake

$deviceModel

$deviceSerialNumber

Device Storage Utilization

$diskUsagePercent%.0%

Memory Utilization

$memoryUtilization%.0%

Number of Snapshots for this Virtual Machine

$snapshotCount

$vmName

Printer - Input Tray Missing

$inputTrayMissing

$deviceMake

$deviceModel

$deviceSerialNumber

Printer - Low Paper

$lowPaper

$deviceMake

$deviceModel

$deviceSerialNumber

Printer - Out of Paper

$outOfPaper

$deviceMake

$deviceModel

$deviceSerialNumber

Printer - Output Tray Missing

$outputTrayMissing

$deviceMake

$deviceModel

$deviceSerialNumber

Printer - Paper Jammed

$jammed

$deviceMake

$deviceModel

$deviceSerialNumber

Printer - Supply Level (%)

$currentInkPercentage%.0%

$inkName

$deviceMake

$deviceModel

$deviceSerialNumber

Size of All Snapshots

$snapshotSize GB

$vmName

Stack Switch Member Status

$stackMemberStatusString

Stack Switch Port Status

$stackPortStatusString

UPS - Current Failure Reason

$upsOutputStatusFailReasonString

UPS - Input/Output Status

$upsOutputStatusString

$upsOutputStatusFailReasonString

UPS - Percent Charged

$upsPercentCharged%.0%

UPS - Replace Battery

$upsBatteryReplaceIndicator

Interface alert conditions

Condition name

Variable value(s)

Interface Admin Status

$interfaceAdminStatus

Interface Online Status

$interfaceOnlineStatusString

Interface Packet Discard Count

$interfaceDiscardCount

$ifName

$deviceName

Interface Packet Error Count

$interfaceErrorCount

$ifName

$deviceName

Interface Utilization

$interfaceUtilization%.0%

Rx Broadcast Packet Count

$rxBroadcastPackets

Rx Broadcast Packet Percentage

$rxBroadcastPacketPercentage%.0%

Rx Interface Usage

$rxInterfaceUsage%.0%

Rx Multicast Packet Count

$rxMulticastPackets

Rx Multicast Packet Percentage

$rxMulticastPacketPercentage%.0%

Rx Total Packet Count

$rxTotalPackets

Rx Unicast Packet Count

$rxUnicastPackets

Rx Unicast Packet Percentage

$rxUnicastPacketPercentage%.0%

Total Broadcast Packet Percentage

$txBroadcastPacketPercentage%.0%

Total Interface Usage

$interfaceUsage%.0%

Total Multicast Packet Percentage

$totalMutlicastPacketPercentage%.0%

Total Packet Count

$totalPackets

Total Unicast Packet Percentage

$totalUnicastPacketPercentage%.0%

Tx Broadcast Packet Count

$txBroadcastPackets

Tx Broadcast Packet Percentage

$txBroadcastPacketPercentage%.0%

Tx Interface Usage

$interfaceUsage%.0%

Tx Multicast Packet Count

$txMulticastPackets

Tx Multicast Packet Percentage

$txMulticastPacketPercentage%.0%

Tx Total Packet Count

$txTotalPackets

Tx Unicast Packet Count

$txUnicastPackets

Tx Unicast Packet Percentage

$totalBroadcastPacketPercentage%.0%

Service alert conditions

Condition name

Variable value(s)

Service Status

$serviceStatus

$subDomain

Service Status Code

$serviceStatusCode

Service Type

$serviceType

$subDomain

 

Coming soon: OID monitor setting alerts.

Have more questions? Submit a request

Comments

Powered by Zendesk