notification_interval #

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

notification_interval #

Post 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?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: notification_interval #

Post 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).
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: notification_interval #

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: notification_interval #

Post 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.
Locked