Skip to main content
Sumo Logic

HTTP Logs and Metrics Source

 

An HTTP source is an endpoint for receiving log and metric data uploaded to a unique URL generated for the source. The URL securely encodes the collector and source information. You can add as many HTTP sources as you'd like to a single hosted collector. 

With an HTTP Source you can upload logs and metrics from data sources where you cannot install a collector. For example, you can export data from a platform as a service (PaaS) or an infrastructure as a service (IaaS) provider, allowing you to gain visibility, for instance, into your billing system service provider, leveraging the same Sumo tools your organization already uses. Check with your IaaS or PaaS providers for information about using their APIs to forward log or metric data to Sumo Logic's HTTP endpoint.

When you set up an HTTP source, a unique URL is assigned to that source. The generated URL is a long string of letters and numbers. You can generate a new URL at any time. For more information see Generating a new URL.

To configure an HTTP logs and metrics source

  1. In the Sumo Logic web app, select Manage Data > Collection > Collection (Manage > Collection in the classic UI). 
  1. In the Collectors page, click Add Source next to a hosted collector.
  1. Select HTTP
  1. Enter a Name to display for the source in the Sumo web application. Description is optional.
  1. (Optional) For Source Host and Source Category, enter any string to tag the output collected from the source. (Category metadata is stored in a searchable field called _sourceCategory.)
  2. For log data to be uploaded to your source, you can set any of the following options under Advanced. The Advanced options do not apply to metrics uploaded to sources.
  • Enable Timestamp Parsing. This option is selected by default. If it's deselected, no timestamp information is parsed at all.
  • Time Zone. There are two options for Time Zone. You can use the time zone present in your log files, and then choose an option in case time zone information is missing from a log message. Or, you can have Sumo completely disregard any time zone information present in logs by forcing a time zone. Whichever option you choose, it's important to set the proper time zone. If the time zone of logs can't be determined, Sumo assigns logs UTC; if the rest of your logs are from another time zone your search results will be affected.
  • Timestamp Format. By default, Sumo will automatically detect the timestamp format of your logs. However, you can manually specify a timestamp format for a source. See Timestamps, Time Zones, Time Ranges, and Date Formats for more information.
  • Enable Multiline Processing. Use this option if you're working with multiline messages (for example, log4J messages or exception stack traces). Deselect this option if you want to avoid unnecessary processing when collecting single-message-per-line files (for example, Linux system.log).
  • Infer Boundaries. Enable when you want Sumo to automatically attempt to determine which lines belong to the same message.
    If you deselect the Infer Boundaries option, enter a regular expression in the Boundary Regex field to use for detecting the entire first line of multi-line messages.
  • Boundary Regex. You can specify the boundary between messages using a regular expression. Enter a regular expression for the full first line of every multi-line message in your log files. For an example, see the boundary regex section in Configure a Local File Source.
  • Enable One Message Per Request. Select this option if you'll be sending a single message with each HTTP request. For more information, see Multiline options in HTTP sources
  1. For log data uploaded to the source, configure desired filters—such as include, exclude, hash, or mask—as described in Create a Processing Rule. Processing rules are applied to HTTP log data, but not to metric data. Note that while the Sumo service will receive your data, data ingestion will be performed in accordance with the regular expressions you specify in processing rules.
  2. When you are finished configuring the source click Save.
  3. When the URL associated with the source is displayed, copy the URL so you can use it to upload data.


     

Upload data to the HTTP Source

To start uploading data to the HTTP source, follow the instructions on Upload data to an HTTP source.

Access a source's URL

If you need to access the source's URL again, click Show URL.

HTTPshowURL.png

Multiline options in HTTP sources

The HTTP source isn't designed to support large numbers of connections per source. If possible, you should batch log messages locally and send batches on a single thread. 

To increase throughput, batch multiple log messages in a single request to the HTTP source. If any of those logs can contain multiline messages, like stack traces, activate Enable Multiline Processing

http_source_enable_multiline_processing.png

For basic multiline processing, select Infer Boundaries; if this leads to malformed messages, you can instead specify a regular expression to determine the multiline boundary.

Also, in your HTTP source configuration, make sure that the check box Enable One Message Per Request is deactivated. This option allows you to specify that all data sent within an individual HTTP request to an HTTP source endpoint should be considered to be one log message. 

Sumo expects that the entire content of an individual log message will be sent to Sumo within the same HTTP request. Multiline processing rules are only applied within the bounds of the data sent within a single HTTP request. This means that a multiline log that is sent to Sumo across multiple HTTP requests will not be detected as a single message. It will be broken into separate log messages. Sumo does not currently have the ability to detect and thread together a distinct log message that has been sent via multiple HTTP requests. 

For tools to help you batch messages, see https://github.com/SumoLogic/sumologic-net-appenders.