Validating Service SLAs (custom, 3rd party or external) are a no brainer for individuals responsible for ensuring system stability and availability. It also happens to be one of the use cases Dynatrace Synthetics perfectly supports for HTTP(S) services. But what if you have services that are using other protocols? Well – keep reading and you'll learn how Dynatrace can help you with this as well.
Every other week I have a call with Robert, well – it’s actually two Roberts who are on these calls. The three of us have been working together over the past year and collaborated on the journey towards Kubernetes, and blogged about how they implement Monitoring as a Self-Service for EKS.
A couple of weeks back Robert #2 (yeah – I really call him that when both Robert’s are on the call) asked me how Dynatrace could help to monitor service availability of an LDAP service. To my question “How do you define and measure availability of LDAP?” he responded with “Right now I have a script that runs as a batch job which validates if I can get a successful TCP connection to the LDAP port on that remote server.”
Robert told me that he would like Dynatrace to run these checks, give him an historical overview of service availability and alert him in case a service doesn’t meet their SLAs e.g: via Slack as shown here:
I told him that Dynatrace Synthetics provides that capability for HTTP/HTTPS based services (for both API Endpoint Testing as well as Clickpath checks). For non-HTTP/HTTPS checks, such as LDAP, the Dynatrace’s plugin infrastructure can be used to execute the same logic as his current script. I gave him the links to the Dynatrace Plugin SDK GitHub page and pointed him to one of my Performance Clinic YouTube Tutorials on Extending Dynatrace with Custom Plugins for SNMP. In the following sync call, he showed me that he built the Simple TCP Monitoring Plugin for Dynatrace which he also just put on GitHub for others that have similar requirements.
Simple TCP monitoring plugin in action
Robert did a great job documenting the plugin on his GitHub page. That’s why I want to keep it brief:
Step #1: Upload and configure the plugin
Every minute the plugin will be executed on one of your Dynatrace ActiveGates. As explained on Robert’s GitHub page, it will validate all configured endpoints in the form of IP:PORT. The plugin tries to open a TCP socket connection and then returns the status as OK, WARNING or ERROR. This data is then made available as a custom metric on a Dynatrace custom device.
Step #2: Analyze the socket status
The socket validation status can either be seen on the out of the box custom device screen (see below) or can be put on a custom chart and therefore added to any dashboard:
Step #3: Get alerted, notify and auto-remediate
The plugin automatically opens a new Dynatrace problem in case the socket connection can’t be established. You can set up additional Dynatrace 3rd party problem notification integrations to notify your teams or trigger your auto-remediation workflow, e.g:
- Push a notification to Slack, MS Teams, Mattermost (via Webhook), PagerDuty
- Trigger workflows in ServiceNow, xMatters
- Create a ticket in Jira, Remedy
- Trigger auto-remediation in Keptn
Simple but powerful: A step closer to stable environments
Thanks to the built-in Dynatrace Synthetic feature as well as through the extension options that Dynatrace provides it can be used to monitor SLAs of any internal or external service (HTTP or NON-HTTP). There is also a large list of existing extensions that other users have built and put out on their GitHub or are available on our Dynatrace Marketplace. On top of that, we have the Dynatrace Platform Extension Services team that is helping our users to build extensions for their special technology needs.
Thanks to Robert #2 who not only developed that plugin but also put it on GitHub for everyone to use!