Stackdriver - monitor multiple JMX - jmx

I'm trying to configure google stackdriver to monitor multiple JVM instances on same machine by using this plugin: https://cloud.google.com/monitoring/agent/plugins/jvm
I created two block with different ServiceURL ports (for different JMXs) and different InstancePrefix ("jvm" and "jvm2") like it described here: https://collectd.org/wiki/index.php/Plugin:GenericJMX
But I still don't see second jvm in metrics-explorer.

Unfortunately, this kind of configuration is not currently supported by the Stackdriver monitoring agent. The suggested workaround is to use Custom Metrics.

Related

How to collect messages (total number and size) between microservices?

I have a microservices based software architecture.
There is a php application which orchestrates the communication among microservices and the application's whole logic.
I need to simulate the communication between microservices as a graph.
There will be edges with weights , which will represent the affinities between microservices.
I am searching for a tool in order to collect all messages and their size.
I have read that there are distibuted tracing systems like Zipkin which i have already deployed, and could accomplish this task.
But, i cannot find how to collect the messages i want.
This is the php library i used for the instrumentation of my app
[https://github.com/openzipkin/zipkin-php]
Any ideas about other tools or how to use Zipkin differently to achieve my goal?
Let me add to this thread my three bits. Speaking of Envoy, yes, when attached to your application it adds a lot of useful features from observability bucket, e.g. network level statistics and tracing.
Here is the question, have you considered running your legacy apps inside service mesh, like Istio ?.
Istio simplifies deployment and configuration of Envoy for you. It injects sidecar container (istio-proxy, in fact Envoy instance) to your Pod application, and gives you these extra features like a set of service metrics out of the box*.
Example: Stats produced by Envoy in Prometheus format, like istio_request_bytes are visualized in Kiali Metrics dashboard for inbound traffic as request_size (check screenshot)
*as mentioned by #David Kruk, you still needs to have Prometheus server deployed in your cluster to be able to pull these metrics to Kiali dashboards.
You can learn more about Istio here. There is also a dedicated section on how to visualize metrics collected by Istio (e.g. request size).

Prometheus Metrics to StackDriver Monitoring

We need to monitor the Neo4j hosted in GCP VM's instance for which we are using Prometheus. Neo4j Natively supports sending metrics to Prometheus.
Now we need to create a dashboard using the stack driver monitoring with the exposed prometheus metrics.
Any suggestions/help will be useful.
Thanks in advance !!
Well, I tried to find something elaborated about this particular scenario but all I found was related with GKE and prometheus as a sidecar. However, the configuration must be similar and probably you will find this documentation useful. This guide will also lead you to this official documentation.
Also found another user of neo4j trying to do something similar and there is an answer that maybe you should check. For logging neo4j to Stackdriver Logging, see this.

Monitoring agent

I have a requirement where in I need to monitor some custom services on aws nodes and collect metrics in timeseries. There are specifically two use cases. One being the monitoring of hardware resources like cpu, mem, disk util etc and the other being monitoring service specific metrics.
While reading up I came across collectd as one of the open source option. However I wanted to know how I can use collectd to monitor service specific metrics. Does collectd expose APIs which the service can use to log the metrics and if yes how performant is it.
I am new to collectd & would like to know if there are any other open source options as well.
The collectd agent can monitor custom metrics using read plugins:
Exec plugin for custom metrics fetched with bash scripts
cURL-JSON for metrics published in JSON format via HTTP

Zabbix integration with prometheus

We are currently monitoring our network devices with Zabbix but now we want to use Zabbix along with Prometheus for real-time monitoring and powerful alerting of Prometheus.
How can I integrate my existing Zabbix solution with Prometheus?
There seems to be a Zabbix to Prometheus exporter that may achieve what you want, but please note that I wouldn't recommend that.
Apart from some temporary migration scenarios I see little use in polling one monitoring system from the other. You're probably better off deploying the appropriate Prometheus exporters (e.g. SNMP, if your talking about network devices) and use Prometheus for the whole monitoring setup.
Of course you can still keep your Zabbix setup running side by side, if you need to.

Java app performance counters viewed in Perfmon

I have a Java app running on Tomcat, and I would like to monitor counters using Windows Performance Monitor. Is this possible using a JMX adapter for the Java MBeans or by some other means?
The following tutorial might be of use:
http://www.developer.com/java/ent/article.php/3087741/Hooking-to-PerfMon-from-Java.htm
It shows how a Java application defines a custom counter that can be monitored in Perfmon. It basically boils down to using an extension DLL to the performance monitor and communicating with that via a memory mapped file. You could then hook your JMX counters into a similar mechanism so that they can be monitored from Perfmon.
Since you tagged this with JMX and MBeans, I assume your counters are accessible from a Java MBean. If so you could use jconsole, provided with the Java SDK, to monitor the counters. Once you find your MBean in the MBeans tab, double click on the value and it will draw a nice line graph for easy monitoring.
See JConsole Guide for more info.
This seems to be exactly what you're looking for, but it's not free:
http://www.adventnet.com/products/snmpadaptor/faqs/general.html
If you want to do this programatically, you can create a JMXConnection to the machine, then accessing the MBeans from there. We did this ourselves for a function test that involved keeping track of the number of threads in the application, which there's a counter for that you can access through JMX. If you want nice graphs and things like that I suggest using JConsole, as mentioned above. There's also a program called JProfiler that works like JConsole on steroids, basically. There's a free trial so you can try it out.
This article outlines how to access Windows PerfMon stats from Java and expose them as MBean attributes through JMX.

Resources