{"id":21735258,"url":"https://github.com/chicks-net/check-s3-file-age","last_synced_at":"2025-07-14T09:37:25.435Z","repository":{"id":31361378,"uuid":"34924270","full_name":"chicks-net/check-s3-file-age","owner":"chicks-net","description":"nagios check for AWS S3 file age","archived":false,"fork":false,"pushed_at":"2024-06-17T13:47:04.000Z","size":29,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T19:36:58.755Z","etag":null,"topics":["aws-s3","file-modification-time","nagios","nagios-plugins","perl"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chicks-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-01T21:13:42.000Z","updated_at":"2024-06-17T13:47:07.000Z","dependencies_parsed_at":"2024-11-26T05:12:47.342Z","dependency_job_id":"a2670bf4-be9f-4b27-ab6c-7e8468db2887","html_url":"https://github.com/chicks-net/check-s3-file-age","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicks-net%2Fcheck-s3-file-age","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicks-net%2Fcheck-s3-file-age/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicks-net%2Fcheck-s3-file-age/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chicks-net%2Fcheck-s3-file-age/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chicks-net","download_url":"https://codeload.github.com/chicks-net/check-s3-file-age/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654038,"owners_count":21140235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-s3","file-modification-time","nagios","nagios-plugins","perl"],"created_at":"2024-11-26T05:12:36.993Z","updated_at":"2025-04-13T01:52:18.520Z","avatar_url":"https://github.com/chicks-net.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check-s3-file-age\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9121/badge)](https://www.bestpractices.dev/projects/9121)\n[![GPLv2 license](https://img.shields.io/badge/License-GPLv2-blue.svg)](https://github.com/chicks-net/check-s3-file-age/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/chicks-net/check-s3-file-age/graphs/commit-activity)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)\n\nnagios check for age of a specific file in AWS S3\n\n## usage\n\n\tcheck_s3_file_age v0.5 (nagios-plugins 2.0.3)\n\tThe nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\tcopies of the plugins under the terms of the GNU General Public License.\n\tFor more information about these matters, see the file named COPYING.\n\tCopyright (c) 2015 Christopher Hicks\n\n\tUsage:\n\t  check_s3_file_age [-w \u003csecs\u003e] [-c \u003csecs\u003e] [-W \u003csize\u003e] [-C \u003csize\u003e] [-i] [-k \u003caccess-key\u003e] [-s \u003csecret-key\u003e] -n \u003cbucket-name\u003e -f \u003cfile\u003e\n\t  check_s3_file_age [-h | --help]\n\t  check_s3_file_age [-V | --version]\n\n\t  -i | --ignore-missing :  return OK if the file does not exist\n\t  \u003csecs\u003e  File must be no more than this many seconds old (default: warn 240 secs, crit 600)\n\t  \u003csize\u003e  File must be at least this many bytes long (default: crit 0 bytes)\n\t  \u003caccess-key\u003e is optional if you have the environment variable AWS_ACCESS_KEY defined\n\t  \u003csecret-key\u003e is optional if you have the environment variable AWS_SECRET_KEY defined\n\n## examples\n\nLook in `s3bucket` for a file named `foo`.  Warn if the file is smaller than 100000 bytes\nand go critical if the file is less than 50.\n\n\tcheck_s3_file_age.pl -n s3bucket -f foo -W 100000 -C 50\n\nLook in `s3bucket` for a file named `foo`.  \nGo critical if the file is less than 50000000 bytes.\nAlso warn if the file is older than 6 days\nand go critical if the file is older than 8 days.\n\n\tcheck_s3_file_age.pl -n s3bucket -f foo -C 50000000 -w 6d -c 8d\n\n## requirements\n\n* Perl modules\n    * [Net::Amazon::S3](https://metacpan.org/release/Net-Amazon-S3) (debian package`libnet-amazon-s3-perl`)\n    * `utils.pm` from [nagios-plugins.org](https://github.com/nagios-plugins/nagios-plugins)\n\n## acknowledgements\n\n* [Matthew McMillan](http://matthewcmcmillan.blogspot.com/2013/05/monitor-s3-file-ages-with-nagios.html) wrote [check_s3_file_age.py](https://github.com/matt448/nagios-checks) but it does not check one specific file -- it looks at a directory of files.\n* [Hari Sekhon's](http://exchange.nagios.org/directory/Plugins/Cloud/check_aws_s3_file-2Epl-%28Advanced-Nagios-Plugins-Collection%29/details) [check_aws_s3_file.pl](https://github.com/harisekhon/nagios-plugins/blob/master/check_aws_s3_file.pl) looks at one specific file, but it does not check file age.\n* Opsview's [check_aws_s3](https://secure.opsview.com/svn/opsview/trunk/opsview-core/nagios-plugins/check_aws_s3) checks a bucket and not a file\n\n## see also\n\n* [check_read_only_fs](https://github.com/chicks-net/nagios-current/tree/master/plugins) - checks for readonly filesystems\n* [nagios-current](https://github.com/chicks-net/nagios-current/) - automatically restart nagios when configs change\n* [nagios-plugins.org](https://github.com/nagios-plugins/nagios-plugins)\n* [exchange.icinga.com](https://exchange.icinga.com/chicks/check-s3-file-age) - this module registered\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchicks-net%2Fcheck-s3-file-age","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchicks-net%2Fcheck-s3-file-age","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchicks-net%2Fcheck-s3-file-age/lists"}