Service Mapping - MySQL on Localhost
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 06:49 AM
Hello
I'm creating a service map for a website based on WordPress.
Obviously, there isn't a pattern for WordPress, and so I'm trying to use traffic + ML to create the map.
The Apache web server and the MySQL db server are installed on the same VM in AWS.
Both the web server and db server are discovered with cloud discovery, relationships are all present, dependency view looks good.
But because the wordpress application is configured to use localhost as the db server, the TCP connections on the Linux Server show that it is listening on port 3306 but there are no "Connected to" records for it. Therefore, it won't show up under connection suggestions or appear even as a transient connection on the service map.
In this situation, what would be the recommended method of adding the MySQL database to Service Map?
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 06:15 AM
Why do not you try traffic based discovery - Get superset and then start fine tuning the excessive part.
Regards
RP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 09:28 AM
Hi Rahul,
The reason I raised this question is because traffic based discovery, even with ML enabled, is not discovering it.
When it is on localhost, there is no outbound connection logged by netstat, therefore no TCP connection to discover. I moved the MySQL database to another server on the same network and I expected traffic based discovery to find it.
Unfortunately, as far as I can tell, it will only take connections that netstat reports as "Established" - that is, active open connections - whereas the database connection is only ever in that state for a few seconds while a transaction is taking place.
This means that for Service Mapping to discover the database, it would need to run the netstat/lsof command at exactly the right moment to catch the established connection. In my dozen attempts, I only got it once.
So far, my only reliable solution has been to manually add a connection on the map.
Best wishes,
Adz