You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
From an AO (Application Operations) perspective it is hard to keep track of the database sizes without either scheduling scripts or manually execute them to get to know the size of the databases. In some scenarios a sudden growth could be fatal for the performance of the application. At the same time, non-growth could be a result of a problem.
Describe the solution you'd like
I would like to be able to get all databases it's sizes (for all file types - Logs and Data) as metrics in MB (MegaBytes).
A solution could be running the following the query and structure the metrics to something like:
SELECT
db.[name] AS [DatabaseName],
mf.[name] AS [LogicalName],
mf.[type_desc] AS [FileType],
mf.[physical_name] AS [Path],
CAST(
(mf.[Size] *8
) /1024.0ASDECIMAL(18, 1)) AS [SizeInMB],
'By '+IIF(
mf.[is_percent_growth] =1, CAST(mf.[growth] ASVARCHAR(10))+'%', CONVERT(VARCHAR(30), CAST(
(mf.[growth] *8
) /1024.0ASDECIMAL(18, 1)))+' MB') AS [Autogrowth],
IIF(mf.[max_size] =0, 'No growth is allowed', IIF(mf.[max_size] =-1, 'Unlimited', CAST(
(
CAST(mf.[max_size] ASBIGINT) *8
) /1024ASVARCHAR(30))+' MB')) AS [MaximumSize]
FROM
sys.[master_files] AS mf
INNER JOIN sys.[databases] AS db ON
db.[database_id] = mf.[database_id]
Describe alternatives you've considered
Another way of doing this would be to look into the sqlserverqueryreceiver, but monitoring file size and database size is pretty crucial from an AO and DBA (Database Admin).
Additional context
No response
The text was updated successfully, but these errors were encountered:
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Component(s)
receiver/sqlserver
Is your feature request related to a problem? Please describe.
From an AO (Application Operations) perspective it is hard to keep track of the database sizes without either scheduling scripts or manually execute them to get to know the size of the databases. In some scenarios a sudden growth could be fatal for the performance of the application. At the same time, non-growth could be a result of a problem.
Describe the solution you'd like
I would like to be able to get all databases it's sizes (for all file types - Logs and Data) as metrics in MB (MegaBytes).
A solution could be running the following the query and structure the metrics to something like:
Describe alternatives you've considered
Another way of doing this would be to look into the sqlserverqueryreceiver, but monitoring file size and database size is pretty crucial from an AO and DBA (Database Admin).
Additional context
No response
The text was updated successfully, but these errors were encountered: