Merge pull request #8081 from Icinga/bugfix/doc-adjust-event-stream-syntax-error

Adjust Event-S-R API query syntax error
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-10-29 16:45:55 +01:00 committed by GitHub
commit 6f726af659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1726,7 +1726,7 @@ Example for the `CheckResult` type with the `exit_code` set to `2`:
```
&types=CheckResult&filter=event.check_result.exit_status==2
-d '{ "types": "CheckResult", "filter": "event.check_result.exit_status==2" }'
-d '{ "types": [ "CheckResult" ], "filter": "event.check_result.exit_status==2" }'
```
Example for the `CheckResult` type with the service [matching](18-library-reference.md#global-functions-match)
@ -1735,7 +1735,7 @@ the string pattern "random\*":
```
&types=CheckResult&filter=match%28%22random*%22,event.service%29
-d { "types": "CheckResult", "filter": "match(\"random*\", event.service)" }
-d { "types": [ "CheckResult" ], "filter": "match(\"random*\", event.service)" }
```
### Event Stream Response <a id="icinga2-api-event-streams-response"></a>
@ -1748,7 +1748,7 @@ Example:
```
$ curl -k -s -u root:icinga -H 'Accept: application/json' \
-X POST 'https://localhost:5665/v1/events' \
-d '{ "queue": "myqueue", "types": "CheckResult", "filter": "event.check_result.exit_status==2" }'
-d '{ "queue": "myqueue", "types": [ "CheckResult" ], "filter": "event.check_result.exit_status==2" }'
{"check_result":{ ... },"host":"example.localdomain","service":"ping4","timestamp":1445421319.7226390839,"type":"CheckResult"}
{"check_result":{ ... },"host":"example.localdomain","service":"ping4","timestamp":1445421324.7226390839,"type":"CheckResult"}