@ -63,7 +63,7 @@ options:
esc_period :
esc_period :
description :
description :
- Default operation step duration . Must be greater than 60 seconds . Accepts seconds , time unit with suffix and user macro .
- Default operation step duration . Must be greater than 60 seconds . Accepts seconds , time unit with suffix and user macro .
default: ' 60 '
required: true
conditions :
conditions :
type : list
type : list
description :
description :
@ -127,6 +127,7 @@ options:
description :
description :
- Condition operator .
- Condition operator .
- When I ( type ) is set to C ( time_period ) , the choices are C ( in ) , C ( not in ) .
- When I ( type ) is set to C ( time_period ) , the choices are C ( in ) , C ( not in ) .
- C ( matches ) , C ( does not match ) , C ( Yes ) and C ( No ) condition operators work only with > = Zabbix 4.0
choices :
choices :
- ' = '
- ' = '
- ' <> '
- ' <> '
@ -136,6 +137,10 @@ options:
- ' >= '
- ' >= '
- ' <= '
- ' <= '
- ' not in '
- ' not in '
- ' matches '
- ' does not match '
- ' Yes '
- ' No '
formulaid :
formulaid :
description :
description :
- Arbitrary unique ID that is used to reference the condition from a custom expression .
- Arbitrary unique ID that is used to reference the condition from a custom expression .
@ -1187,8 +1192,6 @@ class RecoveryOperations(Operations):
Returns :
Returns :
list : constructed recovery operations data
list : constructed recovery operations data
"""
"""
if operations is None :
return None
constructed_data = [ ]
constructed_data = [ ]
for op in operations :
for op in operations :
operation_type = self . _construct_operationtype ( op )
operation_type = self . _construct_operationtype ( op )
@ -1254,8 +1257,6 @@ class AcknowledgeOperations(Operations):
Returns :
Returns :
list : constructed acknowledge operations data
list : constructed acknowledge operations data
"""
"""
if operations is None :
return None
constructed_data = [ ]
constructed_data = [ ]
for op in operations :
for op in operations :
operation_type = self . _construct_operationtype ( op )
operation_type = self . _construct_operationtype ( op )
@ -1397,7 +1398,11 @@ class Filter(object):
" in " ,
" in " ,
" >= " ,
" >= " ,
" <= " ,
" <= " ,
" not in " ] , _condition [ ' operator ' ]
" not in " ,
" matches " ,
" does not match " ,
" Yes " ,
" No " ] , _condition [ ' operator ' ]
)
)
except Exception as e :
except Exception as e :
self . _module . fail_json ( msg = " Unsupported value ' %s ' for operator. " % _condition [ ' operator ' ] )
self . _module . fail_json ( msg = " Unsupported value ' %s ' for operator. " % _condition [ ' operator ' ] )
@ -1663,7 +1668,7 @@ def main():
http_login_user = dict ( type = ' str ' , required = False , default = None ) ,
http_login_user = dict ( type = ' str ' , required = False , default = None ) ,
http_login_password = dict ( type = ' str ' , required = False , default = None , no_log = True ) ,
http_login_password = dict ( type = ' str ' , required = False , default = None , no_log = True ) ,
validate_certs = dict ( type = ' bool ' , required = False , default = True ) ,
validate_certs = dict ( type = ' bool ' , required = False , default = True ) ,
esc_period = dict ( type = ' int ' , required = False, default = 60 ) ,
esc_period = dict ( type = ' int ' , required = True ) ,
timeout = dict ( type = ' int ' , default = 10 ) ,
timeout = dict ( type = ' int ' , default = 10 ) ,
name = dict ( type = ' str ' , required = True ) ,
name = dict ( type = ' str ' , required = True ) ,
event_source = dict ( type = ' str ' , required = True , choices = [ ' trigger ' , ' discovery ' , ' auto_registration ' , ' internal ' ] ) ,
event_source = dict ( type = ' str ' , required = True , choices = [ ' trigger ' , ' discovery ' , ' auto_registration ' , ' internal ' ] ) ,
@ -1679,6 +1684,7 @@ def main():
conditions = dict (
conditions = dict (
type = ' list ' ,
type = ' list ' ,
required = False ,
required = False ,
default = [ ] ,
elements = ' dict ' ,
elements = ' dict ' ,
options = dict (
options = dict (
formulaid = dict ( type = ' str ' , required = False ) ,
formulaid = dict ( type = ' str ' , required = False ) ,
@ -1693,6 +1699,7 @@ def main():
operations = dict (
operations = dict (
type = ' list ' ,
type = ' list ' ,
required = False ,
required = False ,
default = [ ] ,
elements = ' dict ' ,
elements = ' dict ' ,
options = dict (
options = dict (
type = dict (
type = dict (