Support for specifying sub/server type in resource discovery
See original GitHub issueProposal
I implemented the MySQL resource type a while ago, and while not a huge issue it is a bit annoying to see:
The metric 'cpu_credits_remaining' was not found.
The reason for these errors is that metrics available differs from MySQL Single and Flexible servers. The same is true for PostgreSQL as well.
Currently there is no way, as far as I know, to filter resource discovery group on a server type / sub type of a resource type. This would be nice to have for these use cases, and probably others.
I might have time to implement this myself, but would like some implementation direction in that case.
Possible declerations, depending on implementation.
Filter in resource discovery:
version: v1
azureLandscape:
tenantId: 00000000-0000-0000-0000-000000000000
subscriptions:
- 00000000-0000-0000-0000-000000000000
cloud: Global
resourceDiscoveryGroups:
- name: azure_mysql_single
type: MySql
subType: Single
- name: azure_mysql_flexible
type: MySql
subType: Flexible
Filter in metric decleration:
- name: azure_mysql_cpu_credits_remaining
description: "CPU credits remaining"
resourceType: MySql
azureMetricConfiguration:
metricName: cpu_credits_remaining
aggregation:
type: Average
interval: 00:15:00
resourceDiscoveryGroups:
- name: azure_mysql
subType: Flexible
Component
Resource Discovery
Contact Details
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Defining the Main Server and Its Subservers
Before you begin configuring a replication job, you must define the Server Manager instances that comprise the replication server group, including the Main ......
Read more >Adding Subservers
To select a subserver from a list of discovered servers, perform the following steps: Click the ... Defining the Main Server and Its...
Read more >Resource Discovery and Promotion
Promotion to full monitoring involves specifying additional identifying parameters and monitoring credentials in order to compete the discovery ...
Read more >Understanding Discovery & Connection Data Structures
The event type and subtype fields further define the structure of the data record carried in the message. Host Discovery Structures by Event...
Read more >Use a Subserver to Handle Large Loads - Documentation - Altair
The primary server must be used to submit, stop, and forget jobs. The subserver is to be used as a read-only server. While...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I should be able to contribute this, C# skills are not the best but we’ll see.
Which of the alternative would you say is the best way to go? The second alternative (filtering in metric deceleration) would be quite nice otherwise there will be a lot of duplication in metric decelerations for these resources.
The API should be good, it’s how it is being configured and serialized/deserialized. You can learn more in the scraper on how it gets the metrics.
We should filter this in the resource graph though. We already have query builders per type so have to plug in the new properties and use them there as well. Otherwise we’ll be pulling too much data and make too many calls.