- When I need to add Azure related DB for the monitoring I need to be able to enter Azure related credentials in PMM UI (add Instance) So I can see the list of all DB existed in the Azure account and processed with Adding them to PMM for monitoring
something related to :
- User can enter credentials: AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID click discovery and see the list of DB services possible monitor by PMM
- List of DBs should contain: Name, DomainName, resourceGroup, Type, Version, Location (port is unavailable - check if standard port works)
- The user is able to select a DB from the list and proceed to a screen to fill more details to start to monitor it by PMM.
- On the screen of Add remote MySQL (PostgreSQL/MariaDB) Instance, the user can see and edit the next fields (filled in or empty):
- DomainName - filled in
- Service Name - default DomainName
- Port - default for DB type: 3306, 5432 - check if it works - ports does not return with selected resource discovery
- user - filled in by concatenating "<administratorLogin>@<name>"
- Password - empty
- Region - repopulated by location
- Environment - filled in by tags.environment
- Do we need fill in any other labels?
- Custom labels empty
- Additional option - need additional investigation
- User able to do all operations using Azure and PMM UI only
- The Discovery process works for:
- Azure Database for PostgreSQL
- Azure Database for MySQL
- Azure Database for MariaDB - need an additional investigation - as it stays separate from "standard" Azure DB - and its cost does not encourage to do many experiments.
- any Azure SQL related discovery
- Start monitoring Azure Node resource
- Implement two endpoints in PMM management API:
- DiscoverAzureDBs: accepts AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID and return list of database instances
- AddedAzireDB: accept details return if successfully added.
- Implement Azure service in pmm-managed to discover DBs (how to discover in details)
- Add the ability in pmm-managed to save service details
- Start agents to collect metrics and query analytics.
- Cover with API tests
- Discovery and monitoring of MariaDB
- How to form DSN
How to test:
- Create DB on Azure
- Genarates credentials.
- Discover from grafana
- Add to monitor
- See matrics on garafana dashboard.
More detailed TBD
Example how to discover