I'm using the API to manage the configuration of our Nagios XI servers (version 5.6.7) and one issue in particular that I can't manage is the 'Command Type' for commands (only Command_Name and Command_Line are available). Whenever a new command is added it's automatically assigned as a 'misc command' which means it cannot be assigned to a service or a host. Well, it can, but it just won't appear until you change the type to 'check command'.
Is there something already within the API that can do this (something I've missed) or can/will it be added to a future release?
Thanks
Restful API - Managing 'Commands'
Re: Restful API - Managing 'Commands'
You haven't missed anything. You are correct. There is no directive to set up the command "type", so it is not possible to do this via the REST API. The "new" command would not show under the "Check command" drop-down menu in the CCM, but under the "Even handler" menu.
Unfortunately, there is no "workaround" at the moment. There may be in the future if we change the way REST API works.
Unfortunately, there is no "workaround" at the moment. There may be in the future if we change the way REST API works.
Be sure to check out our Knowledgebase for helpful articles and solutions!