Skip to content

Commit

Permalink
Revert migration of haproxy frontend to process.name (#10581)
Browse files Browse the repository at this point in the history
  • Loading branch information
webmat authored Feb 5, 2019
1 parent 2b63496 commit afc24ce
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 18 deletions.
5 changes: 0 additions & 5 deletions dev-tools/ecs-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1661,11 +1661,6 @@
alias: true
beat: metricbeat

- from: haproxy.stat.service_name
to: process.name
alias: true
beat: metricbeat

- from: haproxy.info.pid
to: process.pid
alias: true
Expand Down
4 changes: 1 addition & 3 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9916,9 +9916,7 @@ Process ID (0 for first instance, 1 for second, and so on).
*`haproxy.stat.service_name`*::
+
--
type: alias
alias to: process.name
type: keyword
Service name (FRONTEND for frontend, BACKEND for backend, or any name for server/listener).
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/haproxy/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion metricbeat/module/haproxy/stat/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"server": {
"id": 0
},
"service_name": "FRONTEND",
"session": {
"current": 0,
"limit": 25000,
Expand All @@ -73,7 +74,6 @@
"name": "stat"
},
"process": {
"name": "FRONTEND",
"pid": 1
},
"service": {
Expand Down
4 changes: 1 addition & 3 deletions metricbeat/module/haproxy/stat/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
Process ID (0 for first instance, 1 for second, and so on).
- name: service_name
type: alias
path: process.name
migration: true
type: keyword
description: >
Service name (FRONTEND for frontend, BACKEND for backend, or any name for server/listener).
Expand Down
5 changes: 0 additions & 5 deletions metricbeat/module/haproxy/stat/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ func eventMapping(info []*haproxy.Stat, r mb.ReporterV2) {
fields.Delete("process_id")
}

if processName, err := fields.GetValue("service_name"); err == nil {
event.RootFields.Put("process.name", processName)
fields.Delete("service_name")
}

event.MetricSetFields = fields
r.Event(event)
}
Expand Down

0 comments on commit afc24ce

Please sign in to comment.