Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.4 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.4 KB

PrtgSensorSharp

Build status

Work in progress

The goal of this project is to facilitate creation of custom PRTG sensors, especially Advanced EXE/SCRIPT Sensors.

Creating Advanced EXE/SCRIPT Sensor

More details comming soon

  1. Create new .NET console application and get PrtgSensorSharp.

  2. Write a sensor. Make sure not to print anything into console!

public class Program
{
    public static void Main()
    {
        PrtgExeScriptAdvanced.Run(() =>
        {
            // Get some cool metrics...

            return PrtgReport.Successful(new[]
            {
                new PrtgResult("Number of connected users", connectedUsers),
                new PrtgResult("Number of active users", activeUsers)
            });
        });
    } 
}
  1. Build it and put it in Custom Sensors\EXEXML directory.

  2. Create EXE/Script Advanced sensor in your PRTG instance and select the exe you just created.

  3. Enjoy some fine metrics.

To learn mroe about PRTG and creating sensors, please visit: