Integrating EJBCA with Azure Application Insights
The following describes how to integrate Application Insights and EJBCA. After completing the integration steps described on this page, you will be able to monitor the performance and availability of your EJBCA server.
Application Insights is an Application Performance Management (APM) service hosted in the Azure cloud platform that allows DevOps professionals to monitor live applications. By integrating Application Insights and EJBCA, administrators can monitor the performance and availability of their EJBCA servers.
Integrate EJBCA and Azure Application Insights
Java applications like EJBCA integrate with Azure Application Insights by configuring the Java Virtual Machine (JVM) to run the Application Insights agent along with the application. JVM agents can monitor the hosting environment and potentially send that information to other systems, like Application Insights.
First, sign in to the Azure portal and create an Application Insights resource, if you have not already done so. The Application Insights instance will collect and display performance and availability data for applications like EJBCA. For instructions on creating an Application Insights resource, refer to the Microsoft Docs articl e Create an Application Insights resource.
Find and copy the Connection String on the Application Insights Resource page for the created resource.
On your EJBCA server or VM, download the Application Insights agent jar file from Microsoft's GitHub server (https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.1.1/applicationinsights-agent-3.1.1.jar) and put it somewhere on your server:
curl -sLOJ https:
//github.com/microsoft/ApplicationInsights-Java/releases/download/3.1.1/applicationinsights-agent-3.1.1.jar
In the same directory that applicationinsights-agent-3.1.1.jar was saved, create an applicationinsights.json file with the contents below. Replace the connection key value with the connection string key from step 2:
{
"connectionString":"CONNECTION KEY"
}
Change the permissions on the jar and JSON files to protect the files. For example, if your application server runs as user wildfly, run the following:
chmod wildfly:wildfly applicationinsights.json applicationinsights-agent-
3.1
.1jar
Modify your application server's JVM arguments to point to the jar downloaded above. Consult your application server documentation for information on how to add JVM arguments. For example, for WildFly, add the following to the WILDFLY_HOME/bin/standalone.sh file:
JAVA_OPTS="$JAVA_OPTS -javaagent:/path/to/applicationinsights-agent-3.1.1.jar"
On Windows, edit the WILDFLY_HOME/bin/standalone.conf.bat file.
Restart your application server.
After the application server starts, open your Application Insights Resource tab on the Azure portal. It can take a few minutes for data to show up in the portal.