mirror of https://github.com/Icinga/icinga2.git
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:
commit
6f726af659
|
@ -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
|
&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)
|
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
|
&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>
|
### 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' \
|
$ curl -k -s -u root:icinga -H 'Accept: application/json' \
|
||||||
-X POST 'https://localhost:5665/v1/events' \
|
-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":1445421319.7226390839,"type":"CheckResult"}
|
||||||
{"check_result":{ ... },"host":"example.localdomain","service":"ping4","timestamp":1445421324.7226390839,"type":"CheckResult"}
|
{"check_result":{ ... },"host":"example.localdomain","service":"ping4","timestamp":1445421324.7226390839,"type":"CheckResult"}
|
||||||
|
|
Loading…
Reference in New Issue