Modifying variables?


How can we operate on variables in Icinga 2 Core? Is this similar to C++ ??

For example:

object Host “” {
address = “”
check_command = “hostalive”
vars.host_short_name = <c++ code to get just sqlserver01 from> ??

Thanks in advance. Have a safe weekend.

Best regards
Chinnu K

Bringing this to the top. Can someone please advise? Thanks.

Hello and welcome to the community!

I would like to ask you to not bump your topics.
This forum works on the basis of people answering because they want to help and bumping is generally seen as rude :slight_smile:
The community is less active during the weekend and I would like to ask you to have some patience here.

You are not being overlooked.


1 Like

Hi @krapadorf,

String#split should be what you’re looking for. The docs contain a lot of details on how our config language works in 17-Language-Reference and 18-Library-Reference.


1 Like