cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to conditionnaly print variables in an Event template?

LaurentBignens
Participant

Hi,


This is an example of the "Event template" section in my Metric Event :
###################
JobName: {dims:dt.entity.python:com_dynatrace_extension_veritas_netbackup_job.name} ended with JobStatus:{dims:status}
#==============================================================
The {metricname} value {severity} is {alert_condition} the expected threshold {threshold}.
JobStartTime: {dims:starttime} ; JobEndTime: {dims:endtime}
JobID: {dims:jobid}
JobSubType: {dims:jobsubtype}
PolicyName: {dims:dt.entity.python:com_dynatrace_extension_veritas_netbackup_policy.name}
PolicyType: {dims:policytype}
NetBackup Server: {dims:dt.entity.python:com_dynatrace_extension_veritas_netbackup.name}
###################

Depending on the jobs failing, the variables populated with data vary.
So sometimes
"JobSubType: {dims:jobsubtype}"   
will be expanded in the output to something like
"JobSubType: USERBACKUP", when the variable is populated, and
"JobSubType: {dims:jobsubtype}", when the variable is NOT populated.


I would like to only display output if a variable like {dims:jobsubtype} exists or is not empty.
Is this possible?

0 REPLIES 0

Featured Posts