Hello, I have written a PowerShell script that let me count the number of Remote Desktop sessions that are UP on a specified server. I would like this sensor to also return sessions informations such as Name and ID of the session, but it seems like Script sensors only accept numeric values.
Is there a way to show informations in string or Array format inside my sensor or my device?
Article Comments
Hello,
Thank you for your message.
Regarding what you would like to achieve, PRTG indeed only support numerical (integer, float) values which it can monitor. Nevertheless, you have the possibility to display a string in the sensor message field by following the format of your sensor: https://www.paessler.com/manuals/prtg/custom_sensors.
For the EXE/Script sensor, you can return a string with the value as follow: "<value>:<message>". However, with the EXE/Script Advanced sensor, you need to use the "text" key such as illustrated below:
<prtg>
<result>
<channel>Channel</channel>
<value>Value</value>
</result>
...
<text>STRING</text>
</prtg>
{
"prtg": {
"result": [
{
"channel": "Channel",
"value": Value
}
],
"text": "STRING"
}
}
If you have questions, do not hesitate.
Regards.
Feb, 2022 - Permalink
Hello,
Thank you for your message.
Regarding what you would like to achieve, PRTG indeed only support numerical (integer, float) values which it can monitor. Nevertheless, you have the possibility to display a string in the sensor message field by following the format of your sensor: https://www.paessler.com/manuals/prtg/custom_sensors.
For the EXE/Script sensor, you can return a string with the value as follow: "<value>:<message>". However, with the EXE/Script Advanced sensor, you need to use the "text" key such as illustrated below:
If you have questions, do not hesitate.
Regards.
Feb, 2022 - Permalink