{"id":20541045,"url":"https://github.com/netways/check_bareos","last_synced_at":"2025-04-14T08:39:25.689Z","repository":{"id":47654671,"uuid":"42682126","full_name":"NETWAYS/check_bareos","owner":"NETWAYS","description":"Icinga Plugin to check Bareos Backup Director databases","archived":false,"fork":false,"pushed_at":"2024-10-21T15:21:23.000Z","size":91,"stargazers_count":8,"open_issues_count":1,"forks_count":7,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-27T22:11:49.006Z","etag":null,"topics":["bareos","icinga","monitoring"],"latest_commit_sha":null,"homepage":"https://www.netways.de/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NETWAYS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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-09-17T21:09:58.000Z","updated_at":"2024-12-20T06:43:50.000Z","dependencies_parsed_at":"2023-10-02T08:48:03.312Z","dependency_job_id":"a7628bd9-190a-4661-b68d-5777e6f625f2","html_url":"https://github.com/NETWAYS/check_bareos","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_bareos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_bareos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_bareos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_bareos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/check_bareos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848216,"owners_count":21171324,"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":["bareos","icinga","monitoring"],"created_at":"2024-11-16T01:19:01.373Z","updated_at":"2025-04-14T08:39:25.664Z","avatar_url":"https://github.com/NETWAYS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check_bareos\n\nIcinga Monitoring Plugin to check Bareos Backup Director databases\n\nThe plugin connects to the Bareos database in order to retrieve data.\n\n## Installation\n\nThe plugin requires at least Python 3.\n\nPython dependencies:\n\n* `psycopg2-binary`\n\n## Usage\n\n```\np check_bareos.py --help\nusage: check_bareos.py [-h] -U USER [-p PASSWORD] [-H HOST] [-P PORT] [-d DATABASE] [-v]\n                       {job,tape,status} ...\n\nCheck Plugin for Bareos Backup Status\n\npositional arguments:\n  {job,tape,status}\n    job                 Specific checks on a job\n    tape                Specific checks on a tapes\n    status              Specific status informations\n\noptions:\n  -h, --help            show this help message and exit\n\n  -U USER, --user USER  user name for the database connections\n  -p PASSWORD, --password PASSWORD\n                        password for the database connections (CHECK_BAREOS_DATABASE_PASSWORD)\n  --password-file PASSWORD_FILE\n                        path to a password file. Can be the bareos-dir.conf\n  -H HOST, --Host HOST  database host\n  -P PORT, --port PORT  database port\n  -d DATABASE, --database DATABASE\n                        database name\n  -v, --version         show program's version number and exit\n```\n\nVarious flags can be set with environment variables, refer to the help to see which flags.\n\nThe plugin supports threshold and ranges for various flags.\n\n## Job\n\nCheck the status of Bareos Jobs.\n\n```\nusage: check_bareos.py job [-h] (-js | -j | -rt) [-n NAME] [-t TIME] [-u {GB,TB,PB}] [-w WARNING]\n                           [-c CRITICAL] [-st {A,B,C,D,E,F,I,L,M,R,S,T,W,a,c,d,e,f,i,j,l,m,p,q,s,t}]\n                           [-f] [-i] [-d]\n\noptions:\n  -h, --help            show this help message and exit\n  -js, --checkJobs      Check how many jobs are in a specific state [default=queued]\n  -j, --checkJob        Check the state of a specific job [default=queued]\n  -rt, --runTimeJobs    Check if a backup runs longer then n day\n  -n NAME, --name NAME  Name of the job\n  -t TIME, --time TIME  Time in days (default=7 days)\n  -u {GB,TB,PB}, --unit {GB,TB,PB}\n                        display unit\n  -w WARNING, --warning WARNING\n                        Warning value\n  -c CRITICAL, --critical CRITICAL\n                        Critical value\n  -st {A,B,C,D,E,F,I,L,M,R,S,T,W,a,c,d,e,f,i,j,l,m,p,q,s,t}, --state {A,B,C,D,E,F,I,L,M,R,S,T,W,a,c,d,e,f,i,j,l,m,p,q,s,t}\n                        Bareos Job State [default=C]\n  -f, --full            Backup kind full\n  -i, --inc             Backup kind inc\n  -d, --diff            Backup kind diff\n```\n\n### Examples\n\nCheck if a job is running longer than 7 days (default value):\n\n```bash\ncheck_bareos.py job -rt -t 4 -st R  -w 1 -c 4\n```\n\nCheck how much jobs are in the waiting status:\n\n```bash\ncheck_bareos.py job -js -w 50 -c 100\n```\n\n## Tape\n\nCheck the status of Bareos Tapes.\n\n```\nusage: check_bareos.py tape [-h] (-e | -ts | -ex | -wex | -r) [-w WARNING] [-c CRITICAL] [-m MOUNTS]\n                            [-t TIME]\n\noptions:\n  -h, --help            show this help message and exit\n  -e, --emptyTapes      Count empty tapes in the storage (Status Purged/Expired)\n  -ts, --tapesInStorage\n                        Count how much tapes are in the storage\n  -ex, --expiredTapes   Count how much tapes are expired\n  -wex, --willExpire    Count how much tapes are will expire in n day\n  -r, --replaceTapes    Count how much tapes should by replaced\n  -w WARNING, --warning WARNING\n                        Warning value\n  -c CRITICAL, --critical CRITICAL\n                        Critical value\n  -m MOUNTS, --mounts MOUNTS\n                        Amout of allowed mounts for a tape [used for replace tapes]\n  -t TIME, --time TIME  Time in days (default=7 days)\n```\n\n### Examples\n\nCheck how much tapes are empty in the storage:\n\n```bash\ncheck_bareos.py tape -e -w 15 -c 10\n```\n\nCheck how much tapes are expired:\n\n```\ncheck_bareos.py tape -ex\n```\n\nCheck how much tapes will expire in the next 14 days;\n\n```bash\ncheck_bareos.py tape -wex -t 14 -w 10 -c 5\n```\n\n## Status\n\nCheck the status of various Bareos metrics.\n\n```\nusage: check_bareos.py status [-h] (-b | -e | -o | -fb) [-f] [-i] [-d] [-t TIME] [-w WARNING]\n                              [-c CRITICAL] [-s SIZE] [-u {MB,GB,TB,PB,EB}]\n\noptions:\n  -h, --help            show this help message and exit\n  -b, --totalBackupsSize\n                        the size of all backups in the database [use time and kind for mor\n                        restrictions]\n  -e, --emptyBackups    Check if a successful backup have 0 bytes [only wise for full backups]\n  -o, --oversizedBackup\n                        Check if a backup have more than n TB\n  -fb, --failedBackups  Check if a backup failed in the last n day\n  -f, --full            Backup kind full\n  -i, --inc             Backup kind inc\n  -d, --diff            Backup kind diff\n  -t TIME, --time TIME  Time in days\n  -w WARNING, --warning WARNING\n                        Warning value [default=5]\n  -c CRITICAL, --critical CRITICAL\n                        Critical value [default=10]\n  -s SIZE, --size SIZE  Border value for oversized backups [default=2]\n  -u {MB,GB,TB,PB,EB}, --unit {MB,GB,TB,PB,EB}\n                        display unit [default=TB]\n```\n\n### Examples\n\n\nCheck total size of all backups:\n\n```bash\ncheck_bareos.py status -b -w 400 -c 500\n```\n\nCheck total size of all full backups:\n\n```bash\ncheck_bareos.py status -b -f -w 400 -c 500\n```\n\nCheck total size of all diff backups:\n\n```bash\ncheck_bareos.py status -b -d -w 400 -c 500\n```\n\nCheck total size of all inc backups:\n\n```bash\ncheck_bareos.py status -b -i -w 400 -c 500\n```\n\nCheck if a full backup has 0 Bytes(is Empty) and trigger critical if amount of empty backups is above 10; warning if above zero\n\n```bash\ncheck_bareos.py status -e -f -w '~:0' -c 10\n```\n\nCheck if a diff/inc backup is larger than 2 TB (default value) and trigger warning if more than one is empty, critical when more than five are empty:\n\n```bash\ncheck_bareos.py status -o -d -i -w 1 -c 5\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_bareos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Fcheck_bareos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_bareos/lists"}