{"id":30703297,"url":"https://github.com/blind-oracle/zabbix-zfs","last_synced_at":"2025-09-02T16:58:45.734Z","repository":{"id":42633788,"uuid":"334495184","full_name":"blind-oracle/zabbix-zfs","owner":"blind-oracle","description":"Zabbix template \u0026 script to monitor ZFS on Linux","archived":false,"fork":false,"pushed_at":"2025-02-15T02:42:28.000Z","size":53,"stargazers_count":32,"open_issues_count":5,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-15T03:24:33.244Z","etag":null,"topics":["linux","monitor","openzfs","template","zabbix","zfs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blind-oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2021-01-30T19:32:11.000Z","updated_at":"2025-02-15T02:42:33.000Z","dependencies_parsed_at":"2025-02-15T03:22:05.554Z","dependency_job_id":"9ff03160-3c16-40c3-9b24-71611ac09e04","html_url":"https://github.com/blind-oracle/zabbix-zfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blind-oracle/zabbix-zfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fzabbix-zfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fzabbix-zfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fzabbix-zfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fzabbix-zfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blind-oracle","download_url":"https://codeload.github.com/blind-oracle/zabbix-zfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fzabbix-zfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273317755,"owners_count":25084037,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["linux","monitor","openzfs","template","zabbix","zfs"],"created_at":"2025-09-02T16:58:35.275Z","updated_at":"2025-09-02T16:58:45.720Z","avatar_url":"https://github.com/blind-oracle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zabbix-zfs\r\n\r\nZabbix template \u0026 script to monitor ZFS on Linux.\r\n\r\nSingle Python script that emits all information needed for discovery \u0026 data gathering in a single JSON.\r\nAll items are defined as `Dependent` and extract relevant data using JSONPath queries.\r\n\r\n\u003cdetails\u003e\r\n    \u003csummary\u003eClick to expand JSON example\u003c/summary\u003e\r\n\r\n```json\r\n{\r\n  \"vdevs\": {\r\n    \"/dev/sda1\": {\r\n      \"name\": \"/dev/sda1\",\r\n      \"size\": 0,\r\n      \"alloc\": 0,\r\n      \"free\": 0,\r\n      \"frag\": 0,\r\n      \"usage\": 0,\r\n      \"online\": 1,\r\n      \"errors\": {\r\n        \"read\": 0,\r\n        \"write\": 0,\r\n        \"cksum\": 0\r\n      }\r\n    }\r\n  },\r\n\r\n  \"pools\": {\r\n    \"pool1\": {\r\n      \"name\": \"pool1\",\r\n      \"size\": 11957188952064,\r\n      \"alloc\": 4227267283968,\r\n      \"free\": 7729921668096,\r\n      \"frag\": 5,\r\n      \"usage\": 35,\r\n      \"dedup\": 1.0,\r\n      \"scrub\": 0,\r\n      \"resilver\": 0,\r\n      \"online\": 1\r\n    }\r\n  },\r\n\r\n  \"datasets\": {\r\n    \"pool1\": {\r\n      \"name\": \"pool1\",\r\n      \"avail\": 5502826989670,\r\n      \"used\": 3162194032538,\r\n      \"compress\": 1.05,\r\n      \"referenced\": 38300\r\n    }\r\n  },\r\n\r\n  \"arc\": {\r\n    \"l1\": {\r\n      \"size\": 5398891600,\r\n      \"hitrate\": 91.56803867935483,\r\n      \"free\": 458843264\r\n    },\r\n    \"l2\": {\r\n      \"usage\": 142278352384,\r\n      \"usage_actual\": 137375770112,\r\n      \"hitrate\": 94.00152633863829,\r\n      \"bytes_read\": 241515501568,\r\n      \"bytes_written\": 25932241920,\r\n      \"io_error\": 0,\r\n      \"cksum_bad\": 0\r\n    }\r\n  },\r\n\r\n  \"slab\": 291337024\r\n}\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n## Features\r\n\r\n- Low level discovery of:\r\n  - Pools\r\n  - Datasets\r\n  - Devices\r\n  - L2ARC - items will be created only if it's present\r\n- Items:\r\n  - Pools: health, disk usage, fragmentation, deduplication, scrub, resilver\r\n  - Datasets: disk usage, compression ratio\r\n  - Devices: health, disk usage, error counts, fragmentation\r\n  - SLAB usage\r\n  - L1 \u0026 L2 ARC stats\r\n- Triggers:\r\n  - Pool \u0026 device health\r\n  - Pool \u0026 dataset disk usage\r\n  - High fragmentation\r\n  - ARC usage\r\n  - L2ARC errors \u0026 low hit rate\r\n  - Scrub\r\n  - Resilver\r\n- Zabbix agent passive checks. Can be converted to active if needed.\r\n\r\n## Macros\r\n\r\n- `{$ZFS_DS_EXCLUDE}` - Regexp to exclude the datasets during discovery\r\n- `{$ZFS_DS_INCLUDE}` - Regexp to include the datasets during discovery\r\n- `{$ZFS_DS_USAGE_CRIT}` - Dataset usage in % when crit alert is triggered\r\n- `{$ZFS_DS_USAGE_HIGH}` - Dataset usage in % when high alert is triggered\r\n- `{$ZFS_POOL_EXCLUDE}` - Regexp to exclude the pools during discovery\r\n- `{$ZFS_POOL_INCLUDE}` - Regexp to include the pools during discovery\r\n- `{$ZFS_POOL_FRAG_HIGH}` - Pool fragmentation in % when high alert is triggered\r\n- `{$ZFS_POOL_USAGE_CRIT}` - Pool usage in % when crit alert is triggered\r\n- `{$ZFS_POOL_USAGE_HIGH}` - Pool usage in % when high alert is triggered\r\n- `{$ZFS_VDEV_ERROR_THRESHOLD}` - vdev and L2ARC error threshold when triggers fire\r\n- `{$ZFS_VDEV_EXCLUDE}` - Regexp to exclude the vdevs during discovery\r\n- `{$ZFS_VDEV_INCLUDE}` - Regexp to include the vdevs during discovery\r\n- `{$ZFS_ARC_META_THRESHOLD}` - Alert when ARC meta usage % goes over this value\r\n- `{$ZFS_L2ARC_ERROR_THRESHOLD}` - Error threshold for L2ARC errors\r\n- `{$ZFS_L2ARC_HITRATE_THRESHOLD}` - Alert when L2ARC hit rate falls below this value\r\n\r\n## Requirements\r\n\r\n- Tested on OpenZFS 2.x, maybe will work with 0.8.x\r\n- Tested on Zabbix 6.0, but should work on 4.2+\r\n- Python3\r\n\r\n## Installation\r\n\r\n- Place `zfs.conf` in `/etc/zabbix/zabbix_agentd.d`\r\n- Place `zfs.py` in `/etc/zabbix/scripts`\r\n  You can put it into any other place, but then you'll have to adjust `zfs.conf`\r\n- Restart `zabbix-agentd`\r\n- Import `template_zfs.xml`\r\n- You're good to go\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblind-oracle%2Fzabbix-zfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblind-oracle%2Fzabbix-zfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblind-oracle%2Fzabbix-zfs/lists"}