forked from Neeky/mysqltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzabbix_agent_mysql.conf
75 lines (70 loc) · 7.99 KB
/
zabbix_agent_mysql.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#这个配置文件用于自定义zabbix key值时用到、配置文件中的monitormysql 命令就是monitormysql.py 这个脚本.
#作者:蒋乐兴
#时间:2017年4月
#目标:zabbix 自定义key 监控mysql时用到的配置文件
#提需求+报bug:[email protected]
#mysql 实例的配置信息
UserParameter=serverId,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 serverId
UserParameter=port,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 port
UserParameter=baseDir,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 baseDir
UserParameter=dataDir,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 dataDir
UserParameter=version,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 version
UserParameter=isBinlogEnable,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 isBinlogEnable
UserParameter=maxConnections,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 maxConnections
UserParameter=isErrorlogEnable,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 isErrorlogEnable
UserParameter=isPerformanceScheamEnable,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 isPerformanceScheamEnable
#mysql 实例级别的运行时信息
UserParameter=isOnline,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 isOnline
UserParameter=comInsert,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 comInsert
UserParameter=comUpdate,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 comUpdate
UserParameter=comDelete,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 comDelete
UserParameter=comSelect,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 comSelect
UserParameter=slowqueries,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 slowqueries
UserParameter=currentConnections,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 currentConnections
UserParameter=created_tmp_disk_tables,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 created_tmp_disk_tables
UserParameter=tableLocksWaited,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 tableLocksWaited
UserParameter=questions,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 questions
UserParameter=sortMergePasses,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 sortMergePasses
UserParameter=sortRange,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 sortRange
UserParameter=sortRows,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 sortRows
UserParameter=sortScan,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 sortScan
UserParameter=openTables,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 openTables
UserParameter=openedTables,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 openedTables
UserParameter=serverLevelOpenFiles,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 serverLevelOpenFiles
UserParameter=tableOpenCacheOverflows,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 tableOpenCacheOverflows
UserParameter=tableCacheHitRate,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 tableCacheHitRate
UserParameter=binlogStmtCacheDiskUse,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 binlogStmtCacheDiskUse
UserParameter=qcacheFreeMemory,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 qcacheFreeMemory
UserParameter=binlogCacheDiskUse,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 binlogCacheDiskUse
UserParameter=preparedStmtCount,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 preparedStmtCount
UserParameter=selectRangeCheck,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 selectRangeCheck
#innodb 级别的运行时信息
UserParameter=innodbLogWaits,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbLogWaits
UserParameter=innodbBufferPoolHitRate,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbBufferPoolHitRate
UserParameter=innodbBufferPoolFreePagePercent,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbBufferPoolFreePagePercent
UserParameter=innodbBufferPoolDirtyPercent,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbBufferPoolDirtyPercent
UserParameter=innodbRowsInserted,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowsInserted
UserParameter=innodbRowsDeleted,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowsDeleted
UserParameter=innodbRowsUpdated,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowsUpdated
UserParameter=innodbRowsRead,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowsRead
UserParameter=innodbRowLockTime,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowLockTime
UserParameter=innodbRowLockTimeAvg,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowLockTimeAvg
UserParameter=innodbRowLockTimeMax,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowLockTimeMax
UserParameter=innodbRowLockWaits,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbRowLockWaits
UserParameter=innodbOsLogFsyncs,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbOsLogFsyncs
UserParameter=innodbDblwrPagesWritten,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbDblwrPagesWritten
UserParameter=innodbDblwrWrites,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbDblwrWrites
UserParameter=innodbDoubleWriteLoader,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbDoubleWriteLoader
UserParameter=innodbPagesWritten,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbPagesWritten
UserParameter=innodbPagesRead,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbPagesRead
UserParameter=innodbLogWrites,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbLogWrites
UserParameter=innodbLogWriteRequests,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbLogWriteRequests
UserParameter=innodbOsLogWritten,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbOsLogWritten
UserParameter=innodbOsLogPendingWrites,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbOsLogPendingWrites
UserParameter=innodbOsLogPendingFsyncs,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbOsLogPendingFsyncs
UserParameter=innodbOpenFiles,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbOpenFiles
UserParameter=innodbAvailableUndoLogs,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbAvailableUndoLogs
UserParameter=innodbBufferPoolSize,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 innodbBufferPoolSize
#mysql replication 相关的信息
UserParameter=replicationIsRunning,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 replicationIsRunning
UserParameter=replicationBehindMaster,monitormysql --host=127.0.0.1 --port=3306 --user=monitoruser --password=123456 replicationBehindMaster