Skip to content

PRTG inline registration — ad-hoc credentials per deployment

Variant 2 is the lightweight sibling of Variant 3 (PrtgConnection): RSGO registers itself as a PRTG device on Running and cleans up on remove, but URL + token live on the deployment rather than in a central connection.

On the Deployment Detail page (/deployments/<id>) the “PRTG monitoring” card has two tabs:

  • Saved connection — picks from Variant 3 connections (docs)
  • Inline (ad-hoc) — this variant

The inline tab on the deployment detail page — fields identical to the saved-connection variant, only persisted per deployment instead of centrally:

Inline tab of the PRTG monitoring card with URL/token/Template-Device-ID/Verify-TLS fields and Save/Clear buttons

In the inline tab you fill in:

FieldValue
URLhttps://prtg.example.local
API token / passhashPRTG passhash or API token
Template Device IDPRTG device id RSGO clones (empty = auto-register off)
Verify TLS certificateUncheck for self-signed certs

Save inline stores the credentials encrypted on the ProductDeployment. Any saved-connection link is cleared at the same time — only one PRTG target can be active.

Terminal window
# Set inline registration
curl -X PUT https://rsgo.local/api/deployments/<deployment-id>/prtg-inline \
-H "X-Api-Key: rsgo_..." \
-H "Content-Type: application/json" \
-d '{
"id": "<deployment-id>",
"url": "https://prtg.example.local",
"apiToken": "PRTG_TOKEN_123",
"templateDeviceId": 4221,
"verifyTls": false
}'
# Clear (url: null)
curl -X PUT https://rsgo.local/api/deployments/<deployment-id>/prtg-inline \
-H "X-Api-Key: rsgo_..." \
-H "Content-Type: application/json" \
-d '{"id":"<deployment-id>","url":null,"verifyTls":true}'

Same flow as Variant 3 — only the credential source differs:

EventRSGO callsSource
Runningduplicateobject.htm + pause.htm?action=1Inline URL + decrypted token + inline template id
Removed / Supersededdeleteobject.htmSame inline data

The resolver (PrtgRegisterDeviceOnCompletedHandler.ResolvePrtgTarget) prefers a saved connection when both are set — in practice that never happens because “Save inline” clears the connection and vice versa.

  • Token encrypted at rest with the same ICredentialEncryptionService as every other credential in RSGO.
  • Token never in read DTOsHasInlinePrtgApiToken: bool is the only indicator that one is set.
  • TLS verify per deployment (handy for customer-PRTG with self-signed certs).
  • Best-effort: a PRTG outage doesn’t break the RSGO deploy, it logs a warning.

You can flip back and forth any time:

  • V2 → V3: create a connection in Settings → detail page → tab “Saved connection” → pick from dropdown → Save. Clears the inline data.
  • V3 → V2: detail page → tab “Inline” → fill in URL/token/template → Save inline. Clears the connection link.

Switching does not delete the existing PRTG device — that happens on the next Removed/Superseded event. Delete it manually in PRTG if you want it gone immediately.