Skip to content

Commit

Permalink
fix broken monthly_warn monthly_crit in sanoid.defaults.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsalterjrs authored Dec 14, 2018
1 parent 1019cc5 commit dc4df15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sanoid.defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ daily_warn = 28
daily_crit = 32
weekly_warn = 0
weekly_crit = 0
monthly_warn = 5
monthly_crit = 6
monthly_warn = 32
monthly_crit = 40
yearly_warn = 0
yearly_crit = 0

Expand Down

10 comments on commit dc4df15

@phreaker0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimsalterjrs mhm, did you ran into actual problems? Because the smaller period interval changed due introduction of weekly snapshot types, therefore I also adapted the defaults to be near the same. So monthly_warn = 5 actually means 5 weeks old, and monthly_crit = 6 means 6 weeks old. From the code:

if ($type eq 'frequently') { $smallerperiod = 1; }
elsif ($type eq 'hourly') { $smallerperiod = 60; }
elsif ($type eq 'daily') { $smallerperiod = 60*60; }
elsif ($type eq 'weekly') { $smallerperiod = 60*60*24; }
elsif ($type eq 'monthly') { $smallerperiod = 60*60*24*7; }
elsif ($type eq 'yearly') { $smallerperiod = 60*60*24*31; }

@jimsalterjrs
Copy link
Owner Author

@jimsalterjrs jimsalterjrs commented on dc4df15 Dec 15, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phreaker0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will investigate then.

@phreaker0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimsalterjrs As I was running with the patches and monitoring for over half a year without the issue, can you provide me with your time zone? Especially the corresponding symlink on your system:
ls -l /etc/localtime

@jimsalterjrs
Copy link
Owner Author

@jimsalterjrs jimsalterjrs commented on dc4df15 Dec 15, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phreaker0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I changed it for consistency while introducing weeklies, because all the other ones also used the next smaller interval type for the calculation.

@redmop
Copy link
Contributor

@redmop redmop commented on dc4df15 Dec 16, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimsalterjrs
Copy link
Owner Author

@jimsalterjrs jimsalterjrs commented on dc4df15 Dec 16, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@redmop
Copy link
Contributor

@redmop redmop commented on dc4df15 Dec 16, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phreaker0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR landed #306

Please sign in to comment.