“The sea is no one’s property. But its protector, I shall be.”
— Kanhoji Angre, Admiral of the Maratha Navy
๐ Why I Named Our Monitoring Module kanhoji
Every great kingdom needs a vigilant guardian — someone who spots threats before they reach the shore. In the Swarajya movement, that role was embodied by Kanhoji Angre, the legendary admiral of the Maratha Navy.
- Kanhoji wasn’t just a warrior — he was a master strategist.
- He intercepted enemy ships, anticipated surprise attacks, and built naval intelligence networks.
- He knew that if you wait until a breach happens, it’s already too late.
In our modern-day microservices architecture, that role belongs to real-time monitoring. Thus, I named our observability module kanhoji
— a tribute to the admiral who kept the empire safe with foresight and maritime mastery.
๐ What kanhoji
(Monitoring) Does in Our System
In the context of our AI-powered fraud detection platform, kanhoji
is responsible for:
- Keeping an eye on service health
- Monitoring response times, error rates, and traffic patterns
- Exposing custom metrics (e.g. fraud score thresholds)
- Powering a Grafana dashboard for real-time visibility
Just like Kanhoji Angre kept Aurangzeb’s navy in check, our monitoring module makes sure fraud doesn’t creep in through hidden blind spots.
๐ง The Tech Behind It
Component | Role |
---|---|
Prometheus | Pull-based metrics scraping and time series storage |
Grafana | Beautiful dashboards for real-time data |
Micrometer | Java metrics facade for Spring Boot |
Spring Actuator | Auto-exposes HTTP metrics (count, latency, status) |
I integrated kanhoji
into our existing services (sindhudurg
, tanaji
) with minimal overhead and maximum insight.
๐ Our Dashboard in Action
I track metrics like:
- ๐
http_server_requests_seconds_count
– endpoint latency - ๐งช
status="500"
– internal server errors - ๐
jvm_memory_used_bytes
– memory health - ๐ง Coming soon – fraud-related custom metrics
I even tried to write a Python traffic simulator to test the dashboard in action! :) a little fun.
๐ง Why Monitoring Matters in Fraud Detection
Fraud isn’t always loud. Sometimes it comes as:
- A slow buildup of failed transactions
- An AI model that’s taking too long to respond
- Unusual traffic patterns on specific endpoints
Without observability, we’d be flying blind. Kanhoji gives us:
- ⏱️ Early warnings
- ๐งฏ Quick troubleshooting
- ๐ Root cause clarity
⚓ Kanhoji Angre: The Real Legend
Before we end, let’s celebrate the namesake:
- ๐ Known as the “Shivaji of the Sea”
- ๐ฎ๐ณ Never defeated by British, Portuguese, or Dutch fleets
- ⚔️ Ran a full naval intelligence network from Kolaba Fort
- ๐ข Used small, agile ships to outsmart colonial navies — like microservices!
๐ก️ What’s Next?
- Expose Redis and Rule Engine metrics
- Enable alerts for fraud score spikes
- Track rule overrides and fraud trends in real time
If Tanaji is the warrior, and Dadoji the wise council, then Kanhoji is the watchtower.
Every system needs one.
๐ Explore the Code
๐ GitHub: github.com/pcm1984/fraud-free-swarajya
๐ For dashboard JSON and usage instructions: Kanhoji Monitoring README
No comments:
Post a Comment