Cookbook Examples
Cookbook Example Using CValueRecipeV2
The following example demonstrates a Cookbook that uses a CValueRecipeV2 that splits
alerts into clusters with both a source_id
(hostname) and a
description
that are 50% similar. You control this under the
components property:
matcher:{ components:[ { name:"source_id", similarity:0.5, }, { name:"description", similarity:0.5, } }
The full example Cookbook with both configurations is as follows:
{ name:"Cookbook", classname:"CCookbook", run_on_startup:true, persist_state:false, metric_path_moolet:true, moobot:"Cookbook.js", process_output_of:"MaintenanceWindowManager", membership_limit:1, scale_by_severity:false, entropy_threshold:0.0, single_recipe_matching:false, cluster_match_type:"first_match", recipes:[ { chef:"CValueRecipeV2", name:"SplitBySourceAndDescription", description:"Value Recipe outage", recipe_alert_threshold:0, exclusion:"severity < 5", trigger:null, seed_alert:"vertex_entropy = 0.75", rate:0, min_sample_size:5, max_sample_size:10, #cook_for:5000, cluster_match_type:"first_match", matcher:{ hop_limit:2, components:[ { name:"source_id", similarity:0.5, shingle_size:4 }, { name:"description", similarity:0.5, shingle_size:-1 } ] } } ], cook_for:2000 }