sonar-response-models
Retrieves the list of response models registered in Logpresso Sonar. You can use the keywords option to search by name or description.
Command properties
| Property | Description |
|---|---|
| Command type | Driver query |
| Required permission | Administrator |
| License usage | Counted |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
Options
keywords=STR- Searches for a keyword contained in the name or description. If you separate multiple words with spaces, only response models that contain all the words are returned.
Output fields
| Field | Type | Description |
|---|---|---|
type | string | Response model type |
name | string | Response model name |
description | string | Response model description |
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
| 300182 | No permission to enumerate response models. | Run in a session without administrator permission |
Runtime errors
N/A
Description
sonar-response-models is an administrator-only command that retrieves the list of response models (the types of response methods available for use in response targets) registered in Logpresso Sonar. Running it in a session without administrator permission causes an error at the parsing stage and the query does not run.
The retrieved type value identifies which response model is used in a response target configuration, and corresponds to the response_model_type output field of the sonar-response-targets command.
Examples
-
Retrieve all registered response models
sonar-response-models -
Search for response models whose name or description contains a specific keyword
sonar-response-models keywords="firewall" | fields type, name, description -
Join with the response target list to also retrieve the response model description
sonar-response-targets | rename response_model_type as type | join type [ sonar-response-models | rename description as model_description | fields type, model_description ] | fields name, response_model_name, model_descriptionBecause the fields from the
joinsubquery result overwrite fields of the same name in the input record, the subquery keeps onlytypeandmodel_descriptionand excludesname, so the response target'snameis not overwritten by the response model name.
Change history
The sonar-response-models command is available in the Sonar 4.0 series starting with 4.0.2609.0, where the command previously provided by the Experimental app was built into Sonar core. On versions without the built-in command, install the Experimental app to use it.