# Hourly indices with ingest pipeline - getting 12 hours always

**URL:** <https://discuss.elastic.co/t/hourly-indices-with-ingest-pipeline-getting-12-hours-always/208158>\
**Category:** Elasticsearch\
**Created:** [November 16, 2019, 12:28pm UTC](https://discuss.elastic.co/t/hourly-indices-with-ingest-pipeline-getting-12-hours-always/208158 "2019-11-16T12:28:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [November 16, 2019, 12:28pm UTC](https://discuss.elastic.co/t/hourly-indices-with-ingest-pipeline-getting-12-hours-always/208158/1 "2019-11-16T12:28:28Z")

</div>

I'd like to create hourly indices (for test purpose), creating the timestamp suffix in an ingest pipeline, but encountered an issue: it does not matter, which hour I put, I'm getting 12 hours as the result.  
ES version is `7.4.2`  
Pipeline (note I use a non-valid character `:` in the index name intentionally, it's useful for debugging):

```auto
PUT _ingest/pipeline/news-index-name
{
  "description": "news index naming",
  "processors" : [
    {
      "date_index_name" : {
        "field" : "@timestamp",
        "index_name_prefix" : "news-",
        "date_rounding" : "s",
        "date_formats": ["ISO8601", "yyyyMMdd"],
        "index_name_format": "yyyy-MM-dd:hh",
         "on_failure" : [
          {
            "set" : {
              "field" : "_index",
              "value" : "news-failed"
            }
          }
        ]
      }
    }
  ]
}

```

Indexing:

```auto
PUT news/_bulk?pipeline=news-index-name
{"index":{}}
{"@timestamp":"2019-11-15T07:39:12+01:00"}

```

Response:

```auto
{
  "took" : 0,
  "ingest_took" : 0,
  "errors" : true,
  "items" : [
    {
      "index" : {
        "_index" : "<news-{2019-11-15:06||/s{yyyy-MM-dd:hh|UTC}}>",
        "_type" : "_doc",
        "_id" : null,
        "status" : 400,
        "error" : {
          "type" : "invalid_index_name_exception",
          "reason" : "Invalid index name [news-2019-11-15:12], must not contain ':'",
          "index_uuid" : "_na_",
          "index" : "news-2019-11-15:12"
        }
      }
    }
  ]
}

```

As one can see from the response, it uses the correct value in the index template (`06 hours` UTC), but a wrong value in the `error` section, which is always `12`.

Can some one please help with that?  
Thanks a lot!

---

<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:** [December 14, 2019, 12:28pm UTC](https://discuss.elastic.co/t/hourly-indices-with-ingest-pipeline-getting-12-hours-always/208158/2 "2019-12-14T12:28:41Z")

</div>

Closed on December 14, 2019, 12:28pm UTC

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