Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Metric not Adding Host.geo.country_name #20796

Closed
mhassaanmughal opened this issue Aug 26, 2020 · 2 comments · Fixed by #20811
Closed

Custom Metric not Adding Host.geo.country_name #20796

mhassaanmughal opened this issue Aug 26, 2020 · 2 comments · Fixed by #20811
Assignees
Labels
libbeat Team:Integrations Label for the Integrations team

Comments

@mhassaanmughal
Copy link

processors:
  - add_host_metadata:
       geo:
          name: server-1
          country_name: PK
          country_iso_code: PK
          city_name: Karachi

after providing add_host_metadata as per document still country_name is not adding below is output of beat

{ "@timestamp": "2020-08-24T10:15:47.394Z", "@metadata": { "beat": "strongswan", "type": "_doc", "version": "8.0.0" }, "strongswan": { "strongswan": { "counter": 1 } }, "event": { "dataset": "strongswan.strongswan" }, "host": { "hostname": "inspiron-15-3567", "geo": { "country_iso_code": "PK", "city_name": "Karachi", "name": "server-1" }, "platform": "ubuntu" } }

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2020
@jsoriano jsoriano self-assigned this Aug 26, 2020
@jsoriano jsoriano added libbeat Team:Integrations Label for the Integrations team labels Aug 26, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2020
@jsoriano
Copy link
Member

jsoriano commented Aug 26, 2020

Hi @mhassaanmughal,

You are right, this field should be added, I have opened a PR to fix this issue #20811.
As a workaround on the meantime, you can manually add this field with the add_fields processor:

processors:
  - add_host_metadata:
      geo:
        name: server-1
        country_name: PK
        country_iso_code: PK
        city_name: Karachi
  - add_fields:
      target: host
      fields:
        geo.country_name: PK

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants