Seeing as not every host that is monitored by an Opsview installation has to have a host check command defined, the check_command property should be handled as optional and only added to the properties hash if it is actually defined (i.e. when a GET request against the host object does not contain "check_command" : null). Doing otherwise results in nasty "undefined method [] for nil:NilClass" errors for host objects that have no host check command.
Seeing as not every host that is monitored by an Opsview installation has to have a host check command defined, the
check_command
property should be handled as optional and only added to the properties hash if it is actually defined (i.e. when a GET request against the host object does not contain"check_command" : null
). Doing otherwise results in nasty "undefined method [] for nil:NilClass
" errors for host objects that have no host check command.