code: def state_summary(value, name, state_list, helper, ok_value = 'ok', info = None):
      
      # translate the value (integer) we receive to a human readable value (e.g. ok, critical etc.) with the given state_list
      state_value = state_list[int(value)]    
      summary_output = ''
      long_output = ''
      if not info:
          info = ''
      if state_value != ok_value:
          summary_output += ('%s status: %s %s ' % (name, state_value, info))
          helper.status(pynag.Plugins.critical)
      long_output += ('%s status: %s %s\n' % (name, state_value, info))
      return (summary_output, long_output)
docs: Always add the status to the long output, and if the status is not ok (or ok_value), 
      we show it in the summary and set the status to critical