NagiosXi - Time periods ranges

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

NagiosXi - Time periods ranges

Post by Bala.Mutyam »

Hi,

Is it possible to include Time period ranges like Monday - Friday as Time Definition and 07:00-19:00 as Time Range. I have tired but giving an error "Error: Could not parse timerange #1 for day 1 of timeperiod (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 53)" .

Also can we also have run checks for 24/7 but send alerts for a particular time period (say 0:700-19:00) and for a specific group?
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXi - Time periods ranges

Post by scottwilkerson »

monday - friday wouldn't be valid, you would need to add each day separately.

There are a lot of different ranges that are valid but that isn't one that exists

See:
https://assets.nagios.com/downloads/nag ... riods.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NagiosXi - Time periods ranges

Post by Bala.Mutyam »

@scottwilkerson - Thanks for the update.

Also possible to run checks for 24/7 and only send alerts between 7:00-19:00 for a particular hostgroups?
Last edited by Bala.Mutyam on Mon Jul 06, 2020 10:43 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXi - Time periods ranges

Post by scottwilkerson »

Yes, you can set a separate time-period for notifications when editing a host/service in the CCM
Alert Settings Tab -> Notification period
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NagiosXi - Time periods ranges

Post by Bala.Mutyam »

@scottwilkerson - Thanks for the update.

For some reason notification is not working.
Here are the definitions:

timeperiod:

Code: Select all

define timeperiod {
    timeperiod_name         cp-standard-timeperiod
    alias                   CP standard timings
    monday                  07:00-19:00
    tuesday                 07:00-19:00
    wednesday               07:00-19:00
    thursday                07:00-19:00
    friday                  07:00-19:00
}
Service:

Code: Select all

define service {
    host_name                 server_name
    service_description      Local Disks
    check_command            check_xi_ncpa!-t 'NagiosXi' -P 5693 -M 'plugins/check_disk' -q 'args=-l -w 20% -c 10%'
    max_check_attempts       2
    check_interval           5
    retry_interval           1
    check_period             24x7
    notification_interval    5
    notification_period      cp-standard-timeperiod
    contact_groups           Linux-Alerts
    register                 1
}
contactsgroup:

Code: Select all

define contactgroup {
    contactgroup_name    Linux-Alerts
    alias                Linux Systems Alerts
    members              member1,member2
}
As per the definitions, we are supposed to receive alerts from 7am to 7pm but we are not receiving any alerts? please have a look.

Thannks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXi - Time periods ranges

Post by scottwilkerson »

Do the notification events show up in the Notification Log & State History?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NagiosXi - Time periods ranges

Post by Bala.Mutyam »

I can see events in the Notifications but nothing in state log on NagiosXi under Reports.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXi - Time periods ranges

Post by scottwilkerson »

Are the notifications for member1,member2 on server_name Local Disks?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NagiosXi - Time periods ranges

Post by Bala.Mutyam »

Yes.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXi - Time periods ranges

Post by scottwilkerson »

Can you verify that member1 and member2 have all the correct items set in their Notification settings, see page 2,3 here
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

make sure the notification method and preferences are set to receive the types you want.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked