Modifying variables?

Hello,

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

For example:

object Host “sqlserver01.subnet.google.cloud” {
address = “170.1.4.16”
check_command = “hostalive”
vars.host_short_name = <c++ code to get just sqlserver01 from host.name> ??
}

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.

Greetings
Feu

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.

Greetings
Noah

1 Like