Page 1 of 1

notification_interval #

Posted: Mon May 22, 2017 7:47 am
by amprantino
Hello all,

Is there a way to define time in days or months?

For example
max_check_attempts 3
normal_check_interval 10
retry_check_interval 1
contact_groups admins
notification_interval 30d
notification_period 24x7
notification_options c,r,w,u
"d" is being ignored/not suported and all notifications are stored every 30 minutes.
Is there a way to define it as 30d instead of 24x60x30=43200 minutes?

Re: notification_interval #

Posted: Mon May 22, 2017 12:53 pm
by dwhitfield
amprantino wrote: Is there a way to define time in days or months?
Not really. You could certainly rewrite the C and recompile (https://github.com/NagiosEnterprises/nagioscore/), but I suspect that is not what you are looking for.

There's also another way you could do it, but I think you should read through https://support.nagios.com/forum/viewto ... =7&t=29795 to understand the full context (basically, it's a bad idea).

Re: notification_interval #

Posted: Mon May 22, 2017 1:32 pm
by amprantino
dwhitfield wrote:
amprantino wrote: Is there a way to define time in days or months?
Not really. You could certainly rewrite the C and recompile (https://github.com/NagiosEnterprises/nagioscore/), but I suspect that is not what you are looking for.

There's also another way you could do it, but I think you should read through https://support.nagios.com/forum/viewto ... =7&t=29795 to understand the full context (basically, it's a bad idea).
Yes, I don't want to change time interval; the base should be "1 minute".
I am looking to configure the interval in an easy way to read (1h = 1hour, 1d = 1day , 1m = 1month).
Nagios is just ignoring the character after the number

Re: notification_interval #

Posted: Mon May 22, 2017 1:45 pm
by dwhitfield
You are welcome to file a feature request at https://github.com/NagiosEnterprises/na ... issues/new

As this is the way things have been in nagios for a long time, I doubt there will be changes, but it never hurts to ask. I'm not a developer, so I cannot say what sort of issues this might cause or how easy it will be to implement.