AuditLogger.logItem(this.getClass().getCanonicalName(), "addMoreData", currentUser, "msg count=" + req.size() + " 1st record agent type=" + req.get(0).getAgentType() + " uri=" + req.get(0).getURI(), req.get(0).getClassification(), ctx.getMessageContext()); UserIdentityUtil.assertAgentRole(currentUser, "addData", req.get(0).getClassification(), ctx); Connection con = null;
if (Utility.stringIsNullOrEmpty(req.getAgentType())) { com.setNull(13, java.sql.Types.VARCHAR); } else { com.setString(13, Utility.truncate(req.getAgentType(), MAXTEXT)); if (!agents.containsKey(req.getAgentType())) { agents.put(req.getAgentType(), true); Connection config = Utility.getConfigurationDBConnection(); try { com = config.prepareStatement("INSERT INTO agents(agenttype) VALUES (?)"); com.setString(1, req.getAgentType()); com.execute(); log.log(Level.DEBUG, "DCS DEBUG adding agent type"); + req.getURI() + " Action: " + req.getAction() + " Agent: " + req.getAgentType() + " Host: " + req.getServiceHost() + " I'm going to return this as successful, even though it was not."); return true; } else { log.log(Level.ERROR, "Error recording performance data. Data may be lost URL: " + req.getURI() + " Action: " + req.getAction() + " Agent: " + req.getAgentType() + " Host: " + req.getServiceHost(), ex); return false;
AuditLogger.logItem(this.getClass().getCanonicalName(), "addData", currentUser, req.getURI() + " agent type " + req.getAgentType() + " " + req.getMessage(), req.getClassification(), ctx.getMessageContext()); UserIdentityUtil.assertAgentRole(currentUser, "addData", req.getClassification(), ctx); AddDataResponseMsg res = new AddDataResponseMsg();