Allow reserved JavaScript event terms (onerror, onload, onclick) in sensor names without sanitization to "***"
As a Systems Engineer configuring file monitoring in PRTG,
I want to name sensors (and reference file paths) containing the strings "onerror", "onload", or "onclick" without PRTG replacing them with "***",
so that I can monitor files whose real names contain these strings and keep sensor names that accurately identify the monitored object — without maintaining workarounds.
Background:
Currently we are unable to name anything with the words onerror, onload, or onclick as it replaces the whole string with ***. This makes it not possible to do file monitoring for some files due to the name. I would really like a way to opt out of the input sanitization for specific sensors or have a better work around for this issue. The only work around is setting up a link path to monitor the same file with a different name for name your sensor differently.
Hi there,
Thank you again for submitting your idea to Paessler. We truly appreciate you taking the time to share your feedback.
After careful consideration, we've decided to decline this idea at this time — and we want to be transparent about why.
PRTG deliberately sanitizes user input fields rendered in the web UI (object names, certain settings). Strings that look like JavaScript event handlers — onerror, onload, onclick — are replaced with *** to prevent stored cross-site scripting. This is an intentional security control, not a bug, and a global opt-out would reopen exactly that XSS vector, which is why we can't offer one.
That said, there are several ways to monitor such files today:
- Sensor name – The display name is a free label and needn't match the file name exactly. Any inserted character breaks the filter pattern: "on_error.js monitor" or "on-error handler file" works fine.
- Script sensor instead of File sensor – Use an EXE/Script Advanced (Windows probe) or SSH Script / Script v2 sensor with the path hardcoded inside the script on the probe's disk. Script content never passes through the web UI, so no sanitization applies — and the script can return existence, size, and age as channels, a functional superset of the File sensor. This is the cleanest solution.
- Wildcard in the path parameter – Where a parameter field accepts wildcards, pass on*rror.js or ?nerror.js. The forbidden literal never appears in the input field, yet PowerShell's Get-Item/Get-ChildItem resolves it unambiguously.
- Windows 8.3 short name – On NTFS volumes with 8.3 name generation enabled, dir /x reveals a short alias like ONERRO~1.JS that references the identical file without the trigger string. Note: many hardened servers have 8.3 names disabled.
- Your hardlink workaround is legitimate – mklink /h neutral-name.js onerror.js on the same volume creates a second directory entry to the same file data, so monitoring the link truly monitors the file, not a copy.
While this particular idea won't be moving forward, please don't be discouraged — your input is incredibly valuable, and we encourage you to keep sharing your ideas with us.
Thanks for your understanding and for helping us shape the future of Paessler.
Best regards,
The Paessler Product Team