API config host - how to configure hostgroup inheritance
Posted: Fri Mar 21, 2025 8:55 am
I'm using Nagios XI API to configure my hosts. I'm able to do it successfully except for hostgroup inheritance.
The options for choosing hostgroup inheritance for host in the GUI are standard, null or +.
In my code I'm posting hostgroups like this:
It seems that nagios deletes the + all together cause in the GUI option standard is selected?
Thanks for your help.
The options for choosing hostgroup inheritance for host in the GUI are standard, null or +.
In my code I'm posting hostgroups like this:
Code: Select all
$hostgroup="+hostgroup1,hostgroup2"
curl -X POST "$ENDPOINT" -d "hostgroups=$hostgroups"
Thanks for your help.