I’m trying to write an ansible playbook that configures our alerts in graylog.
The design I’m trying to implement is like this:
- Each event definition is a seperate file with the json body
- For each file, GET /api/events/definitions searching the “title”
3a. If a definition is found in (2) then call PUT to update the current definition
3b. If no definition is found in (2) then call POST to create the definition
The problem I’m having is with (2). I’ve been trying to use the query parameter, searching for the “title” of the definition but I can’t get exact searching to work.
As you can see in the screenshot, I’m trying to search for exactly title: “[Sandbox] Registry errors 2” but the API finds a definition with title: “[Sandbox] Registry errors”
Is there a syntax to find a definition with exactly some title?