Configuring LogSources for Kubernetes Pods

Last updated on 22 November, 2022

With LogSources you can view and configure log integrations in the LogicMonitor portal. LogSources provides out-of-the-box setup and configuration for some popular logsources. This article describes specific configuration options when setting up LogSources for Kubernetes Pods types of resources.

Creating LogSources

LogSources are created from Settings in the LM portal. For general information on how to add a logsource, see Creating LogSources.

Configuration Options

The Kubernetes Pods log resource type uses the LM Collector. This runs on a Linux or Windows server within the infrastructure and uses standard monitoring protocols to monitor devices. The following describes specific configuration options for the Kubernetes Pods type of logsource.

Include Filters

You can add filters to specifically include resources of certain types, for example an application.

Available parameters

AttributesComparison OperatorValue
MessageEqual, NotEqual, Contain, NotContain, RegexMatch, RegexNotMatch.

Log Fields/Tags

You can configure Log Fields/Tags to include additional metadata to be sent with the logs.

Available parameters

MethodKeyValue
StaticFor example “Customer”For example “Customer_XYZ”
Dynamic(REGEX)For example “Host”For example “host=*”
LM Property(Token)For example “Device”For example “##system.deviceId##”

Parameter explanation

  • Dynamic(REGEX): The query will run on the message field.

Example

Configuration example for a Kubernetes Pods type of logsource.

General Information

  • Name: Kubernetes_Pods
  • Description: Data collection template for pod logs from monitored Kubernetes clusters.
  • AppliesTo (custom query): system.devicetype == “8” 
  • Type: LM Logs: Kubernetes Pods
  • Group: Kubernetes
In This Article