matt448 / nagios-checks

Custom Nagios checks
12 stars 15 forks source link

S3 file age - Should ignore the bucket folder itself, and only look for objects beneath it #2

Open ianbamforth opened 8 years ago

ianbamforth commented 8 years ago

The script does not ignore the bucket folder itself, so if the bucket is quite new then the check will pass.

For example, create a bucket to hold weekly backups. The bucket is initially empty, but has an age of zero. Checking --minfileage 168 (i.e. 7 x 24 hours) will return OK for the first 168 hours, then fail (assuming you haven't written anything).

Note that as a workaround you can use wildcards, e.g. --bucketfolder 'hourly/.+', i.e. insist on at least one character after the slash.

matt448 commented 8 years ago

Ah, interesting. I'm setting up a bucket to test this.