From 8254442a442bba890d0cb11a9fe514d48953d91d Mon Sep 17 00:00:00 2001 From: Monica Sarbu Date: Tue, 22 Mar 2016 20:27:30 +0100 Subject: [PATCH] Remove count from the exported fields --- CHANGELOG.asciidoc | 1 + topbeat/docs/fields.asciidoc | 9 --------- topbeat/etc/fields.yml | 9 --------- topbeat/system/cpu.go | 6 +++--- topbeat/system/filesystem.go | 1 - topbeat/system/process.go | 1 - 6 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 6201f17e4c75..5578ae084bb3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ https://github.com/elastic/beats/compare/v1.1.2...master[Check the HEAD diff] *Topbeat* - Rename proc.cpu.user_p with proc.cpu.total_p as includes CPU time spent in kernel space {pull}631[631] +- Remove count field from the exported fields {pull}1207[1207] *Filebeat* - Default config for ignore_older is now infinite instead of 24h, means ignore_older is disabled by default. Use close_older to only close file handlers. diff --git a/topbeat/docs/fields.asciidoc b/topbeat/docs/fields.asciidoc index 42480da3ceae..14e48033f939 100644 --- a/topbeat/docs/fields.asciidoc +++ b/topbeat/docs/fields.asciidoc @@ -41,15 +41,6 @@ required: True Set to "system" to indicate that the statistics are system-wide. -==== count - -type: int - -required: True - -The number of transactions that this event represents. This is generally the inverse of the sampling rate. For example, for a sample rate of 1/10, the count is 10. The count is used by the UIs to return estimated values. Reserved for future usage. - - ==== beat.name Name of the Beat sending the events. If the shipper name is set in the configuration file, then that value is used. If it is not set, the hostname is used. diff --git a/topbeat/etc/fields.yml b/topbeat/etc/fields.yml index 97ce26ea0a72..da2464dd828c 100644 --- a/topbeat/etc/fields.yml +++ b/topbeat/etc/fields.yml @@ -26,15 +26,6 @@ env: Set to "system" to indicate that the statistics are system-wide. required: true - - name: count - type: int - description: > - The number of transactions that this event represents. This - is generally the inverse of the sampling rate. For example, for - a sample rate of 1/10, the count is 10. The count is used by the - UIs to return estimated values. Reserved for future usage. - required: true - - name: beat.name description: > Name of the Beat sending the events. If the shipper name is set diff --git a/topbeat/system/cpu.go b/topbeat/system/cpu.go index 2e79378f7045..d48d17227b18 100644 --- a/topbeat/system/cpu.go +++ b/topbeat/system/cpu.go @@ -1,11 +1,12 @@ package system import ( + "strconv" + "time" + "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" sigar "github.com/elastic/gosigar" - "strconv" - "time" ) type CPU struct { @@ -147,7 +148,6 @@ func (cpu *CPU) GetSystemStats() (common.MapStr, error) { event := common.MapStr{ "@timestamp": common.Time(time.Now()), "type": "system", - "count": 1, "load": loadStat, "cpu": GetCpuStatEvent(cpuStat), "mem": GetMemoryEvent(memStat), diff --git a/topbeat/system/filesystem.go b/topbeat/system/filesystem.go index 53ab5d35cd4c..6220a28b9493 100644 --- a/topbeat/system/filesystem.go +++ b/topbeat/system/filesystem.go @@ -66,7 +66,6 @@ func CollectFileSystemStats(fss []sigar.FileSystem) []common.MapStr { event := common.MapStr{ "@timestamp": common.Time(time.Now()), "type": "filesystem", - "count": 1, "fs": GetFilesystemEvent(fsStat), } events = append(events, event) diff --git a/topbeat/system/process.go b/topbeat/system/process.go index 373a6093fdfa..866462fb27b2 100644 --- a/topbeat/system/process.go +++ b/topbeat/system/process.go @@ -230,7 +230,6 @@ func (procStats *ProcStats) GetProcStats() ([]common.MapStr, error) { event := common.MapStr{ "@timestamp": common.Time(time.Now()), "type": "process", - "count": 1, "proc": proc, }