code: func (p *Plugin) getAgentStatus() ExposedStatus {
  
  	exposedStatus := ExposedStatus{
  		AgentStatus:     p.StatusCheck.GetAgentStatus(),
  		PluginStatus:    p.StatusCheck.GetAllPluginStatus(),
  		NonFatalPlugins: p.NonFatalPlugins,
  	}
  
  	// check whether error is caused by one of the plugins in NonFatalPlugin list
  	if exposedStatus.AgentStatus.State == status.OperationalState_ERROR && len(p.NonFatalPlugins) > 0 {
  		for k, v := range exposedStatus.PluginStatus {
  			if v.State == status.OperationalState_ERROR {
  				if isInSlice(p.NonFatalPlugins, k) {
  					// treat error reported by this plugin as non fatal
  					exposedStatus.AgentStatus.State = status.OperationalState_OK
  				} else {
  					exposedStatus.AgentStatus.State = status.OperationalState_ERROR
  					break
  				}
  			}
  
  		}
  	}
  
  	return exposedStatus
  }
docs: // getAgentStatus return overall agent status + status of the plugins
  // the method takes into account non-fatal plugin settings