8/20/2023 0 Comments Zabbix windows process monitoringThat isn't a good sign for you BTW, as I have been dealing with SQL Server for ~20 years. Until you mentioned it I had never heard of Zabbix. conf file for that server, the Item/Trigger only has to be added to he Template file once but any new servers will need to be added to the Host group that you are monitoring. ![]() Note for every sever you want to monitor you will need to add the UserParameter= to the. This gave me the ability to look at severs that are using Mirroring and those that are using AlwaysOn. WHEREmirroring_role_desc IN (''PRINCIPAL'',''MIRROR'')ĪNDmirroring_state_desc NOT IN (''SYNCHRONIZED'',''SYNCHRONIZING'')" UserParameter=MSSQL.SyncHealth,"D:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE" -d Master -U SQLServerUser -P ABC123 -h -1 -W -Q "SELECTCOUNT (*) as NotHealt圜ountįROM. conf file I restarted the agent and went into Zabbix and added an Item called up the trigger and I can now monitor when my servers have a Mirror/AlwaysOn Partner failure. Here is what I added to the Zabbix Agent Conf file minus real user/pasword.Once the UserParameter is added to the. I deided t use the "UserParameter= " approach and setup a query to Sql Server fom Zabbix and look at the result set and then trigger off that (i.e. Advantage, leverages Zabbix functionality, does not need separate SQL job, disadvantage, need to embed SQL connection into Zabbix. Similar to the User Settable approach but uses the Zabbix agent to refresh the value of the Zabbix Item instead of a SQL job to set the built in performance counter. WHERE != N'HEALTHY' Ī third approach would be to embed a T-SQL query in the Zabbix agent configuration file that would set a value that would correspond to an Item in Zabbix. 0 is good, any number greater than 0 is bad WHERE mirroring_role_desc IN ('PRINCIPAL','MIRROR')ĪND mirroring_state_desc NOT IN ('SYNCHRONIZED','SYNCHRONIZING') Advantage, uses ability of Zabbix to leverage the the perf counter infrastructure, disadvantage, relies on SQL job to update value and uses one out of only 10 available user defined counters. For example 0 for mirror/AlwaysOn status OK, 1 or greater for a problem. You could query the mirror/AlwaysOn status and set the value to a flag you would use as the health indicator for Zabbix. You would have to use sp_user_counter to set the value. ![]() Advantage, built-in counter, disadvantage, difficult to correlate with mirror status you want.Īnother approach would be to utilize one of the performance counters in the “SQL Server :User Settable” category. You could try the size of the Log Send Queue to see if it grows too high, or maybe the Transaction delay time. One approach would be to use a performance counter in the “SQL Server:Database Mirroring” group as an indicator. I am far from an expert on Zabbix but have a couple of suggestions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |