We use a Driver Health Job to execute an ECMAscript when a driver is stopped or started. But I'm not able to 'get' which driver actually started the ECMAscript.

From the health driver configuration you can only select the ECMAscript resource object you want to execute but you cannot add any variables you want to pass on the the ECMAscript.

I have managed to get the hostname by using the getHostNamefunction in NOVELLIBAJC-JS. is there something similar to get the OBJECT or drivername?

function getHostname()
{
try
{
return java.net.InetAddress.getLocalHost().toString();
}
catch (uh)
{
return String(uh);
}
}