addValueRecipe
A Graze API POST request that creates a new Cookbook Recipe using Value Recipe or Value Recipe v2 recipe types. See Recipe Types for more information.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint addValueRecipe
takes the following request arguments:
Name | Type | Required | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String | Yes | A valid | ||||||||||||||||||||||||
| List of Strings | No | A list of the Cookbooks that this Recipe belongs to. You can add Cookbooks here or, when you create a Cookbook, you can assign the Recipes to it. | ||||||||||||||||||||||||
| String | Yes | Name of the Recipe. Use a unique and descriptive name. | ||||||||||||||||||||||||
| String | No | Description of the Recipe. Default is the Recipe | ||||||||||||||||||||||||
| String | No | Defines whether the Recipe uses Value Recipe or Value Recipe v2. Valid values are | ||||||||||||||||||||||||
| Positive Integer | No | Minimum number of alerts required before Cookbook creates a Situation. When Cookbook determines the number of alerts required to create a Situation, it compares the alert threshold values in the Cookbook Recipe and in the merge group that the Cookbook Recipe belongs to, and it uses the higher value. If you are using the default merge group which has an alert threshold of 2, Cookbook will never create a Situation containing a single alert. If you want Moogsoft AIOps to create Situations with a single alert, consider changing the alert threshold in the default merge group to 1 or creating custom merge groups. See Configure Merge Groups for more information on updating the default merge group and setting up custom merge groups. | ||||||||||||||||||||||||
| String | No | A filter that determines the alerts that Cookbook considers for Situation creation. Cookbook includes alerts that match the trigger filter. By default Cookbook only includes alerts with a severity of 'Critical'. For details on creating a filter, see Filter Search Data. To set a vertex entropy trigger filter, see Set Up Vertex Entropy for more information. Default is an empty string. | ||||||||||||||||||||||||
| String | No | A filter that determines the alerts to exclude from Situation creation. Cookbook ignores alerts that match the exclusion filter. For details on creating a filter, see Filter Search Data. To set a vertex entropy exclusion filter, see Set Up Vertex Entropy for more information. Default is an empty string. | ||||||||||||||||||||||||
| String | No | A filter that determines whether to create a Situation from a seed alert. The seed alert must meet both the | ||||||||||||||||||||||||
| Double | No | Rate, in number of alerts per second. Cookbook clusters alerts if they arrive at a higher rate than is specified here. Cookbook uses | ||||||||||||||||||||||||
| Positive Integer | No | Number of alerts that must arrive before the Cookbook starts to calculate the alert rate. See Cookbook and Recipe Examples for more information. Default is 5. Valid only if | ||||||||||||||||||||||||
| Positive Integer | No | Maximum number of alerts that are considered in the alert rate calculation. When more than this number of alerts have arrived, Cookbook discards the oldest alerts and calculates the alert rate based on the number of alerts in the | ||||||||||||||||||||||||
| Positive Integer | No | Minimum time period, in seconds, that Cookbook clusters alerts for before the Recipe resets and starts a new cluster. See Cookbook and Recipe Examples for more information. Default is 3600 seconds (1 hour). If you set a different | ||||||||||||||||||||||||
| Positive Integer | No | Time period that Cookbook can extend clustering alerts for before the Recipe resets and starts a new cluster. Setting this value enables the cook for auto-extension feature for this Cookbook. As Cookbook receives related alerts, it continues to extend the total clustering time until the If you set a different | ||||||||||||||||||||||||
| Positive Integer | No | Maximum time period that Cookbook clusters alerts for before the Recipe resets and starts a new cluster. It works in conjunction with the If you set a different | ||||||||||||||||||||||||
| String | No | Determines Cookbook's clustering behavior. Set to an empty string to use the Cookbook If you set a different | ||||||||||||||||||||||||
| Positive Integer | No | Maximum number of hops between the alert source nodes in order for the alerts to qualify for clustering. Moogsoft AIOps measures hop limit from the first alert that formed the Situation and always follows the shortest possible route in the network. A hop is the jump between two directly connected nodes in a network. For more information on hops, see Vertex Entropy. To set a hop limit, see Set Up Vertex Entropy for more information. You can only use a hop limit if you have imported your network topology into the system. See Import a Topology for details. | ||||||||||||||||||||||||
| JSON Array | Yes | Values that alerts must match for Cookbook to include them in a Situation. You can provide multiple values such as source, description, service or custom info fields. An array of JSON objects, each containing:
|
Response
Endpoint addValueRecipe
returns the following response:
Examples
The following examples demonstrate typical use of endpoint addValueRecipe
:
Request example
Example cURL request to add a new Recipe "GrazeRecipe":
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/addValueRecipe" -H "Content-Type: application/json; charset=UTF-8" -d '{"cookbook" : "GrazeCook1", "name": "GrazeRecipe", "alert_threshold" : 1, "hop_limit" : 0, "components" : [{ "name": "custom_1", "similarity": 0.2, "shingle_size": 2 } ] }'