# Index lifecycle error: security\_exception: action \[indices:monitor/stats\] is unauthorized for user \[template\_manager\]

**URL:** <https://discuss.elastic.co/t/index-lifecycle-error-security-exception-action-indices-monitor-stats-is-unauthorized-for-user-template-manager/258334>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 10, 2020, 9:03pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-security-exception-action-indices-monitor-stats-is-unauthorized-for-user-template-manager/258334 "2020-12-10T21:03:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prolbrakels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prolbrakels/32/80541_2.png) [@prolbrakels](https://discuss.elastic.co/u/prolbrakels)\
**Post date:** [December 10, 2020, 9:03pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-security-exception-action-indices-monitor-stats-is-unauthorized-for-user-template-manager/258334/1 "2020-12-10T21:03:32Z")

</div>

According to Kibana, the `wait-for-shard-history-leases` step failed when trying to delete an index due to ILM policy. The `template_manager` user/role is one I recently created for the purpose of automating updates to the templates and ilm policies I'm using in this cluster. What permissions am I missing? I tried adding index `*` with permission `monitor`, but the error didn't go away (not sure how quickly I should expect it to go away? It seemed like other ilm errors went away within a minute or two of fixing permissions).

---

<div class="post-metadata">

**Author:** ![prolbrakels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prolbrakels/32/80541_2.png) [@prolbrakels](https://discuss.elastic.co/u/prolbrakels)\
**Post date:** [December 11, 2020, 6:06pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-security-exception-action-indices-monitor-stats-is-unauthorized-for-user-template-manager/258334/2 "2020-12-11T18:06:07Z")

</div>

I ended up deleting that index by hand, and no other index has had that same error. I still don't understand what went wrong, though.

---

<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 8, 2021, 6:06pm UTC](https://discuss.elastic.co/t/index-lifecycle-error-security-exception-action-indices-monitor-stats-is-unauthorized-for-user-template-manager/258334/3 "2021-01-08T18:06:39Z")

</div>

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