Java Apm agent with multiple tomcats - elasticsearch

How to configure multiple tomcats running on same machine to Apm server ? With single tomcat I m able to start APMUI.

Just to be sure we are on the same page here:
You have multiple instances of Tomcat running on the same machine.
You have configured APM through CATALINA_OPTS as defined in the Elastic APM docs.
I guess the simplest setup would be to have a wrapper script to start each Tomcat instance that exports the right CATALINA_OPTS. You could share global settings like the APM server address, but could customize the app name, namespaces,...

Related

Spring boot microservices doesn't work with Intelij IDEA

I am creating a spring boot microservice project with intelij IDEA.
Currently I have developed three seperate spring boot rest services as customer service, vehicle service and spring cloud config server. Spring cloud config server is pointing to a github repository.
The issue is sometimes above projects take more than 10 minutes to run and sometimes does't run and give an error message as "failed to check application readystate intellij attached provider for the vm is not found". I have no idea why this happens ?
There are two possible causes:
1. IntelliJ IDEA and the Spring application are running in different JVMs.
There is a bug for IntelliJ IDEA regarding that:
https://youtrack.jetbrains.com/issue/IDEA-210665
Here is short summary:
IntelliJ IDEA uses local JMX connector for retrieving Spring Boot actuator endpoint's data by default. However, it could be impossible to get local JMX connector address via attach api if Spring Boot application and IntelliJ IDEA are run by different JVMs. In this case, add the following lines to VM options of your Spring Boot run configuration:
-Dcom.sun.management.jmxremote.port={some_port}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
As mentioned in the official Oracle documentation, this configuration is insecure. Any remote user who knows (or guesses) your port number and host name will be able to monitor and control your Java applications and platform.
2. Prolonged time to retrieve local hostname
You can check that time using inetTester. Normally it should take only several milliseconds to complete. If it takes a long time then you can add the hostname returned by inetTester to /etc/hosts file like this:
127.0.0.1 localhost winsky
::1 localhost winsky

How to install apache Jmeter on PKS (pivotal-container-service)

I want to install Apache Jmeter on PKS (pivotal-container-service) for testing micro service on PCF.
I am not able to find any good resources ,did anyone tried and got success?
https://hub.docker.com/r/justb4/jmeter/
https://www.virtuallyghetto.com/2018/03/getting-started-with-vmware-pivotal-container-service-pks-part-1-overview.html
https://network.pivotal.io/products/pcfdev
Looking into Pivotal Container Service main page
Production-ready Kubernetes for the enterprise
So Pivotal Container Service seems to be using Kubernetes under the hood.
The process of installation of JMeter into Kubernetes and/or Pivotal Container Service would be as easy as creating an Image with your own Docker JMeter installation (or use any existing one) and using this image in the PCS.

JVM metrics for java application running on EC2

I have a use case to monitor the JVM metrics like(heap size,garbage collection etc) when my JAVA application is running .My application is running on EC2.
can you help me how JCONSOLE be used in EC2,or any other open source or will cloud watch help in doing this when my appication is running
Thanks
You can use AWS CloudWatch metrics to have monitoring of the instance. You can use Datadog services to have extra monitoring. You can use this document as a reference for datadog JMX integration.
If not, you can install JMX Directly on your EC2 instance

Spring integration monitor multiple jvm using same connection

I can monitor individual SPRING INTEGRATION applications via visualvm changing the command line parameters when starting the JVM (-Dcom.sun.....)
My application has components in multiple jvm's, each of which i can name.
I would like my operational console to connect per server to one JMX service via one port. Then as I add JVM's(services) they are discoverable by the operational console(lets assume its visualvm) by name.
Any help is greatly appreciated
Take a look at Jolokia I believe a single client can connect to multiple agents (you install a jolokia agent on each JVM).

Monitoring with JBOSS 7.1 JMX in ZABBIX agent windows

I have a problem when i try connect my zabbix server with JBoss 7.1, the error is:
Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.
I think the fault is in the client configuration, the agent run in windows, some know what command I need to use for change the port in run.conf.
thanks for your time.
The first thing to do is to note that in order to monitor JBoss through JMX you do not need to have Zabbix agent running. Instead, you should run Zabbix Java gateway (see also section on JMX monitoring).
However, as of Zabbix 2.2.5, the gateway only supports JMX service URLs of the following type:
service:jmx:rmi:///jndi/rmi://{CONN}:{PORT}/jmxrmi
whereas JBoss seems to be monitored using URLs of type
service:jmx:remoting-jmx://{CONN}:{PORT}
Consequently, JBoss monitoring with Zabbix is currently not possible out of the box, but you can use patches and ideas described in ZBXNEXT-1274.

Resources