code: def check_controller(sess):
      
      controller_operational             = get_data(sess, operational_oid, helper)
      controller_availability            = get_data(sess, availability_oid, helper)
      controller_alarm                   = get_data(sess, alarm_oid, helper)
      
      # Add summary
      helper.add_summary("Controller Status")
  
      # Add all states to the long output
      helper.add_long_output("Controller Operational State: %s" % operational_states[int(controller_operational)])
      helper.add_long_output("Controller Availability State: %s" % availability_states[int(controller_availability)])
      helper.add_long_output("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])
  
      # Operational State
      if controller_operational != "1" and controller_operational != "4":
          helper.status(critical)
          helper.add_summary("Controller Operational State: %s" % operational_states[int(controller_operational)])
  
      # Avaiability State
      if controller_availability != "3":
          helper.status(critical)
          helper.add_summary("Controller Availability State: %s" % availability_states[int(controller_availability)])
  
      # Alarm State
      if controller_alarm == "2":
          helper.status(warning)
          helper.add_summary("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])
      if controller_alarm == "3" or controller_alarm == "4":
          helper.status(critical)
          helper.add_summary("Controller Alarm State: %s" % alarm_states[int(controller_alarm)])
docs: check the status of the controller