-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to get databases metrics using resource_groups #40
Comments
@debfx Are we missing some distinguishing labels? |
@hristodragolovbede Do you also have a targets section in your config? |
No, there is nothing in the targets section. Config file is populated only with the config described above (including authentication stuff) |
I added a regex to include specific databases by using resource_name_include_re: |
I tried few more things:
|
Hi hristodragolovbede: |
No, I didn't find a solution unfortunately. |
Were you able to monitor more than one SQL Database with targets instead of Resource Groups? If so, could you paste the code? |
I´ve configured the monitor of three instances with Azure Grafana plugin and it works, so I suppose that is exporter issue. Someone could help me with this? I´ve not able to do it neither resource_group nor target. |
Same issue here. I can confirm, it works if I add "resource_name_include_re" with my databases name as value. But doesn't work with a regex value which match everything. Does the problem could not be related to the metric label "resource_name" with the value of the SQL Server and not the SQL server database? As one SQL Server can have one or more SQL databases. Don't really know... |
Hi mboret: |
@chaconcin No it doesn't work. When I've only one database it works , but adding another one generates exporter errors. I think this confirms what I've supposed, database metrics are stored with the sql server name as resource_name label. So with one database it works but with more than one it fails as the metric already exist.
For a DB SQL database the resourceID is:
And for a app service site the resourceID is:
For the SQL DB, the "resource_name" is always the SQL server name and not the database name.
|
Hi, This is related to issue RobustPerception#40 The exporter works only if the DB SQL server has one database with more than one this create a conflict has the exporter reports that the metric already exists. In fact, it's related to the label "resource_name", which takes the name of the SQL Server and not of the database. The resourceID for a DB: > /subscriptions/XXXX-XXXXX-XXXXX-XXXXX-XXXXX/resourceGroups/rg-test/providers/Microsoft.Sql/servers/test-sql-server/databases/test-database-a/providers/microsoft.Insights The solution could be to add another label to identify the database name("sub_resource_name"). Maybe there is the same issue with other Azure services which have long resourceID and so this change can fix it.
* Add additional label to fix SQL database scrap issue Hi, This is related to issue #40 The exporter works only if the DB SQL server has one database with more than one this create a conflict has the exporter reports that the metric already exists. In fact, it's related to the label "resource_name", which takes the name of the SQL Server and not of the database. The resourceID for a DB: > /subscriptions/XXXX-XXXXX-XXXXX-XXXXX-XXXXX/resourceGroups/rg-test/providers/Microsoft.Sql/servers/test-sql-server/databases/test-database-a/providers/microsoft.Insights The solution could be to add another label to identify the database name("sub_resource_name"). Maybe there is the same issue with other Azure services which have long resourceID and so this change can fix it.
I'm trying to get database metrics using resource group filtering which was added recently.
Targeting the database directly using the following resource:
/resourceGroups/SOMERG/providers/Microsoft.Sql/servers/SERVER/databases/DATABASE
works fine but when I try retrieving the metrics with resource group filtering it fails with:
collected metric storage_percent_percent_total label: label: gauge: was collected before with the same name and label values
I'm using the following configuration:
resource_groups:
resource_types:
metrics:
I wasn't sure what the resource_types should be and tried specifying different combinations but none was displaying anything except this one.
The text was updated successfully, but these errors were encountered: