IBM Message Gateway monitoring with Instana

  1. Use the REST interface — This would give the richest access to the information being captured but would require polling of the REST API
  2. Consume the metrics published by the server by subscribing to the $SYS topic — This would use the pub/sub model which aligns with the purpose of MQTT and the IBM Message Gateway
  1. Data is published every 2 seconds which may be a bit to frequent so some form of rate limiting when pushing to Instana could be needed
  2. A lot of the metrics are cumulative since the last restart and so looking for delta changes would require additional programming.
com.instana.plugin.statsd:
enabled: true
ports:
udp: 8125
mgmt: 8126
bind-ip: "0.0.0.0"
flush-interval: 10
{
"Version":"5.0.0.2",
"NodeName":"messaging-server-0",
"TimeStamp":"2022-01-31T13:59:16.201Z",
"ObjectType":"Endpoint",
"Name":"DemoExt",
"Interface":"All",
"Enabled":true,
"TotalConnections":8221,
"ActiveConnections":6,
"BadConnections":8199,
"MsgRead":70,
"MsgWrite":4787586,
"BytesRead":495619,
"BytesWrite":2031134005,
"LostMessageCount":0,
"WarnMessageCount":0,
"ResetTime":"2022-01-24T11:26:46.533Z"
}
IBM Message Gateway to Instana Flow
  1. Convert the message to JSON
  2. We copy the NodeName and ObjectType from the msg.payload into the root of the msg object
  3. We split the msg routing based on the ObjectType
  4. For each ObjectType we check if we should process this instance of metrics, if not nullis returned and the flow ends, otherwise the msg object is returned and the flow continues
  5. Split metric object in msg.payload into is elements
  6. For each element check if is one “Version”, “NodeName” or “TimeStamp” and if it is return null to stop flow as we are not interested in these ones. For all others set msg.topic to the name of the statsd metric and return msg to keep the flow processing
  7. The statsd node send the metric to the configured statsd server which in our case is a worker node IP address.
statsd metrics in worker node
Basic Dashboard
  1. Passing the statsd target IP address in — we have it being passed as an environment variable but the statsd node code needs to be updated to allow it to be passed in dynamically
  2. Implement so level of past state memory so we can present “delta” changes rather than new cumulative value. This may be tricky in some cases
  3. Pass the “throttling” value in via an environment variable rather than hard coding

--

--

--

I‘ve worked for IBM all of my career and am an avid technologist who is keen to get his hands dirty. My role affords me this opportunity and I share what I can

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Git: A Version Control Utility — The Basics

Make Entity Framework 10x faster in 20 minutes

Let’s Get Methodical

How to fix TypeError: load_config() got an unexpected keyword argument ‘config_dict’

The second era of the CRODO project.

IBM Datastage Interview questions by Skil App

Static Libraries vs Dynamic Libraries

Basic ERC-20 smart-contract on Parastate’s testnet

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tony Hickman

Tony Hickman

I‘ve worked for IBM all of my career and am an avid technologist who is keen to get his hands dirty. My role affords me this opportunity and I share what I can

More from Medium

Message Broker — A Quick Introduction to RabbitMQ

CI Pipeline (Part 1): Understanding Pipelines

Should we include inbuilt libraries in the requirements.txt file !?

Collections Factory Methods