Details
-
New Feature
-
Status: Done
-
Medium
-
Resolution: Fixed
-
None
-
None
-
2
-
Yes
-
Yes
-
Yes
-
No
Description
As a PMM User I need to specify socket for mongodb to be used in pmm-admin add command so that PMM uses a socket instead of port
Use case:
pmm-admin add mongodb .... --socket=....
DOC: flag present in the documentation
DOD:
Ability to connect to MongoDB servers via sockets with pmm-server API.
mongodb_exporter and QAN MongoDB profiler agents should be able to connect to MongoDB using socket.
new flag --socket in `pmm-admin add mongodb` command
Suggested implementation:
- Add string parameter `socket` to pmm-managed `inventory/services/AddMongoDB` and `management/MongoDB/Add` endpoints requests.
- Add extra field to services table.
- Make address and port fields optional and check if only one of two fields(socket, address) exists in API and DB.
- if `socket` is not empty DSN should use "unix" as network