# Google Workspace module using wrong field to avoid duplicates

**URL:** https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816
**Category:** Beats
**Tags:** filebeat
**Created:** [June 9, 2022, 4:00pm UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816 "2022-06-09T16:00:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![serhii.okhrimenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/serhii.okhrimenko/32/99794_2.png) [@serhii.okhrimenko](https://discuss.elastic.co/u/serhii.okhrimenko)
#### Post date: [June 9, 2022, 4:00pm UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816/1 "2022-06-09T16:00:04Z")

</div>

Hi,

I have recently noticed that Google Workspace module [uses](https://github.com/elastic/beats/blob/v8.2.2/x-pack/filebeat/module/google_workspace/config/common.js#L28) `@metadata.id` instead of `@metadata._id`. It leads to duplicate appearance in logs.

Changing this:

```auto
var addID = new processor.Fingerprint({
    fields: [
        "json.id.time",
        "json.id.uniqueQualifier",
        "json.id.applicationName",
        "json.id.customerId",
    ],
    target_field: "@metadata.id",
    ignore_missing: true,
    fail_on_error: false,
});

```

to this:

```auto
var addID = new processor.Fingerprint({
    fields: [
        "json.id.time",
        "json.id.uniqueQualifier",
        "json.id.applicationName",
        "json.id.customerId",
    ],
    target_field: "@metadata._id",
    ignore_missing: true,
    fail_on_error: false,
});

```

should fix the problem.

---

<div class="post-metadata">

### Author: ![theherodied](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theherodied/32/86467_2.png) [@theherodied](https://discuss.elastic.co/u/theherodied)
#### Post date: [June 13, 2022, 12:22pm UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816/2 "2022-06-13T12:22:28Z")

</div>

Testing this now on Filebeat 7.17.4. I noticed a significant increase in messages on June 2 through today. Ton of duplicate messages.

---

<div class="post-metadata">

### Author: ![theherodied](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theherodied/32/86467_2.png) [@theherodied](https://discuss.elastic.co/u/theherodied)
#### Post date: [June 13, 2022, 6:29pm UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816/3 "2022-06-13T18:29:33Z")

</div>

So far it appears better. Will test for a few days.

---

<div class="post-metadata">

### Author: ![serhii.okhrimenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/serhii.okhrimenko/32/99794_2.png) [@serhii.okhrimenko](https://discuss.elastic.co/u/serhii.okhrimenko)
#### Post date: [June 15, 2022, 8:33am UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816/4 "2022-06-15T08:33:12Z")

</div>

Here is a [pull request](https://github.com/elastic/beats/pull/31898) that will help to fix this issue in future releases.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 13, 2022, 10:33am UTC](https://discuss.elastic.co/t/google-workspace-module-using-wrong-field-to-avoid-duplicates/306816/5 "2022-07-13T10:33:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
