()
| 14 | } |
| 15 | |
| 16 | func DefaultConfig() *Config { |
| 17 | return &Config{ |
| 18 | // At training, if at the depth of LogClusterDepth there is a cluster with |
| 19 | // similarity coefficient greater that SimTh, then the log message is added |
| 20 | // to that cluster. Otherwise, a new cluster is created. |
| 21 | // |
| 22 | // LogClusterDepth should be equal to the number of constant tokens from |
| 23 | // the beginning of the message that likely determine the message contents. |
| 24 | // |
| 25 | // > In this step, Drain traverses from a 1-st layer node, which |
| 26 | // > is searched in step 2, to a leaf node. This step is based on |
| 27 | // > the assumption that tokens in the beginning positions of a log |
| 28 | // > message are more likely to be constants. Specifically, Drain |
| 29 | // > selects the next internal node by the tokens in the beginning |
| 30 | // > positions of the log message |
| 31 | LogClusterDepth: 30, |
| 32 | // SimTh is basically a ratio of matching/total in the cluster. |
| 33 | // Cluster tokens: "foo <*> bar fred" |
| 34 | // Log line: "foo bar baz qux" |
| 35 | // * * * x |
| 36 | // Similarity of these sequences is 0.75 (the distance) |
| 37 | // Both SimTh and LogClusterDepth impact branching factor: the greater |
| 38 | // LogClusterDepth and SimTh, the less the chance that there will be |
| 39 | // "similar" clusters, but the greater the footprint. |
| 40 | SimTh: 0.3, |
| 41 | MaxChildren: 1000, |
| 42 | ParamString: `<_>`, |
| 43 | MinTokens: 3, // const + number suffix + <END> |
| 44 | MaxTokens: 80, |
| 45 | MaxClusters: 100000, |
| 46 | } |
| 47 | } |
no outgoing calls