code: @Override
    public void addAttack(Attack attack) {
      logger.warn("Security attack " + attack.getName() + " triggered by user: " + attack.getUser().getUsername());
  
      Builder builder = Point.measurement(Utils.ATTACKS)
          .time(DateUtils.fromString(attack.getTimestamp()).getMillis(), TimeUnit.MILLISECONDS)
          .tag(Utils.USERNAME, attack.getUser().getUsername())
          .tag(Utils.TIMESTAMP, attack.getTimestamp())
          .tag(Utils.DETECTION_SYSTEM, attack.getDetectionSystem().getDetectionSystemId())
          .field(Utils.JSON_CONTENT, gson.toJson(attack));
  
      if (attack.getDetectionPoint() != null) {
  	    builder
  		    .field(Utils.LABEL, attack.getDetectionPoint().getLabel())
  		    .tag(Utils.CATEGORY, attack.getDetectionPoint().getCategory())
  		    .tag(Utils.LABEL, attack.getDetectionPoint().getLabel())
  		    .tag(Utils.THRESHOLD_COUNT, String.valueOf(attack.getDetectionPoint().getThreshold().getCount()))
  		    .tag(Utils.THRESHOLD_INTERVAL_DURATION, String.valueOf( attack.getDetectionPoint().getThreshold().getInterval().getDuration() ) )
  		    .tag(Utils.THRESHOLD_INTERVAL_UNIT, attack.getDetectionPoint().getThreshold().getInterval().getUnit());
      }
  
      if (attack.getRule() != null) {
      	builder
      		.tag(Utils.RULE_GUID, attack.getRule().getGuid())
      		.tag(Utils.RULE_NAME, attack.getRule().getName())
      		.tag(Utils.RULE_WINDOW_DURATION, String.valueOf( attack.getRule().getWindow().getDuration()))
      		.tag(Utils.RULE_WINDOW_UNIT, attack.getRule().getWindow().getUnit());
      }
  
      Point point = builder.build();
  
      influxDB.write(Utils.DATABASE, "default", point);
      super.notifyListeners(attack);
    }
docs: {@inheritDoc}