# Custom variables in Kibana Alerts

**URL:** <https://discuss.elastic.co/t/custom-variables-in-kibana-alerts/249986>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [September 25, 2020, 2:05pm UTC](https://discuss.elastic.co/t/custom-variables-in-kibana-alerts/249986 "2020-09-25T14:05:04Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 29, 2020, 5:06am UTC](https://discuss.elastic.co/t/custom-variables-in-kibana-alerts/249986/8 "2020-09-29T05:06:19Z")

</div>

Perhaps if you try the Create Alert per Setting and set it to ServiceName you can get what you are looking for.

I was just describing this in another thread

> [@The context.thresholdOf, context.metricOf and context.valueOf not working in inventory alert](https://discuss.elastic.co/t/the-context-thresholdof-context-metricof-and-context-valueof-not-working-in-inventory-alert/250094/4):
>
> Looks like some of the features I was looking at in 7.9.2 are also in 7.8.1 Perhaps, You could try this. Go To Alert and Actions and create a Metric Threshold alert this is the more General version of the Inventory Alert. Then you could try Create Alert Per and put your Instance field in that. It will need to be a Keyword Type That should generate alerts by Instance and then that instance should be part of the …

---

_[View the full topic](https://discuss.elastic.co/t/custom-variables-in-kibana-alerts/249986)._
