Check hosts only in weekdays

This forum was archived to /woltlab and is now in read-only mode.
  • Hi everyody, I have many hosts to monitoring, but in different times and if a node is down i have to submit a ticket (icinga notification to another system)


    for example
    3000 hosts from Monday to Sunday 24hrs. (Every day every time)
    2000 hosts from Monday to Sunday 9:00 a.m. to 9:00 p.m.
    3000 hosts from Monday to Friday from 09:00 to 20:00
    2000 hosts from Monday to Friday from 09:00 to 18:00



    reading the icinga2 doc I found the TimePeriod and ScheduledDowntime objects
    but isn't solved my problem exactly (or i think)


    i was thinking to use timeperiod and apply to different notifications for each group of hosts (24x7, 9to9, etc.) so just will submit the ticket if the incident was in timeperiod, but (this is what i don't have clear) if i do this, icinga will still ejecuting check_command for the hosts ?


    by performance i think that if icinga do that, isn't the right way to solve it


    and


    Code
    1. template Notification "mail-host-notification" {
    2. command = "mail-ticket-notification"
    3. states = [ Down ]
    4. types = [ ]
    5. period = "9to9-timeperiod"
    6. }

    thanks a lot for your help.

  • hi,

    https://docs.icinga.com/icinga…pes#objecttype-timeperiod

    https://docs.icinga.com/icinga…vanced-topics#timeperiods

    but (this is what i don't have clear) if i do this, icinga will still ejecuting check_command for the hosts

    As long as you will not limit that in hosts or services by setting the check_period property, the checks continue to run.

    Notifications and Users however can be limited by using the period property.

    The doc talks about a notification_period property but i can not find it using icinga2 object list and thus consider that a bug.