add jq pipe to get ticket

This commit is contained in:
2025-02-02 20:45:07 +01:00
parent 127f0bd84f
commit 558f5bea02

View File

@@ -33,7 +33,7 @@ Set ICINGA2_API_USER_SATELLITE_PASS to get a API user for ticket generation (onl
Then you can use this:
```
curl -k -s -u pki-ticket:$ICINGA2_API_USER_SATELLITE_PASS -H 'Accept: application/json' \
-X POST 'https://ip-of-icinga2:5665/v1/actions/generate-ticket' -d '{ "cn": "satellite.example.com" }'
-X POST 'https://ip-of-icinga2:5665/v1/actions/generate-ticket' -d '{ "cn": "satellite.example.com" }' | jq '.results[0].ticket'
```
see: [CSR Auto-Signing: On the master](https://icinga.com/docs/icinga-2/latest/doc/06-distributed-monitoring/#csr-auto-signing-on-the-master)