I directed Harish here as a result of a support case but have managed to work out a possible solution. This is still not supported, just a suggestion of what could be done.
Given there is fairly strong documentation on writing Java plugins for Infrastructure Agent
EPAgent Java Class Plug-in Extensions - CA Application Performance Management - 10.7 - CA Technologies Documentation
I have taken a little bit of time to work on a simple plugin to gather data using Java System APIs. It also includes a random number generator which I just used to verify data was coming through, so can easily be removed
package example.epagent.plugin;
import java.io.PrintStream;
import java.util.Random;
public class OperatingSystemInfo {
public static void main(String[] args) throws Exception
{
main(args, System.out);
}
public static void main(String[] args, PrintStream out) throws Exception
{
// The key for getting operating system name
String name = "os.name";
// The key for getting operating system version
String version = "os.version";
// The key for getting operating system architecture
String architecture = "os.arch";
out.println("OSInfo:Name=" + System.getProperty(name).toString());
out.println("OSInfo:Version=" + System.getProperty(version).toString());
out.println("OSInfo:Arch=" + System.getProperty(architecture).toString());
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(10);
out.println("MyRandomNumber=" + randomInt);
out.flush();
}
}
i'm also attaching a copy of the full extension compiled with Java 1.8 and sample output of metrics and information.
Version information is more detailed (kernel) for Linux than Windows