Skip to content

OutputStreamAppenderResponse

Gianluca Sartori edited this page Feb 3, 2023 · 1 revision

This Response type is used to write Extended Events data to an output stream, be it a file or stdout/stderr stream.

Properties

  • string OutputFormat: Sets the output format to use on the stream. Supported formats are: LineProtocol,Json and Csv. Depending on the format you may have to set other properties to control the behavior.

  • string OutputMeasurement: [Applies to LineProtocol] Name of the measurement where the data is written

  • string JsonOutputFormat: [Applies to Json] Format to apply to Json objects. Supported values are: SingleObject (object that contains an array of objects),ObjectArray (array of objects) and IndependentObjects (objects are written to the output one by line)

  • string Output: Output stream. It can be a path to a file or one between stdout and sterr

Example

{
    "Target": [
        {
            "ServerName": [
                "SERVERA",
                "SERVERB"
            ],
            "SessionName": "errors",
            "Responses": [
                {
                    "__type": "OutputStreamAppenderResponse",
                    "Events": [
                        "error_reported"
                    ],
                    "OutputFormat": "Json",
                    "JsonOutputFormat": "IndependentObjects",
                    "OutputColumns": [
                        "collection_time_iso",
                        "OutputMeasurement AS 'sqlserver_events_errors'",
                        "server_instance_name",
                        "name",
                        "client_app_name",
                        "server_principal_name",
                        "client_hostname",
                        "database_name",
                        "severity",
                        "error_number",
                        "message",
                        "event_sequence",
                        "sql_text"
                    ]
                }
            ]
        }
    ]
}
Clone this wiki locally