{"id":23040875,"url":"https://github.com/ascentis/prtg-custom-rest-sensor-templates","last_synced_at":"2025-04-03T00:24:18.607Z","repository":{"id":144158568,"uuid":"436368439","full_name":"Ascentis/prtg-custom-rest-sensor-templates","owner":"Ascentis","description":"PRTG custom REST sensor templates","archived":false,"fork":false,"pushed_at":"2022-06-06T02:49:48.000Z","size":40,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T14:44:43.512Z","etag":null,"topics":["freenas","monitoring-tool","prtg","prtg-custom-sensor","truenas"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ascentis.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-12-08T19:30:09.000Z","updated_at":"2023-12-13T12:13:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"485d979f-3d8b-4853-9723-12b9576b4c8e","html_url":"https://github.com/Ascentis/prtg-custom-rest-sensor-templates","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/Ascentis%2Fprtg-custom-rest-sensor-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ascentis%2Fprtg-custom-rest-sensor-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ascentis%2Fprtg-custom-rest-sensor-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ascentis%2Fprtg-custom-rest-sensor-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ascentis","download_url":"https://codeload.github.com/Ascentis/prtg-custom-rest-sensor-templates/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246913024,"owners_count":20853966,"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":["freenas","monitoring-tool","prtg","prtg-custom-sensor","truenas"],"created_at":"2024-12-15T19:19:54.028Z","updated_at":"2025-04-03T00:24:18.599Z","avatar_url":"https://github.com/Ascentis.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prtg-custom-rest-sensor-templates\nPRTG custom REST sensor templates\n\nThis repository contains a collection of .template files used within the PRTG monitoring platform that allow to parse REST calls and map to PRTG sensor-channels.\n\nCurrent collections:\n\nTrueNAS monitoring for:\n\n* Pool health\n* Pool disks health (each disk and summary of all disks) (1)\n* Pool free space (percentage free space, \"logical\" and \"physical\") (2)\n* Replication health\n\n## Notes\n\n(1) Disk health sensor creates a subchannel per disk. Please notice that PRTG supports a max of 50 sub channels. Any number of channels over that will cause the sensor to be in a failed state\n\n(2) Physical free space uses metrics from TrueNAS that report snapshot utilization. Logical free space is based on each volume within the pool, which in aggregate appear not to take into account snapshot utilization.\n\n## Resources\n\nPRTG custom sensor documentation: https://www.paessler.com/manuals/prtg/custom_sensors#advanced_sensors\n\nPRTG REST custom sensor documentation: https://www.paessler.com/manuals/prtg/rest_custom_sensor#jsonpath\n\nJSONPath online evaluator: https://jsonpath.com\n\nPRTG has a very useful tool to test the custom REST template files. This utility makes the specified REST call and then processes the JSON result using it's own JSONPath library with the template specified. This tool uses the same logic as PRTG internally so the result of the rest.exe execution will match an execution done from within PRTG vs. the online JSONPath parsing tool which has limited support for how PRTG processes custom REST sensors.\n\nExample usage of rest.exe utility contained within PRTG to test REST custom sensors:\n\nWithin PowerShell or Windows cmd, cd until you get to ```C:\\Program Files (x86)\\PRTG Network Monitor\\Sensor System```\nUse the ```rest.exe``` contained within that folder in the following way:\n\n```\n.\\rest.exe http://\u003cIP Address of TrueNAS\u003e/api/v2.0/pool \"..\\Custom Sensors\\rest\\truenas.generic.pool.freespace.template\" -customheaders \"Authorization:\u003cYour TrueNAS Authorhization token\u003e\"\n```\n\nYou should see a response like this in the console:\n\n```json\n{\n  \"prtg\": {\n    \"result\": [\n      {\n        \"channelid\": 0,\n        \"Value\": 169,\n        \"Unit\": \"TimeResponse\",\n        \"ShowChart\": 0,\n        \"ShowTable\": 0\n      },\n      {\n        \"channel\": \"USMacProRAIDZ\",\n        \"Value\": 39.1587156010425,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"default\",\n        \"Value\": 98.34172341131395,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"FileSharePool\",\n        \"Value\": 99.99491070944165,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"mvdmacproraidzpool\",\n        \"Value\": 42.04015769357756,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"MVDRAIDZS2DPOOL\",\n        \"Value\": 96.6840416973174,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"MVDSQLBackups\",\n        \"Value\": 99.99959606150682,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"USRaidZPool\",\n        \"Value\": 77.42501135271881,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      },\n      {\n        \"channel\": \"DFSStorageTest\",\n        \"Value\": 99.77613879788306,\n        \"Unit\": \"Percent\",\n        \"Float\": 1,\n        \"LimitMinWarning\": 10,\n        \"LimitMinError\": 5,\n        \"LimitMode\": 1\n      }\n    ]\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascentis%2Fprtg-custom-rest-sensor-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascentis%2Fprtg-custom-rest-sensor-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascentis%2Fprtg-custom-rest-sensor-templates/lists"}