Hello,
First of all this is my first email - so hello to everyone.
We are planning to migrate our Nagios servers (internal + client ones) to
Icinga2 - I was assigned to investigate this project and build proof of concept
machine. I have few questions (probably newbie ones) if somebody can help me
with them that would be perfect. Of course I go through documentation and it`s
amazing ... just I`m not hiding that I probably don`t understand something or
doing something wrong.
Scenario: I want to have general template for service name Happy - please
notice that one host will have multiple instance of that services running on
different ports, currently i solved it like that:
in hosts.conf (under object Host )
vars.happies["Happy 501"] = {
http_port = "501"
client_id = "1111"
}
vars.happies["Happy 502"] = {
http_port = "502"
client_id = "1111"
}
etc.
Later something in services.conf processing it (apply Service for (happy =>
config in host.vars.happies)
Question 1:
Can I declare it one some kind of nested list instead of writing this
vars.happies all the time? Something like:
vars.happies["Happy"] = {
{http_port = 501, client = 1111},
{http_port = 502, client = 1111},
}
That will make it nicer - please notice that client will be in example always
the same - can I also do something with this.
Question2:
Ok now I have host with happy service defined. There is more than 1 check for
this . So if service have happy do this, this and this on it.
Currently I have only one check (one line apply Service for (happy => config in
host.vars.happies) . I understand if I want another check for this I need to
create another apply Service for (happy => config in host.vars.happies) line
and place different code there yes? Or I need to do it everythng in that one
object somehow.
Regards
Dariusz
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users