Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/438#discussion_r100596601
  
    --- Diff: 
metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java
 ---
    @@ -133,14 +136,18 @@ public JSONObject joinMessages(Map<String, 
JSONObject> streamMessageMap) {
               LOG.debug(sourceType + ": Empty rules!");
             }
     
    +        // triage the threat
             ThreatTriageProcessor threatTriageProcessor = new 
ThreatTriageProcessor(config, functionResolver, stellarContext);
    -        Double triageLevel = threatTriageProcessor.apply(ret);
    +        ThreatScore score = threatTriageProcessor.apply(ret);
    +
             if(LOG.isDebugEnabled()) {
               String rules = 
Joiner.on('\n').join(triageConfig.getRiskLevelRules());
    -          LOG.debug("Marked " + sourceType + " as triage level " + 
triageLevel + " with rules " + rules);
    +          LOG.debug("Marked " + sourceType + " as triage level " + 
score.getScore() + " with rules " + rules);
             }
    -        if(triageLevel != null && triageLevel > 0) {
    -          ret.put("threat.triage.level", triageLevel);
    +
    +        // attach the triage threat score to the message
    +        if(score.getRuleScores().size() > 0) {
    +          ret.put("threat.triage.level", toMap(score));
    --- End diff --
    
    I thought there was a reason that we didn't put complex types as values in 
the JSON.  I didn't think ES or kibana was able to handle them.  Maybe instead 
of a map, we can unfold to `threat.triage.level.score`, 
`threat.triage.level.rules`, etc.
    
    Also, since we're changing this, do we have any dashboards that need to be 
changed in kibana?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to