def check_bluecat_dhcp_one_lease(): assert list( bluecat_dhcp.check_bluecat_dhcp( { "oper_states": { "warning": [], "critical": [], }, }, { "oper_state": 1, "leases": 1, }, )) == [ Result( state=state.OK, summary="DHCP is running normally", ), Result( state=state.OK, summary="1 lease per second", ), Metric( "leases", 1, ), ]
def check_bluecat_dhcp_one_lease(): assert list( bluecat_dhcp.check_bluecat_dhcp( type_defs.Parameters( { "oper_states": { "warning": [], "critical": [], }, }, ), { 'oper_state': 1, 'leases': 1, }, )) == [ Result( state=state.OK, summary="DHCP is running normally", ), Result( state=state.OK, summary="1 lease per second", ), Metric( 'leases', 1, ), ]
def check_bluecat_dhcp_crit(): assert list( bluecat_dhcp.check_bluecat_dhcp( { "oper_states": { "warning": [], "critical": [5], }, }, { "oper_state": 5, "leases": 10, }, )) == [ Result( state=state.CRIT, summary="DHCP is fault", ), Result( state=state.OK, summary="1 lease per second", ), Metric( "leases", 1, ), ]
def check_bluecat_dhcp_crit(): assert list( bluecat_dhcp.check_bluecat_dhcp( type_defs.Parameters( { "oper_states": { "warning": [], "critical": [5], }, }, ), { 'oper_state': 5, 'leases': 10, }, )) == [ Result( state=state.CRIT, summary="DHCP is fault", ), Result( state=state.OK, summary="1 lease per second", ), Metric( 'leases', 1, ), ]