I want to add a sensor with the custom script option but I would like to know Whether or not the file to be loaded for the sensor can generate a file from time to time on the server's desktop within that code?

I want you to extract the data from the configured sensor and this data is the content of the file to generate on the desktop .txt


Article Comments

Dear Oscar,

Sure, you simply need to insert the code for the file output into the script. With every sensor run, you can therefore write a txt file on your system.

Another option would be to enable the Write Result to Disk option in the sensor. The output will then be stored in the directory ProgramData\Paessler\PRTG Network Monitor\Logs\sensors.


Kind regards,
Felix Saure, Tech Support Team


May, 2020 - Permalink

¿Me podrías indicar? ¿Dónde esta la opción para Habilitar? Escribir resultado en disco estoy con la versión 20.1.57.1745 Y SÍ de casualidad tienes un script a manera de ejemplo con la parte que escribía un archivo generado cada vez que el sensor sea censado por PRTG Monitor Ayudaría mucho puesto que no he llegado a esa parte de encontrar la sintaxis aquí estoy intentando un script con los DEMO de PowerShell y .bat.

Could you tell me? Where is the option to Enable? Write result to disk I am with version 20.1.57.1745 AND YES by chance has a script in an example way with the part that writes a generated file every time the sea sensor censored by PRTG Monitor It would help a lot since it didn't get to that part of finding the syntax here I am trying a script with the PowerShell and .bat DEMOs.

Thank you so much for everything


May, 2020 - Permalink

Hello Oscar,

The write result to disk option is located in the settings of the custom sensor you try to create. For PowerShell, the OutFile syntax should help: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-file?view=powershell-7


Kind regards,
Felix Saure, Tech Support Team


May, 2020 - Permalink