XI API to Create a service using blank/null values for some
Posted: Fri Sep 25, 2020 2:50 pm
I am trying to use the XI API to create services that rely upon service templates to provide values for items like max check attempts, notification timesframe and other mandatory values in the API for the service definition.
I've tried not listing the items in the REST call and it's rejected for missing items. I've tried providing the None value as part of the python object definition for the paylog which python is properly interpreting to null, but Nagios refuses to apply the service and puts invalid values in the fields. I've tried just doing '' so they are sent over as blank strings. None of the above work.
How can I get Nagios to allow me to submit empty values for the following and use the values that are inherited from the service template via the use parameter which IS properly relating the new service to an existing service template? This is entirely possible via the UI and is working correctly.
'check_interval': None,
'retry_interval': None,
'max_check_attempts': None,
'check_period': None,
'contacts': None,
'notification_interval': None,
'notification_period': None,
I've tried not listing the items in the REST call and it's rejected for missing items. I've tried providing the None value as part of the python object definition for the paylog which python is properly interpreting to null, but Nagios refuses to apply the service and puts invalid values in the fields. I've tried just doing '' so they are sent over as blank strings. None of the above work.
How can I get Nagios to allow me to submit empty values for the following and use the values that are inherited from the service template via the use parameter which IS properly relating the new service to an existing service template? This is entirely possible via the UI and is working correctly.
'check_interval': None,
'retry_interval': None,
'max_check_attempts': None,
'check_period': None,
'contacts': None,
'notification_interval': None,
'notification_period': None,