Documentation forSolarWinds Observability

Send logs over HTTPS

You can send a single set of events to SolarWinds Observability over HTTPS or configure your application to POST logs over HTTPS.

Send a single set of events

  1. In SolarWinds Observability, click Add Data in the upper-right corner.

  2. In the Add Data dialog, click Logs.

  3. Create or select an API ingestion token to use when sending your logs by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  4. Select HTTPS and click Next.

  5. To send a single event to SolarWinds Observability, do either of the following:

    • Click Copy button to copy the command to the clipboard. Then paste the copied text in the command line and replace Your log line here with a string containing the log text or events you want to send.

      For non-Linux machines, replace the backslash (\) with the line-continuation character for your command line interface. For example, if using Windows Powershell, replace \ with a backtick (`).

    • Click the tab for the command line interface you are using and copy the code in the tab. Paste the copied text in the command line and replace the following: 

      • Replace YourApiToken with the ingestion token specified in the Token box.
      • Replace YourLogLine with a string containing the log text or events you want to send.
      • Update the endpoint URI logs.collector.xx-yy.cloud.solarwinds.com to match your organization's logs HTTPS endpoint (found in the Endpoint field or see Endpoint URIs).
      Linux Bash

      curl --location --request POST \
          "https://logs.collector.xx-yy.cloud.solarwinds.com" \
          --header "Content-Type: application/octet-stream" \
          --header "Authorization: Bearer YourApiToken" \
          --data-raw "YourLogLine"

      Windows Command
      curl --location --request POST ^
          "https://logs.collector.xx-yy.cloud.solarwinds.com" ^
          --header "Content-Type: application/octet-stream" ^
          --header "Authorization: Bearer YourApiToken" ^
          --data-raw "YourLogLine"
      Windows Powershell
      curl --location --request POST `
          "https://logs.collector.xx-yy.cloud.solarwinds.com" `
          --header "Content-Type: application/octet-stream" `
          --header "Authorization: Bearer YourApiToken" `
          --data-raw "YourLogLine"
  6. Press Enter to run the command. The log is sent to the Logs Explorer.

  7. Click View Logs to open the Logs Explorer and view the sent event(s).

Send logs from your application

  1. In SolarWinds Observability, click Add Data in the upper-right corner.
  2. In the Add Data dialog, click Logs.

  3. Create or select an API ingestion token to use when sending your logs by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  4. Select HTTPS and click Next.

  5. Configure your application to POST events using the following information from the Instructions screen of the Add Data dialog:

    • POST to the URL specified in the Endpoint box, but add /bulk to the end of the URL.

    • Include the Content-Type header application/octet-stream.

    • Include the Authorization header Bearer YourApiToken, replacing YourApiToken with the ingestion token specified in the Token box.

    • Send events as a string of text using the data-raw option. Events should be separated with a \n line break.

    • (Optional) Send resource attributes using X-Otel-Resource-Attr header options. Resource attributes should be sent in $key=$value format.

  6. Click View Logs to open the Logs Explorer and view the logs sent by your application.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.