Hi Patrike,
I'm trying to write a custom C# Script that sends a "reboot by IP" request. What is the way to get the host IP of a host that has triggered a Rule? Is it included in List?
I need to run a Script like this:
using System.Text;
using System.Net;
using System.Collections.Specialized;
public class ActionScript
{
private ContextProvider Context = ScriptManager.Context;
public bool Execute(List list)
{
foreach (var miner in list)
{
String ipToReset = // I need the IP of the miner that has triggered the rule or its host name
using (var wb = new WebClient())
{
var response = wb.DownloadString("http://xxx.xxx.xxx.xxx:xxx/?IP=" + ipToReset + "&RESET=");
}
}
return true;
}
}