updateValueRecipe
A Graze API POST request that updates a Cookbook Recipe that uses either a Value Recipe or a Value Recipe v2 recipe type. See Recipe Types for more information.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint updateValueRecipe
takes the following request arguments. You must supply the name of the Cookbook Recipe plus at least one other argument that you want to change.
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | Yes | Name of the Recipe that you want to update. |
| List of Strings | No | A list of the Cookbooks that this Recipe belongs to. |
| String | No | Description of 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 Onprem 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 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 Configure Topology-based Clustering with Vertex Entropy for more information. |
| 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 Configure Topology-based Clustering with Vertex Entropy for more information. |
| String | No | A filter that determines whether to create a Situation from a seed alert. The seed alert must meet both the |
| Positive Integer | 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. 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 the Cookbook Recipe clusters alerts for before it resets and starts a new cluster. See Cookbook and Recipe Examples for more information. If you set a different Inherits value from Cookbook if omitted. |
| Positive Integer | No | Time period that the Cookbook Recipe can extend clustering alerts for before it 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 Inherits value from Cookbook if omitted. |
| Positive Integer | No | Maximum time period that the Cookbook Recipe clusters alerts for before it resets and starts a new cluster. It works in conjunction with the If you set a different Inherits value from Cookbook if omitted. |
| 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 quality for clustering. Moogsoft Onprem measures hop limit from the first alert that formed the Situation and always follows the shortest possible route. A hop is the distance between two directly connected nodes. You can only set a hop limit if you have one or more topologies in your system. For more information on hops and hop limit see Vertex Entropy and Configure Topology-based Clustering with Vertex Entropy. For more information on topologies see Topology Overview. |
| JSON Array | No | Values that alerts must match for Cookbook to include them in a Situation. You can provide values for multiple components. See the table below for a full description of all components. |
| Boolean | No | Infer the topology to cluster on from the |
| String | No | The alert field that specifies the topology node from which the alert was generated. If you set an alert matching attribute you must set |
| String | No | Restrict clustering to nodes in the specified topology. If you set a topology name you cannot set |
The components
property is an array of JSON objects containing the following:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | Name of the component. |
| Double | Yes | Similarity threshold that the component must meet for Cookbook to cluster the alert into a Situation. |
| Integer | No | Shingle size for Cookbook to use to determine the similarity between different strings. The shingle size is only valid for Recipe Value v2 recipes. Default is -1 which means that Cookbook uses words to determine similarity. See Recipe Types for more details. |
| String | No | Determines whether Cookbook treats the component as a string or matches each value in the list individually. See Recipe Types for details. Valid values are |
| Boolean | No | Enables or disables case sensitive when comparing strings. Case sensitivity is only valid for Recipe Value recipes. See Recipe Types for more details. Default is |
Response
Endpoint updateValueRecipe
returns the following response:
Examples
The following examples demonstrate typical use of endpoint updateValueRecipe
:
Request example
Example cURL request to update Value Recipe "GrazeRecipe":
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/updateValueRecipe" -H "Content-Type: application/json; charset=UTF-8" --data '{ "name" : "GrazeRecipe", "dynamic_topology" : false, "topology_name" : "physical", "hop_limit" : 2, "components" : [{"name": "component_name", "similarity":0.8, "shingle_size" : 3}] }'