# Drupal \`watchdog.type\` field value overrides configured/default type

**URL:** <https://discuss.elastic.co/t/drupal-watchdog-type-field-value-overrides-configured-default-type/91128>\
**Category:** Logstash\
**Created:** [June 28, 2017, 2:47pm UTC](https://discuss.elastic.co/t/drupal-watchdog-type-field-value-overrides-configured-default-type/91128 "2017-06-28T14:47:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![loopsysdev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loopsysdev/32/19618_2.png) [@loopsysdev](https://discuss.elastic.co/u/loopsysdev)\
**Post date:** [June 28, 2017, 2:47pm UTC](https://discuss.elastic.co/t/drupal-watchdog-type-field-value-overrides-configured-default-type/91128/1 "2017-06-28T14:47:29Z")

</div>

I've enabled the `drupal_dblog` input, and I'm getting entries (documents), but they all have the same `type` as the entries in `/admin/reports/dblog`. It seems the `type` field set by the plugin is overridden by the contents of `watchdog.type`. I've also tried setting `type` to something else in the `drupal_dblog` configuration, but there's no difference. The configured/default value does not show up anywhere in the document. Maybe the database value should be changed to `watchdog_type` by changing the `SELECT` column list to an explicit list with `type AS watchdog_type` or something like that?

A workaround filter:

```
if [site] == "my-site-name" and [type] != "watchdog" {
  mutate {
    rename => {
      "type" => "watchdog_type"
    }
    add_field => {
      "type" => "watchdog"
    }
  }
}

```

[Pull request](https://github.com/logstash-plugins/logstash-input-drupal_dblog/pull/14)

---

<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 26, 2017, 2:47pm UTC](https://discuss.elastic.co/t/drupal-watchdog-type-field-value-overrides-configured-default-type/91128/2 "2017-07-26T14:47:37Z")

</div>

Closed on July 26, 2017, 2:47pm UTC

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