After switching to IcingaDB, I can no longer add comments via curl using the WebUI.
Before the switch, I was able to add a comment using this command:
/usr/bin/curl -s -X "POST" -H 'Accept: application/json' -H 'Content-Type: application/json' -u 'icinga:icinga' 'https://my-icinga.tld/icingaweb2/monitoring/host/add-comment?host=server01' -d '{ "author": "Sascha", "comment": "TicketID 123456", "pretty": true }'
Under IcingaDB, not much has changed from the URL… At least I recognized only little:
/usr/bin/curl -s -X "POST" -H 'Accept: application/json' -H 'Content-Type: application/json' -u 'icinga:icinga' 'https://my-icinga.tld/icingaweb2/icingadb/host/add-comment?name=server01' -d '{ "author": "Sascha", "comment": "TicketID 123456", "pretty": true }'
With this command I get only in HTML the page for the comment.
What am I doing wrong?
- Icinga DB Web version (System - About): 1.0.2
- Icinga Web 2 version (System - About):2.11.4
- Web browser: Chrome 110.0.5481.100
- Icinga 2 version (
icinga2 --version
): r2.13.7-1 - Icinga DB version (
icingadb --version
): v1.1.0 - PHP version used (
php --version
): 7.4 - Server operating system and version: Debian 10
Regards
Sascha