command_type changes when updating command via API
Posted: Mon Nov 16, 2020 2:53 am
Hi,
I'm using a custom script for a service event handler. The command defined in Nagios XI is set as a Misc command in order to be able to assign it as a script in the event handler section of the service. This is all working fine.
However, when this command is updated via the API the command_type is being automatically re-assigned as a check command.
When viewing the event handler section of the check via the GUI the script no longer appears, yet under the hood the check is still using the same script for events. Manually changing the command type back to Misc, all is well again in the GUI (obviously because of the NagiosQL filtering as stated in the documentation).
I'm using Nagios XI 5.7.3 and the API doesn't have any option to define command_type when creating or changing any commands.
It would be nice to include command_type in the API, or at the very least stop command_type being change.
I'm using a custom script for a service event handler. The command defined in Nagios XI is set as a Misc command in order to be able to assign it as a script in the event handler section of the service. This is all working fine.
However, when this command is updated via the API the command_type is being automatically re-assigned as a check command.
When viewing the event handler section of the check via the GUI the script no longer appears, yet under the hood the check is still using the same script for events. Manually changing the command type back to Misc, all is well again in the GUI (obviously because of the NagiosQL filtering as stated in the documentation).
I'm using Nagios XI 5.7.3 and the API doesn't have any option to define command_type when creating or changing any commands.
It would be nice to include command_type in the API, or at the very least stop command_type being change.