# Dropping dodgy index pattern names like %{indexname}-2016.08.24

**URL:** https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539
**Category:** Kibana
**Created:** [December 9, 2016, 9:26am UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539 "2016-12-09T09:26:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mick\_Mahoney](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Mick\_Mahoney](https://discuss.elastic.co/u/Mick_Mahoney)
#### Post date: [December 9, 2016, 9:26am UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/1 "2016-12-09T09:26:35Z")

</div>

We have a wrongly named index pattern created in our .kibana index file.  
The index name is in the format of %{indexname}-2016.08.24, which is set as both the title and the \_id  
The template cannot be removed from within the Kibana GUI as it returns an error.. probably related to the special characters  
I have tried multiple combinations to retrieve that index pattern via the ElasticSearch curl interface but am struggling to match it due to the special characters.

Any ideas anyone 🙂 ?

Many Thanks

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [December 9, 2016, 5:55pm UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/2 "2016-12-09T17:55:32Z")

</div>

Your index pattern starts with `%`? I'm trying to do that locally, but I just get an error when I create a pattern like that.

```auto
$ curl -XPUT 'http://localhost:9200/%char-test'
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid escape sequence `%ch' at index 0 of: %char-test"}],"type":"illegal_argument_exception","reason":"invalid escape sequence `%ch' at index 0 of: %char-test"},"status":400}

```

How'd you even create that?

---

<div class="post-metadata">

### Author: ![Mick\_Mahoney](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Mick\_Mahoney](https://discuss.elastic.co/u/Mick_Mahoney)
#### Post date: [December 9, 2016, 10:18pm UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/3 "2016-12-09T22:18:21Z")

</div>

By having the output of logstash like the below, and not assigning indexname to anything 🙂

output {  
elasticsearch {  
host =\> localhost  
index =\> "%{indexname}-%{+YYYY.MM.dd}"  
}  
}

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [December 9, 2016, 10:53pm UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/4 "2016-12-09T22:53:31Z")

</div>

Ah, `%{}` is the substitution. Sorry, I misunderstood.

I'd like to see the actual name of the index pattern you have. Mind sharing the results of your `index-pattern` in the `.kibana` index?

```auto
GET .kibana/index-pattern/_search
{
  "_source": {
    "excludes": "fields"
  }
}

```

---

<div class="post-metadata">

### Author: ![Mick\_Mahoney](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Mick\_Mahoney](https://discuss.elastic.co/u/Mick_Mahoney)
#### Post date: [December 13, 2016, 1:07pm UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/5 "2016-12-13T13:07:38Z")

</div>

Here are the dodgy index-pattern(s) 🙂

{  
"took" : 3,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 16,  
"max\_score" : 1.0,  
"hits" : [  
{  
"\_index" : ".kibana",  
"\_type" : "index-pattern",  
"\_id" : "%{indexname}-2016.08.24\*",  
"\_score" : 1.0,  
"\_source" : {  
"timeFieldName" : "@timestamp",  
"title" : "%{indexname}-2016.08.24\*"  
}  
},  
{  
"\_index" : ".kibana",  
"\_type" : "index-pattern",  
"\_id" : "%{indexname}-2016.11.24",  
"\_score" : 1.0,  
"\_source" : {  
"timeFieldName" : "@timestamp",  
"title" : "%{indexname}-2016.11.24"  
}  
},  
{  
"\_index" : ".kibana",  
"\_type" : "index-pattern",  
"\_id" : "%{indexname}-2016.12.07",  
"\_score" : 1.0,  
"\_source" : {  
"timeFieldName" : "@timestamp",  
"title" : "%{indexname}-2016.12.07"  
}  
}  
]  
}  
}

---

<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: [January 10, 2017, 1:07pm UTC](https://discuss.elastic.co/t/dropping-dodgy-index-pattern-names-like-indexname-2016-08-24/68539/6 "2017-01-10T13:07:45Z")

</div>

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