JVM metrics for java application running on EC2 - amazon-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

Related

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.

Application Scaling with HazelCast IMDG Open Source

I have a java application running on a single Instance EC2 server. I want to implement autoscaling in the server, but my java application will not work on active-active mode.
So, I have started looking at Hazelcast IMDG open source for Application Scaling Purpose.
I am new to Hazelcast. So, Can anyone give me the idea about How can I implement Hazelcast open source for my Application Scaling and what will be the steps?
You can deploy a Hazelcast cluster on EC2 with Auto Scaling turned on. See here for details: https://github.com/hazelcast/hazelcast-aws/blob/master/README.md

How to access mulesoft application metrics using JMX

I want to expose some custom application metrics like how many records processed to JMX in mulesoft flow.
My application is spring boot application.
Any idea on how to achieve this?
Thanks & Regards,
Vikas Gite
Using the Default JMX Support Agent
You can configure several JMX agents simultaneously using the element. When set, this element registers the following agents:
List item
JMX agent
RMI registry agent (if necessary) on rmi://localhost:1099
Remote JMX access on service:jmx:rmi:///jndi/rmi://localhost:1099/server
(Optional) Log4J JMX agent, which exposes the configuration of the Log4J instance used by Mule for JMX management
JMX notification agent used to receive server notifications using JMX notifications
(Optional) MX4J adapter, which provides web-based JMX management, statistics, and configuration viewing of a Mule instance
Also you can try below which can directly be configured under the MULE's wrapper.conf (under $MULE_HOME/conf/wrapper.conf) to enable JMX connectivity so that we can use tools like JMC (Java Mission Control), VisualVM, JConsole to pull the JMX attribute values from the Mule Server and the deployed applications -
wrapper.java.additional.<n>=-Dcom.sun.management.jmxremote
wrapper.java.additional.<n>=-Dcom.sun.management.jmxremote.port=9999
wrapper.java.additional.<n>=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.<n>=-Dcom.sun.management.jmxremote.local.only=false
wrapper.java.additional.<n>=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.<n>=-Djava.rmi.server.hostname=<localhost ip>
wrapper.java.additional.<n>=-Djava.rmi.activation.port=9998
Here should be removed with the next incremental value of the java wrapper value and will be the ip of the the Mule runtime host/server
I hope you are looking for this, if not then please post further queries or clarity so that i will help you out.

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).

Programmatic method of starting xd-admin and xd-container in spring XD

In a distributed setup, how do I programatically start containers?
More specifically, does there exist any API similar to deploying and undeploying streams for setting up and tearing down containers?
There is currently no way to do this via an API. Containers are only known to the cluster after they are started. Upon initialization, the container registers itself with ZooKeeper. Running a container requires XD to be installed on that host which is currently a manual process: download,unzip,configure, as is starting the container. Some automation of operations will likely be provided in a future release.

Resources