# Icinga config and vars

**URL:** <https://community.icinga.com/t/icinga-config-and-vars/5820>\
**Category:** Icinga 2\
**Created:** [October 19, 2020, 11:53am UTC](https://community.icinga.com/t/icinga-config-and-vars/5820 "2020-10-19T11:53:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enigma619](https://community.icinga.com/letter_avatar_proxy/v4/letter/e/45deac/32.png) [@enigma619](https://community.icinga.com/u/enigma619)\
**Post date:** [October 19, 2020, 11:53am UTC](https://community.icinga.com/t/icinga-config-and-vars/5820/1 "2020-10-19T11:53:44Z")

</div>

Hi

My question is about vars and split…  
With one of my plugins, for an host and its service, I have for this service a service.output like:

```auto
500 Details: problem1,problem2,problem3...
```

I want to retrieve juste “500” and set it a a var\_service for notification.  
So on my service config I try to use:

```auto
var temp = "$service.output$".split("\\ ")
vars.tag = temp[0]
```

But it doesnt work, all service.output is sent as tag.  
I tried to use icinga console to plit with this expression and it seems to work…

I don’t undertand…

If you have any ideas?  
Thanks
