Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions installer/conf/kube.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#Kubernetes events
<source>
type kubeevents
tag oms.api.KubeEvents.CollectionTime
tag oms.containerinsights.KubeEvents
run_interval 60s
log_level debug
</source>
Expand All @@ -26,7 +26,7 @@
#Kubernetes services
<source>
type kubeservices
tag oms.api.KubeServices.CollectionTime
tag oms.containerinsights.KubeServices
run_interval 60s
log_level debug
</source>
Expand Down Expand Up @@ -62,18 +62,19 @@
max_retry_wait 9m
</match>

<match oms.api.KubeEvents**>
type out_oms_api
<match oms.containerinsights.KubeEvents**>
type out_oms
log_level debug
num_threads 5
num_threads 5
buffer_chunk_limit 5m
buffer_type file
buffer_path %STATE_DIR_WS%/out_oms_api_kubeevents*.buffer
buffer_path %STATE_DIR_WS%/out_oms_kubeevents*.buffer
buffer_queue_limit 10
buffer_queue_full_action drop_oldest_chunk
buffer_queue_full_action drop_oldest_chunk
flush_interval 20s
retry_limit 10
retry_wait 30s
max_retry_wait 9m
</match>

<match oms.api.KubeLogs**>
Expand All @@ -88,8 +89,8 @@
retry_wait 30s
</match>

<match oms.api.KubeServices**>
type out_oms_api
<match oms.containerinsights.KubeServices**>
type out_oms
log_level debug
num_threads 5
buffer_chunk_limit 20m
Expand Down
9 changes: 7 additions & 2 deletions source/code/plugin/in_kube_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def initialize
end

config_param :run_interval, :time, :default => '1m'
config_param :tag, :string, :default => "oms.api.KubeEvents.CollectionTime"
config_param :tag, :string, :default => "oms.containerinsights.KubeEvents"

def configure (conf)
super
Expand Down Expand Up @@ -88,7 +88,12 @@ def enumerate(eventList = nil)
end
record['ClusterName'] = KubernetesApiClient.getClusterName
record['ClusterId'] = KubernetesApiClient.getClusterId
eventStream.add(emitTime, record) if record
wrapper = {
"DataType"=>"KUBE_EVENTS_BLOB",
"IPName"=>"ContainerInsights",
"DataItems"=>[record.each{|k,v| record[k]=v}]
}
eventStream.add(emitTime, wrapper) if wrapper
end
router.emit_stream(@tag, eventStream) if eventStream
end
Expand Down
9 changes: 7 additions & 2 deletions source/code/plugin/in_kube_services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize
end

config_param :run_interval, :time, :default => '1m'
config_param :tag, :string, :default => "oms.api.KubeServices.CollectionTime"
config_param :tag, :string, :default => "oms.containerinsights.KubeServices"

def configure (conf)
super
Expand Down Expand Up @@ -65,7 +65,12 @@ def enumerate
record['ClusterIP'] = items['spec']['clusterIP']
record['ServiceType'] = items['spec']['type']
#<TODO> : Add ports and status fields
eventStream.add(emitTime, record) if record
wrapper = {
"DataType"=>"KUBE_SERVICES_BLOB",
"IPName"=>"ContainerInsights",
"DataItems"=>[record.each{|k,v| record[k]=v}]
}
eventStream.add(emitTime, wrapper) if wrapper
end
router.emit_stream(@tag, eventStream) if eventStream
end
Expand Down