Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins/Huntress/* @Deenk
plugins/FantasyPremierLeague/* @TimWheeler-SQUP
plugins/GoogleSheets/* @kieranlangton
plugins/MetOffice/* @blackgrouse
/plugins/PRTG/ @Deenk
plugins/Phare/* @vinbab
plugins/Postcoder/* @richbenwell
plugins/RDAP/* @richbenwell
Expand Down
4 changes: 3 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"rdap",
"whois",
"rootly",
"UniFi"
"UniFi",
"PRTG",
"Paessler"
]
}
11 changes: 11 additions & 0 deletions plugins/PRTG/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "systemStatus" },
"required": true,
"error": "Could not connect to PRTG. Check the PRTG URL is reachable from SquaredUp, and that the API key is correct and has not been deleted.",
"success": "Connected to PRTG successfully."
}
]
}
30 changes: 30 additions & 0 deletions plugins/PRTG/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"name": "Probe",
"sourceType": "Probe",
"icon": "tower-broadcast",
"singular": "Probe",
"plural": "Probes"
},
{
"name": "Group",
"sourceType": "Group",
"icon": "sitemap",
"singular": "Group",
"plural": "Groups"
},
{
"name": "Device",
"sourceType": "Device",
"icon": "server",
"singular": "Device",
"plural": "Devices"
},
{
"name": "Sensor",
"sourceType": "Sensor",
"icon": "gauge",
"singular": "Sensor",
"plural": "Sensors"
}
]
183 changes: 183 additions & 0 deletions plugins/PRTG/v1/dataStreams/containerDevices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"name": "containerDevices",
"displayName": "Devices in Probe or Group",
"description": "Devices beneath a probe or group, with status, host address and sensor counts by state",
"tags": [
"Infrastructure",
"Status"
],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "table.json",
"getArgs": [
{
"key": "content",
"value": "devices"
},
{
"key": "id",
"value": "{{object.rawId}}"
},
{
"key": "columns",
"value": "objid,name,parentid,probe,group,host,status,active,tags,location,icon,totalsens,upsens,downsens,warnsens,pausedsens"
},
{
"key": "sortby",
"value": "objid"
},
{
"key": "count",
"value": "50000"
}
],
"pathToData": "devices",
"paging": {
"mode": "none"
}
},
"matches": {
"sourceType": {
"type": "oneOf",
"values": [
"Probe",
"Group"
]
}
},
"metadata": [
{
"name": "objid",
"displayName": "ID",
"shape": "string",
"role": "id"
},
{
"name": "name",
"displayName": "Device",
"shape": "string",
"role": "label"
},
{
"name": "parentid",
"displayName": "Parent ID",
"shape": "string",
"visible": false
},
{
"name": "probe",
"displayName": "Probe",
"shape": "string"
},
{
"name": "group",
"displayName": "Group",
"shape": "string"
},
{
"name": "host",
"displayName": "Host",
"shape": "string"
},
{
"name": "status",
"displayName": "Status",
"shape": [
"state",
{
"map": {
"success": [
"Up"
],
"warning": [
"Warning",
"Unusual"
],
"error": [
"Down",
"Down (Partial)",
"Down (Acknowledged)",
"No Probe",
"Not Connected"
],
"unknown": [
"Unknown",
"None",
"Scanning"
],
"unmonitored": [
"Paused",
"Paused by User",
"Paused by Dependency",
"Paused by Schedule",
"Not Licensed",
"Paused until"
]
}
}
]
},
{
"name": "status_raw",
"displayName": "Status Code",
"shape": "number",
"visible": false
},
{
"name": "statusText",
"displayName": "Status Text",
"computed": true,
"shape": "string",
"valueExpression": "{{ ({0:'None',1:'Unknown',2:'Scanning',3:'Up',4:'Warning',5:'Down',6:'No Probe',7:'Paused',8:'Paused',9:'Paused',10:'Unusual',11:'Not Licensed',12:'Paused',13:'Down (Acknowledged)',14:'Down (Partial)'})[Number($['status_raw'])] || 'Unknown' }}"
},
{
"name": "totalsens_raw",
"displayName": "Total Sensors",
"shape": "number",
"role": "value"
},
{
"name": "upsens_raw",
"displayName": "Up Sensors",
"shape": "number"
},
{
"name": "downsens_raw",
"displayName": "Down Sensors",
"shape": "number"
},
{
"name": "warnsens_raw",
"displayName": "Warning Sensors",
"shape": "number"
},
{
"name": "pausedsens_raw",
"displayName": "Paused Sensors",
"shape": "number"
},
{
"name": "location_raw",
"displayName": "Location",
"shape": "string"
},
{
"name": "tags",
"displayName": "Tags",
"shape": "string"
},
{
"name": "icon",
"displayName": "Icon",
"shape": "string",
"visible": false
},
{
"name": "active",
"displayName": "Monitoring Active",
"shape": "boolean"
}
],
"timeframes": false
}
Loading
Loading