i am trying to get availability of my dbase with PS script but i cant work get the right status. using the Custom EXE/Script Sensor and "tnc -computername <my SQL servername > -port 1433" what am i missing ? thanks Marcus


Article Comments

I am trying to do a simple test net connection and return an uptime or downtime response to my Custom EXE sensor.

I cant see any examples of how to get this to work.

My PS script is simply -

"test net connection -computername <my SQL servername > -port 1433" which then returns a value true or false value.

how do i tell the sensor which state to show?

thanks


Jul, 2022 - Permalink

Hello Marcus,

You must need to configure output definition as it's defined in the following manual https://www.paessler.com/manuals/prtg/custom_sensors#standard_exescript
Addionally, you need to check what is the current output of this script and you need to use the write output accordingly.


Jul, 2022 - Permalink

Ok thank you , we have managed to get this working now.


Jul, 2022 - Permalink

Hello Marcus,

It's glad to know that it works!


Jul, 2022 - Permalink