cluster
Use the cluster operator to generate clusters of data based on similarity.
Syntax
|cluster [threshold=<float> | match=<string> | delim=<string> | countfield=<string> | labelfield=<string> | field=<string>]
threshold=<float>
|
Optional. Specify a numeric value between 0 and 1 to define the sensitivity of the clustering. If this value is closer to 1, then it will group only more similar data. Otherwise, it will group less similar data getting fewer clusters. |
match=<string>
|
Optional. Specify the match type to be used for the clustering. Possible options:
Default: |
delim=<string>
|
Optional. Specify the delimiters to be used for Default: |
countfield=<string>
|
Optional. Specify the name of the output field for the number of events in the cluster. Default: |
labelfield=<string>
|
Optional. Specify the name of the output field for the cluster name. Default: |
field=<string> |
Optional. Specify the name of the field from which the data will be compared. Default: |
Usage
You can use the cluster operator for data onboarding.
Examples
Example 1: Cluster data using default similarity matching.
test_cluster_table |cluster
Example 2: Cluster with custom matching algorithm and threshold settings.
test_cluster_table |cluster countfield=counts labelfield=label_field threshold=0.6 field=message match=jaccard delim=',-:'
Example 3: Generate clusters using term-set comparison method.
test_cluster_table |cluster match=termset
Example 4: Clusters the first 500 OCSF events by metadata.product.name at 60% similarity, storing cluster labels in nb_cluster and the count of events per cluster in test_count.
ocsf | limit 500 | cluster labelfield=nb_cluster countfield=test_count threshold=0.6 field=metadata.product.name