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

How to use Event Property in Event API?

AntonioSousa
DynaMight Guru
DynaMight Guru

I'm trying to filter events in the Event API, using the eventSelector.

I'm using, according to the documentation:

  • property.myownevent("MyOwn event")

I get the following reply.

 

 

{
  "error": {
    "code": 400,
    "message": "Constraints violated.",
    "constraintViolations": [
      {
        "path": "eventSelector",
        "message": "Parse error: Unknown filter predicate found. Found near 1-based column range [1,35).",
        "parameterLocation": "QUERY",
        "location": null
      }
    ]
  }
}

 

 

Tried other combinations, but didn't work. For reference, what the API says:

AntonioSousa_0-1679962506473.png

Any idea?

Antonio Sousa
6 REPLIES 6

DanielS
DynaMight Guru
DynaMight Guru

Hello @AntonioSousa. Same behaviour here

{
"error": {
"code": 400,
"message": "Constraints violated.",
"constraintViolations": [
{
"path": "eventSelector",
"message": "Parse error: Unknown filter predicate found. Found near 1-based column range [45,75).",
"parameterLocation": "QUERY",
"location": null
}
]
}
}

Dynatrace Certified Professional @ www.dosbyte.com

adam_gardner
Dynatrace Champion
Dynatrace Champion

I have a ticket open for this. I will report back when I know more.

Following this topic

tibebe_m_digafe
Advisor

Looks like only accepts "event properties", no other properties (e.g. entity properties).

This did work for me:

property.dt.event.group_label(Created)

 

adam_gardner
Dynatrace Champion
Dynatrace Champion

I have word back from the dev team. The following fields are (currently) searchable: description, source, title, allow_davis_merge, is_rootcause_relevant, release_version, group_label.

They now have a backlog item to:

- Improve the docs for this

- Investigate what (if any) additional fields can be "made searchable"

I will continue to provide feedback here whenever I hear anything.

axel_tapia
Observer

Do anyone know if this will be improved? I want a partial match for the event title and I don't know if is possible a contains or startsWith matcher in the event selector, right now only literal match is allowed...

I am trying to filter all events for Total available space for any D drive regardless its threshold.

The propety is searchable:

property.dt.event.description(The total available space on disk D:\ is lower than 3 %)

However if I add some contain, contains or startsWith it is not a valid filter

/api/v2/events?eventSelector=property.dt.event.description.startsWith%28The%20total%20available%20space%20on%20disk%20D%3A%5C%20is%20lower%20than%203%20%25%29
{  "error": {    "code": 400,    "message": "Constraints violated.",    "constraintViolations": [      {
        "path": "eventSelector",        "message": "Parse error: Unknown filter predicate found. Found near 1-based column range [1,98).",        "parameterLocation": "QUERY",        "location": null
      }
    ]
  }
}

 

Featured Posts