25 May 2022 01:16 AM
Hi,
I have created a func: metric with attributes but I am unable to see in the "Category" and "Metric" dropdown tables when creating a custom event for alerting
I can choose the primary entity for the alert
I can use it in the "code" section but am unable to use the attributes of the func:<> metric in the alert body, only some generic attributes are provided.
I would expect the attributes of the metric or entity to be available to use in the message - why is this not working?
Solved! Go to Solution.
15 Jun 2022 06:39 AM - edited 15 Jun 2022 11:04 AM
Hi @jun_phoon
The placeholders that you can use are in the body message are predefined and you cannot add your own ones.
The development team are continually working to add more based on the users needs, but you cannot add by your self.
Just for a recall, here is list containing the available placeholders:
{ImpactedEntities}: Details about the entities impacted by the problem in form of a json array.
{ImpactedEntity}: A short description of the problem and impacted entity (or multiple impacted entities).
{ImpactedEntityNames}: The entity impacted by the problem (or multiple impacted entities).
{PID}: Unique system identifier of the reported problem.
{ProblemDetailsHTML}: All problem event details including root cause as an HTML-formatted string.
{ProblemDetailsJSONv2}: Problem as json object following the structure from the Dynatrace Problems V2 API. The optional fields evidenceDetails and impactAnalysis are included, but recentComments is not.
{ProblemDetailsJSON}: Problem as json object following the structure from the Dynatrace Problems V1 API.
{ProblemDetailsMarkdown}: All problem event details including root cause as a Markdown-formatted string.
{ProblemDetailsText}: All problem event details including root cause as a text-formatted string.
{ProblemID}: Display number of the reported problem.
{ProblemImpact}: Impact level of the problem. Possible values are APPLICATION, SERVICE, or INFRASTRUCTURE.
{ProblemSeverity}: Severity level of the problem. Possible values are AVAILABILITY, ERROR, PERFORMANCE, RESOURCE_CONTENTION, or CUSTOM_ALERT.
{ProblemTitle}: Short description of the problem.
{ProblemURL}: URL of the problem within Dynatrace.
{State}: Problem state. Possible values are OPEN or RESOLVED.
{Tags}: Comma separated list of tags that are defined for all impacted entities. To refer to the value of a specific tag, specify the tag's key in square brackets: {Tags[key]}. If the tag does not have any assigned value, the placeholder will be replaced by an empty string. The placeholder will not be replaced if the tag key does not exist.
15 Jun 2022 11:04 PM
HI Malaik,
Thanks for the reply
That is not the section im referring to.
You are referring to the placeholders available in the body when you setup PROBLEM
INTEGRATION
Im referring to placeholders when setting up a CUSTOM ALERT FOR ALERTING.
As a minimum all metrics that can ben seen in the metrics explorer ought to have their attributes available for place holders when contstructing an Alert.
16 Jun 2022 09:20 AM
Hi
You Mean custom EVENT for alerting.
But eh placeholders are the same.
17 Jun 2022 12:38 AM
Hi @Malaik
Oh yep, thanks for correcting my syntax - that's what i meant CUSTOM EVENTS FOR ALERTING.
The placeholders for setting up a PROBLEM NOTIFICATION are not the same in my experience of setting up a CUSTOM EVENTS FOR ALERTING
For a typical host metric
You can use the dimensions of the metrics in the message body
My original query is
why can't the dimension in a func:metric be used as a placeholder in the message body for a CUSTOM EVENTS FOR ALERTING? Can it be?
17 Jun 2022 06:41 AM
placeholders are limited . Check this RFE added few additional place holder (device : {dims:device} host ID: {dims:dt.entity.host} host name: {dims:host.name} dimensions: {dims}). You can raise RFE for your requirement too.
21 Jun 2022 01:23 PM
@jun_phoon did this RFE mentioned above helped?
23 Jun 2022 12:27 AM
Hi,
Regarding that RFE link about being able to use dimensions as placeholders - Yes that's relevant to this thread.
To put it simply -currently:
I saw the below in this roadmap post