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

PropertyDescription
Command typeDriver query
Required permissionAdministrator
License usageCounted
Parallel executionNot supported
Distributed executionNot supported

Syntax

sonar-response-models [keywords=STR]

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

FieldTypeDescription
typestringResponse model type
namestringResponse model name
descriptionstringResponse model description

Error codes

Parsing errors
Error codeMessageDescription
300182No 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

  1. Retrieve all registered response models

    sonar-response-models
    
  2. Search for response models whose name or description contains a specific keyword

    sonar-response-models keywords="firewall"
    | fields type, name, description
    
  3. 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_description
    

    Because the fields from the join subquery result overwrite fields of the same name in the input record, the subquery keeps only type and model_description and excludes name, so the response target's name is 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.