Query Internal Logs

The query internallogs command fetches the debug log of a running Falcon LogScale Collector through the local API.

Note

  • The Log Collector install location varies depending on the type of install (sensor managed, custom install, or full install). This means that your install location might be different from the ones shown below. For details on the different ways of installing, see the Log Collector Installation page.

  • The functionality provided by internallogs, as well as it's usage shown below, is subject to change over time.

Here's how to run the commands:

Linux:

shell
logscale-collector query internallogs --cfg /etc/humio-log-collector/config.yaml

Windows:

shell
"C:\Program Files (x86)\CrowdStrike\Humio Log Collector\humio-log-collector.exe" query internallogs --cfg "C:\Program Files (x86)\CrowdStrike\Humio Log Collector\config.yaml"

Output Format

The command returns newline-delimited JSON (NDJSON), where each line is a self-contained JSON log event. Note that this is not a JSON array. If you intend to parse the output programmatically, your parser should handle one JSON object per line.

The debug log via the local API is unfiltered by default, and is not affected by logLevel, or the internal debug log sender feature, so the output generated can be extremely verbose. This means that a short capture window on an active collector might produce thousands of events, the majority of which will be repeating patterns of normal internal activity at trace and debug level.

To help with this, you can limit the output to a specific log level by passing --log-level to the command.

Here's how:

Linux:

shell
logscale-collector query internallogs --cfg <path to config> --log-level error

Windows:

shell
"C:\Program Files\LogScale Collector\LogScale Collector.exe" query internallogs --cfg "C:\Program Files\LogScale Collector\config.yaml" --log-level error

This can be particularly useful for reducing the volume of output when investigating a specific issue.

Common Fields

Every event contains the following fields:

Command Description
level Log level of the event: trace, debug, info, warn, or error
VERSIONVersion of the Falcon LogScale Collector
HOSTNAMEHostname of the machine running the collector
GOOSOperating system (e.g. windows, linux)
GOARCHSystem architecture (e.g. amd64)
PIDProcess ID of the collector
MACHINEIDUnique identifier for the host machine
timeTimestamp of the event
callerInternal source file and line number that produced the event
messageHuman-readable description of the event

Sample Output

Beyond the common fields shown above, each event includes additional fields specific to the component that produced it. The sections below describe the main component types and their associated fields, including one representative event for each major component type.

Common fields are omitted for brevity; in the actual output every event will include the full set of common fields described above.

Queue Statistics

Reports the current state of the memory queue, including event and batch counts:

json
{
  "level": "debug",
  "queueName": "logscaleSink",
  "queueType": "memory",
  "queued-EventCount": 780,
  "queued-BatchCount": 572,
  "message": "popOldestFromFlushList: flushList statistics after popping"
}

Field Description
queueNameName of the queue, corresponding to the configured sink
queueTypeQueue implementation type (e.g. memory)
queued-EventCountNumber of events currently held in the queue
queued-BatchCountNumber of batches currently held in the queue

Consumer Activity

Reports batch retrieval activity as the consumer reads from the queue:

json
{
  "level": "debug",
  "queueName": "logscaleSink",
  "queueType": "memory",
  "message": "Consumer receives 1 batches from the Queue"
}

Source Event Processing

Reports activity at the source level. Fields vary by source type. The example below is from a wineventlog source:

json
{
  "level": "trace",
  "sourceName": "windowsEvents",
  "sourceType": "wineventlog",
  "module": "wineventlog",
  "eventID": 16,
  "providerName": "Microsoft-Windows-Kernel-General",
  "message": "Processing event"
}

Field Description
sourceNameName of the source as configured
sourceTypeSource type (e.g. wineventlog)
moduleInternal module handling the source
eventID(wineventlog) Windows Event ID
providerName(wineventlog) Windows Event provider name

Sink Transmission

Reports the result of a completed transmission to the sink. This is one of the more 'information-rich' event types:

json
{
  "level": "debug",
  "sinkName": "logscaleSink",
  "sinkType": "humio",
  "count": 3411,
  "fields": 137078,
  "sizeRawData": 9253581,
  "compressionMethod": "gzip",
  "attempts": 1,
  "timeToSend": 509.4168,
  "bytesCompressed": 433529,
  "bytesUncompressed": 10333093,
  "compressionRatio": 23.83,
  "message": "Sent events to sink"
}

Field Description
sinkNameName of the sink as configured
sinkTypeSink type (e.g. humio)
countNumber of events in the transmission
fieldsTotal number of fields across all events
sizeRawDataSize of the raw data in bytes
compressionMethodCompression algorithm used
attemptsNumber of attempts required
timeToSendTime taken to send in milliseconds
bytesCompressedSize of the payload after compression
bytesUncompressedSize of the payload before compression
compressionRatioRatio of uncompressed to compressed size

Acknowledgement Tracking

Reports the state of the acknowledgement loop, which tracks successful delivery of events:

json
{
  "level": "debug",
  "queueName": "logscaleSink",
  "queueType": "memory",
  "ack-eventCount": 24395,
  "message": "total pending ack count after receiving new acks"
}

Field Description
ack-eventCountNumber of events currently awaiting acknowledgement

Checkpoint Flush

Reports that the collector has written its current position to persistent storage. This occurs periodically and allows the collector to resume from the correct position after a restart:

json
{
  "level": "trace",
  "count": 1,
  "message": "Flushed checkpoints"
}

Field Description
countNumber of checkpoints flushed

Warn and Error Events

The examples above are from a healthy collector and do not include warn or error level events.

These follow the same JSON structure as other events, but with "level": "warn" or "level": "error" and message fields appropriate to the condition encountered. If you are using internallogs to investigate a problem, filtering for these levels (as shown in the example above) is a good starting point.