监控mssql,需要利用zabbix_agentd.conf配置文件中的PerfCounter高级参数。
设置如下:
PerfCounter = db_pages,"\SQLServer:Buffer Manager()\Database pages",60 PerfCounter = db_free_pages,"\SQLServer:Buffer Manager()\Free pages",60 PerfCounter = db_data_file_size,"\SQLServer:Databases(DATABASE_NAME)\Data File(s) Size (KB)",60 PerfCounter = db_log_file_size,"\SQLServer:Databases(DATABASE_NAME)\Log File(s) Size (KB)",60 PerfCounter = db_userconns,"\SQLServer:General Statistics()\User Connections",60 PerfCounter = db_server_mem,"\SQLServer:Memory Manager()\Total Server Memory (KB)",60 PerfCounter = db_cpu_load,"\Process(sqlservr)\% Processor Time",60
可以实现对SQLServer部分性能的监控.其中数据文件和日志文件监控中,要将实际监控的数据库名字
替代"DATABASE_NAME"。
监控项的key分别指向上面定义的参数,如"db_pages""db_free_pages"等。
要想显示windows主机可以监控的性能计数列表,可以在CMD中输入typeperf-qx
获取所有项。