Azure SQL Elastic pool Monitoring possible?
Posted: Thu Apr 04, 2024 10:01 am
Hi,
I'm trying to use the SQL database Wizard to monitor some DDBB we have on Azure but after some analysis I think is just not possible with the current check_mssql_server.php as is not prepared for it.
I can successfully connect to it and run time2connect commands but all the other modes fail to execute because internally it appends the instance name to the SQL query but Azure uses GUID on the on the sys.dm_os_performance_counters instead of the table
This is the command I tested ( changing preftype do not affect the result)
I have truncated some of the output but that part in red in the important one. Maybe I have missed it but I think that this check will not work unless is updated to first get the GUID for the instancename from sys.databases. If that SQL query is run with the GUID instead of the instance name it does work OK.
Am I missing something?
I'm trying to use the SQL database Wizard to monitor some DDBB we have on Azure but after some analysis I think is just not possible with the current check_mssql_server.php as is not prepared for it.
I can successfully connect to it and run time2connect commands but all the other modes fail to execute because internally it appends the instance name to the SQL query but Azure uses GUID on the on the sys.dm_os_performance_counters instead of the table
This is the command I tested ( changing preftype do not affect the result)
Code: Select all
/check_mssql_server.php -H mysqlserver.database.windows.net --checktype 'database' -U 'xxxxxx -P 'xxxxxxx' --instancename 'my_database1' --perftype azuresqldb -p 1433 --mode datasize --warning 10000 --critical 100000 -vvv
..
..
..
INFO: [MSSQLQuery::run_on_connection] query [SELECT cntr_value as value, DATEDIFF(SECOND, '1970-01-01', GETUTCDATE()) as utctimestamp FROM sys.dm_os_performance_counters WHERE counter_name='Data File(s) Size (KB)' [color=#FF0000]AND instance_name='my_database1'[/color];] (2173)
Am I missing something?