diff --git a/templates/cisco_ios_show_environment_temperature.template b/templates/cisco_ios_show_environment_temperature.template new file mode 100644 index 0000000000..75ecfd7f91 --- /dev/null +++ b/templates/cisco_ios_show_environment_temperature.template @@ -0,0 +1,32 @@ +Value SWITCH (\d+) +Value SWITCH_TEMPERATURE (\w+) +Value INLET_TEMPERATURE_VALUE (\d+) +Value INLET_TEMPERATURE_STATE (\S+) +Value INLET_YELLOW_THRESHOLD (\d+) +Value INLET_RED_THRESHOLD (\d+) +Value HOTSPOT_TEMPERATURE_VALUE (\d+) +Value HOTSPOT_TEMPERATURE_STATE (\S+) +Value HOTSPOT_YELLOW_THRESHOLD (\d+) +Value HOTSPOT_RED_THRESHOLD (\d+) + +Start + ^Switch\s+\d -> Continue.Record + ^Switch\s+${SWITCH}:\s+SYSTEM\s+TEMPERATURE\s+is\s+${SWITCH_TEMPERATURE}\s*$$ -> Inlet + ^\s*$$ + ^. -> Error + +Inlet + ^Inlet\s+Temperature\s+Value:\s+${INLET_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$ + ^Temperature\s+State:\s+${INLET_TEMPERATURE_STATE}\s*$$ + ^Yellow\s+Threshold\s+:\s+${INLET_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$ + ^Red\s+Threshold\s+:\s+${INLET_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Hotspot + ^\s*$$ + ^. -> Error + +Hotspot + ^Hotspot\s+Temperature\s+Value:\s+${HOTSPOT_TEMPERATURE_VALUE}\s+Degree\s+Celsius\s*$$ + ^Temperature\s+State:\s+${HOTSPOT_TEMPERATURE_STATE}\s*$$ + ^Yellow\s+Threshold\s+:\s+${HOTSPOT_YELLOW_THRESHOLD}\s+Degree\s+Celsius\s*$$ + ^Red\s+Threshold\s+:\s+${HOTSPOT_RED_THRESHOLD}\s+Degree\s+Celsius\s*$$ -> Start + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index fe7be26c5e..9727225cfe 100644 --- a/templates/index +++ b/templates/index @@ -134,6 +134,7 @@ cisco_ios_show_running-config_partition_access-list.template, .*, cisco_ios, sh[ cisco_ios_show_running-config_partition_route-map.template, .*, cisco_ios, sh[[ow]] ru[[nning-config]] p[[artition]] route-[[map]] cisco_ios_show_capability_feature_routing.template, .*, cisco_ios, sh[[ow]] cap[[ability]] f[[eature]] r[[outing]] cisco_ios_show_authentication_sessions.template, .*, cisco_ios, show authen[[tication]] ses[[sions]] +cisco_ios_show_environment_temperature.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] t[[emperature]] cisco_ios_show_ip_ospf_interface_brief.template, .*, cisco_ios, sh[[ow]] ip ospf int[[erface]] cisco_ios_show_processes_memory_sorted.template, .*, cisco_ios, sh[[ow]] pro[[cesses]] mem[[ory]] so[[rted]] cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] des[[cription]] diff --git a/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.parsed b/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.parsed new file mode 100644 index 0000000000..4e3185bae3 --- /dev/null +++ b/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.parsed @@ -0,0 +1,22 @@ +--- +parsed_sample: +- hotspot_red_threshold: '125' + hotspot_temperature_state: GREEN + hotspot_temperature_value: '67' + hotspot_yellow_threshold: '105' + inlet_red_threshold: '56' + inlet_temperature_state: GREEN + inlet_temperature_value: '29' + inlet_yellow_threshold: '46' + switch: '1' + switch_temperature: OK +- hotspot_red_threshold: '125' + hotspot_temperature_state: GREEN + hotspot_temperature_value: '69' + hotspot_yellow_threshold: '105' + inlet_red_threshold: '56' + inlet_temperature_state: GREEN + inlet_temperature_value: '28' + inlet_yellow_threshold: '46' + switch: '2' + switch_temperature: OK diff --git a/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.raw b/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.raw new file mode 100644 index 0000000000..1457dab252 --- /dev/null +++ b/tests/cisco_ios/show_environment_temperature/cisco_ios_show_environment_temperature.raw @@ -0,0 +1,20 @@ +Switch 1: SYSTEM TEMPERATURE is OK +Inlet Temperature Value: 29 Degree Celsius +Temperature State: GREEN +Yellow Threshold : 46 Degree Celsius +Red Threshold : 56 Degree Celsius + +Hotspot Temperature Value: 67 Degree Celsius +Temperature State: GREEN +Yellow Threshold : 105 Degree Celsius +Red Threshold : 125 Degree Celsius +Switch 2: SYSTEM TEMPERATURE is OK +Inlet Temperature Value: 28 Degree Celsius +Temperature State: GREEN +Yellow Threshold : 46 Degree Celsius +Red Threshold : 56 Degree Celsius + +Hotspot Temperature Value: 69 Degree Celsius +Temperature State: GREEN +Yellow Threshold : 105 Degree Celsius +Red Threshold : 125 Degree Celsius \ No newline at end of file