Compare commits
1024 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab83ded038 | ||
|
|
51f82dc476 | ||
|
|
315e0ef903 | ||
|
|
98d5dfff8e | ||
|
|
6b4705608b | ||
|
|
5907817cba | ||
|
|
aa97ac54d1 | ||
|
|
8fe548aba9 | ||
|
|
18a9288b75 | ||
|
|
fe82886f09 | ||
|
|
32e6993eea | ||
|
|
56b61909a3 | ||
|
|
2ef541cdd7 | ||
|
|
6b1d283cda | ||
|
|
c8e5566c81 | ||
|
|
7f3d9df089 | ||
|
|
99aa4dbca8 | ||
|
|
c193b8abd4 | ||
|
|
4efdc4f169 | ||
|
|
1304a4630b | ||
|
|
2cc3f939a7 | ||
|
|
d0260e564c | ||
|
|
2a24179423 | ||
|
|
34082b44f1 | ||
|
|
bfe340d24d | ||
|
|
a9288e376d | ||
|
|
cb9a03d010 | ||
|
|
e62366b755 | ||
|
|
2a2a96d9fc | ||
|
|
64a671ae13 | ||
|
|
45945876d8 | ||
|
|
90dacd0085 | ||
|
|
540ef68dc8 | ||
|
|
54cc981956 | ||
|
|
2e8ea354d7 | ||
|
|
217f52294e | ||
|
|
f9b2675077 | ||
|
|
95fd2d99b2 | ||
|
|
dba2b23e9e | ||
|
|
acbc199143 | ||
|
|
2449c8715e | ||
|
|
c62593c0eb | ||
|
|
00cbc9342f | ||
|
|
df5a3a37f2 | ||
|
|
5ec14c588b | ||
|
|
d78a3a638a | ||
|
|
19d2cbfa27 | ||
|
|
f9af916352 | ||
|
|
90db12b513 | ||
|
|
7d326ef306 | ||
|
|
d0b005fb14 | ||
|
|
118060cf77 | ||
|
|
d2ef68daac | ||
|
|
8393b93c53 | ||
|
|
63adcc2cd9 | ||
|
|
60c842c704 | ||
|
|
f6fd6aed7f | ||
|
|
cb92368e5b | ||
|
|
8cd97db362 | ||
|
|
94e1359895 | ||
|
|
1bcc5b77ec | ||
|
|
ae622e0c08 | ||
|
|
c951f7d822 | ||
|
|
6a366acc74 | ||
|
|
a5f7d5e9cf | ||
|
|
ea2249c30c | ||
|
|
a8c60c9f2b | ||
|
|
0581e02cf3 | ||
|
|
efec811b91 | ||
|
|
f85209c817 | ||
|
|
7fda5a9a4b | ||
|
|
ab689fc0db | ||
|
|
cdcdbe8f70 | ||
|
|
46ca8a409a | ||
|
|
e5c1641b6b | ||
|
|
3e475e7e08 | ||
|
|
3899144f8f | ||
|
|
b8cb9e7734 | ||
|
|
c62b9edf87 | ||
|
|
0e5aea40e8 | ||
|
|
1dbfcd3dc8 | ||
|
|
a4ef5fca46 | ||
|
|
7cf309345f | ||
|
|
495632a064 | ||
|
|
f6591e80ea | ||
|
|
ab5e8c366e | ||
|
|
ce35e23a0f | ||
|
|
ece263ea45 | ||
|
|
f777318cc7 | ||
|
|
c29f3ecdeb | ||
|
|
8f8740ad94 | ||
|
|
9acabba761 | ||
|
|
c3adcc877a | ||
|
|
7f92e921b4 | ||
|
|
e22a4394f7 | ||
|
|
070e5051c6 | ||
|
|
c040dffb5f | ||
|
|
c2f2a7d5e2 | ||
|
|
fd29d18312 | ||
|
|
2f724075b2 | ||
|
|
06224e4b20 | ||
|
|
f81888cd8a | ||
|
|
6a7b543ad6 | ||
|
|
6ba93527ba | ||
|
|
d6d2639e3a | ||
|
|
ecc51001c3 | ||
|
|
e2232bfa12 | ||
|
|
2bea8b7c84 | ||
|
|
dd5ae29f82 | ||
|
|
cb741a5521 | ||
|
|
9d434a36d6 | ||
|
|
e89760f374 | ||
|
|
02dd70480d | ||
|
|
c8e59cdd0c | ||
|
|
882952de3e | ||
|
|
279bec6eaa | ||
|
|
614ed283c0 | ||
|
|
06672d5ff9 | ||
|
|
78b8cfd365 | ||
|
|
e0f0e08852 | ||
|
|
e00f102703 | ||
|
|
3921627fa2 | ||
|
|
7a1a65c31b | ||
|
|
5e763f1a8b | ||
|
|
808fa5839a | ||
|
|
a0c5f94017 | ||
|
|
9ba1c2c32d | ||
|
|
5333fb8eab | ||
|
|
ee4a918fc7 | ||
|
|
1dbfe3417b | ||
|
|
c829732af0 | ||
|
|
1b313a3202 | ||
|
|
5732c4403b | ||
|
|
6033a0a743 | ||
|
|
e8cfe46381 | ||
|
|
e94f807d52 | ||
|
|
c15490e756 | ||
|
|
b25c523528 | ||
|
|
6d27da8ad8 | ||
|
|
d0e6788724 | ||
|
|
1633308000 | ||
|
|
08141e36cb | ||
|
|
b5cfdb1ef6 | ||
|
|
3a97a67c7e | ||
|
|
8d6101ec5a | ||
|
|
e73da37bc0 | ||
|
|
3d587a5762 | ||
|
|
42a6be95e8 | ||
|
|
ee8c367933 | ||
|
|
a20e19922e | ||
|
|
d6d588c5aa | ||
|
|
1ba0f5ab74 | ||
|
|
b838cb1c6f | ||
|
|
7eb665e401 | ||
|
|
cb3e371094 | ||
|
|
ea30f38b9b | ||
|
|
8187334ef6 | ||
|
|
ac24e8b028 | ||
|
|
30ba544f35 | ||
|
|
14b1bc3710 | ||
|
|
e8c0d6b987 | ||
|
|
d0efb206d9 | ||
|
|
8abb04afde | ||
|
|
f7318cfc5a | ||
|
|
067727165a | ||
|
|
544c93c7cf | ||
|
|
66bc023e51 | ||
|
|
c5ea2d0d24 | ||
|
|
9e8d9b44b1 | ||
|
|
db15eaab04 | ||
|
|
9d016212c8 | ||
|
|
a4158c476e | ||
|
|
0f1148e096 | ||
|
|
5d17f006f0 | ||
|
|
16d303a6fb | ||
|
|
70e5ac4898 | ||
|
|
a914de63c6 | ||
|
|
dec518369b | ||
|
|
926a4e642a | ||
|
|
3236883cce | ||
|
|
be1c3b17d6 | ||
|
|
a67356639b | ||
|
|
7b3cb2eb00 | ||
|
|
8459ffb690 | ||
|
|
b260a20646 | ||
|
|
db29adff5d | ||
|
|
d3576440d4 | ||
|
|
c557e383b6 | ||
|
|
768a1e37e9 | ||
|
|
46e2fc6ab6 | ||
|
|
dacf004797 | ||
|
|
44ed81218a | ||
|
|
d802abc86c | ||
|
|
4c22284ca7 | ||
|
|
929c970b42 | ||
|
|
496c8d8356 | ||
|
|
e707f1a23d | ||
|
|
e7145018ef | ||
|
|
18164fdb16 | ||
|
|
3b9e40c5d4 | ||
|
|
6d20b8ef72 | ||
|
|
8bdd35975e | ||
|
|
9ccdd6c3e7 | ||
|
|
30365a2256 | ||
|
|
cdd4100a30 | ||
|
|
2cd9f50357 | ||
|
|
106345ff49 | ||
|
|
7c8c961aef | ||
|
|
e1bd7f0267 | ||
|
|
025c5809be | ||
|
|
d45fdd50e7 | ||
|
|
f4388d36de | ||
|
|
4a62339c69 | ||
|
|
5a9b8d6bd0 | ||
|
|
8ce71de693 | ||
|
|
6d9846f1f5 | ||
|
|
c9be9b0538 | ||
|
|
65f7214e67 | ||
|
|
302cebbbec | ||
|
|
46c60a32fd | ||
|
|
7ec6d84c7d | ||
|
|
0bbdb03ace | ||
|
|
149d074206 | ||
|
|
0b491826ee | ||
|
|
e6d4f2540c | ||
|
|
fcc75710cb | ||
|
|
de65c5a6cf | ||
|
|
fde52167b3 | ||
|
|
1ffdf3d283 | ||
|
|
94a49c17f7 | ||
|
|
e515039ad4 | ||
|
|
93f88296da | ||
|
|
1f4e8e752e | ||
|
|
fed9b9a19d | ||
|
|
fbcc71340d | ||
|
|
c6356df81f | ||
|
|
085bd39684 | ||
|
|
b73bef8a0c | ||
|
|
9c662de129 | ||
|
|
caa37b087c | ||
|
|
b63c853889 | ||
|
|
2ff79c7780 | ||
|
|
403cb5a6ad | ||
|
|
b43f196d86 | ||
|
|
483b353494 | ||
|
|
cddc99981d | ||
|
|
01f1f50880 | ||
|
|
8664c3df37 | ||
|
|
f009c43878 | ||
|
|
f8482601a8 | ||
|
|
8c4ab88888 | ||
|
|
37421dd56a | ||
|
|
5c2581a90a | ||
|
|
6a3a630759 | ||
|
|
fff5110e9a | ||
|
|
d31fe9cb71 | ||
|
|
bd762172d4 | ||
|
|
b32a7b3a9e | ||
|
|
3ccc09674e | ||
|
|
c10f10010a | ||
|
|
9beef8f36a | ||
|
|
8408220870 | ||
|
|
2e63993b7f | ||
|
|
b482c7a076 | ||
|
|
733abd5568 | ||
|
|
dd1147f534 | ||
|
|
19c90d356c | ||
|
|
c042e39d54 | ||
|
|
598ae07fc2 | ||
|
|
e5d7612af9 | ||
|
|
f3924dab5b | ||
|
|
ac6f49e63d | ||
|
|
7f4cb3888f | ||
|
|
120c2fe52a | ||
|
|
b9c674d662 | ||
|
|
dcee4677ed | ||
|
|
d590f6d5c1 | ||
|
|
850a370f9d | ||
|
|
40e7ede5e3 | ||
|
|
9a2257dd1e | ||
|
|
7b4eddc967 | ||
|
|
843e37b99d | ||
|
|
19981ce649 | ||
|
|
2740af3571 | ||
|
|
b693e80d75 | ||
|
|
e9ce679649 | ||
|
|
a56d6b568b | ||
|
|
904d09d91c | ||
|
|
3700f7a10b | ||
|
|
d57415d23d | ||
|
|
86649d8314 | ||
|
|
06eca94492 | ||
|
|
ef6f6f95c0 | ||
|
|
991a3e2ab5 | ||
|
|
08c6659804 | ||
|
|
74e4724e66 | ||
|
|
1ea8694769 | ||
|
|
218140066b | ||
|
|
837cfab1bd | ||
|
|
3428b11ea8 | ||
|
|
f661a6bd37 | ||
|
|
c3c1aa5aff | ||
|
|
7bcb6acb03 | ||
|
|
5b22d65dba | ||
|
|
8570c2d287 | ||
|
|
acc797666d | ||
|
|
b62a42bed8 | ||
|
|
b452be880b | ||
|
|
49176ae240 | ||
|
|
8eb4a39e7d | ||
|
|
0f65a1f5dd | ||
|
|
a71edc4040 | ||
|
|
23b6cf1a68 | ||
|
|
3babc6c50a | ||
|
|
a4ef00fe3e | ||
|
|
0f3bbf6368 | ||
|
|
95ebc44f05 | ||
|
|
64945637e0 | ||
|
|
0baf977bc9 | ||
|
|
caa33c29e9 | ||
|
|
d5050338f3 | ||
|
|
7f0877bf28 | ||
|
|
d4c4257517 | ||
|
|
61f76afa0d | ||
|
|
fe86cb4b74 | ||
|
|
5634f48725 | ||
|
|
964d50b4e7 | ||
|
|
d2cb48a2ef | ||
|
|
53411dc5d9 | ||
|
|
cab6089a37 | ||
|
|
32fea64f3e | ||
|
|
bf4e0ca7c0 | ||
|
|
39bd02f741 | ||
|
|
930b1181ee | ||
|
|
1aac8c1e25 | ||
|
|
3e8b110809 | ||
|
|
e0c1bebb13 | ||
|
|
7ccb2aaa9c | ||
|
|
aa2e5f15ee | ||
|
|
ed5e93f373 | ||
|
|
48247ea7fe | ||
|
|
12a5f335bd | ||
|
|
5e19eadd61 | ||
|
|
0e88f0074c | ||
|
|
2bfc67686d | ||
|
|
6c2c8f9900 | ||
|
|
766bf9e401 | ||
|
|
4f8fedbaa0 | ||
|
|
b108c9f11a | ||
|
|
cc380c85b9 | ||
|
|
62165ce01d | ||
|
|
c8b05649f5 | ||
|
|
94fb62fcca | ||
|
|
bef8e8e548 | ||
|
|
88063cd30e | ||
|
|
2185fbff65 | ||
|
|
a94a602d4f | ||
|
|
6ed13bdccb | ||
|
|
ff79ad1338 | ||
|
|
f6703e11c4 | ||
|
|
2e1936dcce | ||
|
|
698ac2758f | ||
|
|
8cef8e5c9e | ||
|
|
c5c53466fb | ||
|
|
acd2e9398b | ||
|
|
df97166f07 | ||
|
|
022fef2b9e | ||
|
|
5f05e8fcaf | ||
|
|
7e353eb0e8 | ||
|
|
499389d2c3 | ||
|
|
7274f606dc | ||
|
|
da52f125f3 | ||
|
|
b418dec3ab | ||
|
|
79401183ca | ||
|
|
270d3b7e5b | ||
|
|
4e3f9914f1 | ||
|
|
dd8e1f2d71 | ||
|
|
f63f019e87 | ||
|
|
11e7c41908 | ||
|
|
57c2fd9b73 | ||
|
|
dc9fe38735 | ||
|
|
622d4ac165 | ||
|
|
3090e13be7 | ||
|
|
f96a36aa43 | ||
|
|
6ad24419ab | ||
|
|
04319a6b41 | ||
|
|
952f6b139d | ||
|
|
f58cb923d4 | ||
|
|
d43067bad4 | ||
|
|
c17ade64e1 | ||
|
|
4ddbba1400 | ||
|
|
536e2a3b7c | ||
|
|
fe97e158ef | ||
|
|
6e3ad3dd6b | ||
|
|
7a2b07eebd | ||
|
|
70235eeeee | ||
|
|
f0f5af4fb0 | ||
|
|
0254a4ec34 | ||
|
|
6d24b07573 | ||
|
|
0d19ec267f | ||
|
|
c63987d726 | ||
|
|
086dcad81f | ||
|
|
eaacf04c68 | ||
|
|
ee859df057 | ||
|
|
d809c6ffa9 | ||
|
|
0cc4d85b37 | ||
|
|
7c2f49146d | ||
|
|
19c2fb6f82 | ||
|
|
882a97566b | ||
|
|
b1d67af206 | ||
|
|
ca1daaaea3 | ||
|
|
b24b1d17e6 | ||
|
|
86b2dcd248 | ||
|
|
bd84c433cd | ||
|
|
238a611cbb | ||
|
|
8b951a306d | ||
|
|
d685fa2a30 | ||
|
|
ae0b036ae4 | ||
|
|
351dee6a12 | ||
|
|
8b748a7840 | ||
|
|
afb01b0258 | ||
|
|
d92ca5f2a9 | ||
|
|
f21909adb8 | ||
|
|
2bf4a25dd1 | ||
|
|
2096e6ea8d | ||
|
|
25cad60ef8 | ||
|
|
8e5b72c833 | ||
|
|
90d9510d23 | ||
|
|
58093eedf0 | ||
|
|
754ad160dc | ||
|
|
12e3b3a490 | ||
|
|
eca12a6587 | ||
|
|
5106b73699 | ||
|
|
98fe1e0121 | ||
|
|
de99077b32 | ||
|
|
e288a3d3a9 | ||
|
|
0588d39911 | ||
|
|
55ec76a23d | ||
|
|
a2eab9e5ab | ||
|
|
f651af970f | ||
|
|
1eecb324d0 | ||
|
|
60a964ae55 | ||
|
|
a7cf8f9ec9 | ||
|
|
0b4e3b9656 | ||
|
|
ca8a8701b4 | ||
|
|
4ca83fcc1a | ||
|
|
509e1ef00a | ||
|
|
42fc0527cb | ||
|
|
8b508fc514 | ||
|
|
2f060cfb43 | ||
|
|
4eb79fb017 | ||
|
|
c38d595cb8 | ||
|
|
e29407486d | ||
|
|
4d3ca94e4c | ||
|
|
e27ec8136e | ||
|
|
9383976918 | ||
|
|
8764270f47 | ||
|
|
2ef85d9aae | ||
|
|
5064e5b0b1 | ||
|
|
72244b1983 | ||
|
|
e14d3eac4d | ||
|
|
62cbe4a833 | ||
|
|
6040e79d50 | ||
|
|
ffe3dd6bca | ||
|
|
853053f56d | ||
|
|
dde431b422 | ||
|
|
e6cf77f34b | ||
|
|
834a5e83ee | ||
|
|
f2173bff26 | ||
|
|
c4b1da66d4 | ||
|
|
9c9f2973f8 | ||
|
|
0c35f32c5c | ||
|
|
f2e3e3dbf1 | ||
|
|
5045098c91 | ||
|
|
20e34bfe15 | ||
|
|
0f63feed22 | ||
|
|
ec6f3098bb | ||
|
|
53f08eae30 | ||
|
|
cade83f075 | ||
|
|
af93088d2f | ||
|
|
e396ad4f67 | ||
|
|
979a77eafa | ||
|
|
c0b42cf29a | ||
|
|
ae4f20bca1 | ||
|
|
b947a466a9 | ||
|
|
4063998ddb | ||
|
|
266397bac3 | ||
|
|
f023b99fa9 | ||
|
|
bb148f9bea | ||
|
|
7bdcbf2e95 | ||
|
|
070d1947e8 | ||
|
|
a4c244cb61 | ||
|
|
e089271f78 | ||
|
|
24887cce83 | ||
|
|
0f7a81ff11 | ||
|
|
2d15445482 | ||
|
|
3236d7dfd1 | ||
|
|
8a06cac5f1 | ||
|
|
60d5c6b55e | ||
|
|
77c6e0dbff | ||
|
|
3e22aabe28 | ||
|
|
bedea9eb05 | ||
|
|
0d8e5ec77c | ||
|
|
de840af331 | ||
|
|
255b2b2320 | ||
|
|
034b7a642e | ||
|
|
407f9ca6ad | ||
|
|
bf1d8b1be4 | ||
|
|
562f3ea937 | ||
|
|
0a29fb89c4 | ||
|
|
27daddcb72 | ||
|
|
c7b00ee8c6 | ||
|
|
1d7c7fd8af | ||
|
|
6b06e78b61 | ||
|
|
9ec1882032 | ||
|
|
18fc86d68a | ||
|
|
a628d5bb59 | ||
|
|
df1e1cd334 | ||
|
|
d6c6eaa064 | ||
|
|
b4bdb08dc1 | ||
|
|
ae9c21e293 | ||
|
|
b65c8f696b | ||
|
|
88e6e4bf56 | ||
|
|
8f4597045d | ||
|
|
a7f12ad871 | ||
|
|
4e791d50d4 | ||
|
|
9758e55b72 | ||
|
|
473239cc9a | ||
|
|
477cac6ca9 | ||
|
|
258e9738f7 | ||
|
|
39de0892f1 | ||
|
|
36ec4e09fd | ||
|
|
aa4e6b7f36 | ||
|
|
6440645c5a | ||
|
|
4585519943 | ||
|
|
1f16bc9a7b | ||
|
|
4b9cbf9aee | ||
|
|
e0cc7dbffa | ||
|
|
fd9d78061b | ||
|
|
b03d57f40a | ||
|
|
4e6e70c14d | ||
|
|
2ef9a77325 | ||
|
|
18b9fb3ee2 | ||
|
|
02f2554cc1 | ||
|
|
07961c9f21 | ||
|
|
f770b3cf14 | ||
|
|
62dd006d50 | ||
|
|
9ff845d375 | ||
|
|
58860dca48 | ||
|
|
f2e397f533 | ||
|
|
5afff12848 | ||
|
|
37abf19f0d | ||
|
|
bbbd7faeb1 | ||
|
|
c1382dc0aa | ||
|
|
a73f2654df | ||
|
|
abc9a6ffbf | ||
|
|
87e32a159b | ||
|
|
22f0aee55d | ||
|
|
01420ff1d8 | ||
|
|
c4b5d13348 | ||
|
|
9cf2d47eef | ||
|
|
a9d6d6f820 | ||
|
|
f70d303942 | ||
|
|
967c3aa591 | ||
|
|
3a47fb2c79 | ||
|
|
1112186d1c | ||
|
|
f40332f197 | ||
|
|
a11813f4b2 | ||
|
|
13d396a388 | ||
|
|
3d3458d577 | ||
|
|
e142785a9d | ||
|
|
ddac3a9871 | ||
|
|
bdb15aa0bb | ||
|
|
6693b131d8 | ||
|
|
41efc66d25 | ||
|
|
a5197b4ced | ||
|
|
d49d40768c | ||
|
|
c71264ab30 | ||
|
|
8f1fd17f5c | ||
|
|
7179bb79a0 | ||
|
|
bb64a2f1ec | ||
|
|
3f0dfd63d4 | ||
|
|
46f7ec7af9 | ||
|
|
999c1b4239 | ||
|
|
f6b2535cdb | ||
|
|
5f1c868006 | ||
|
|
59366e4d3a | ||
|
|
bea0532872 | ||
|
|
e684c583fb | ||
|
|
eed2f073a0 | ||
|
|
31a03aa331 | ||
|
|
71984c72b5 | ||
|
|
72573e32cb | ||
|
|
50f4cc10c4 | ||
|
|
c2f98583e1 | ||
|
|
1ff6d0a2dc | ||
|
|
92ac8b09c0 | ||
|
|
384e993ca1 | ||
|
|
c1241fdfbc | ||
|
|
be9d6ac660 | ||
|
|
30b469ddbd | ||
|
|
22ee99f222 | ||
|
|
f4675f0a34 | ||
|
|
111c6fc1bf | ||
|
|
0cd2761021 | ||
|
|
0a7c8988c6 | ||
|
|
7947533182 | ||
|
|
184c39d311 | ||
|
|
d89eaec596 | ||
|
|
40ce0d75ed | ||
|
|
61bd28db31 | ||
|
|
b1426945d4 | ||
|
|
dec9097ce7 | ||
|
|
7bb93e8351 | ||
|
|
7a84223d5b | ||
|
|
398628870c | ||
|
|
3e426537c7 | ||
|
|
bf1bd3ef5a | ||
|
|
b85b1e44ef | ||
|
|
ff194c0382 | ||
|
|
078f7cfc90 | ||
|
|
bd72a773f4 | ||
|
|
9637fb4bf3 | ||
|
|
22dc5c909c | ||
|
|
cd4336d438 | ||
|
|
fb619e0fa9 | ||
|
|
08dbc3c035 | ||
|
|
3fba4390c5 | ||
|
|
500585a0a0 | ||
|
|
acaa88f1a9 | ||
|
|
005dc47868 | ||
|
|
9c1c894e29 | ||
|
|
b055bc73c5 | ||
|
|
322cbf27dc | ||
|
|
417a13c1be | ||
|
|
05819497e4 | ||
|
|
66c93f472a | ||
|
|
023b23a0ef | ||
|
|
900896c045 | ||
|
|
db97453c54 | ||
|
|
3fdd61edfc | ||
|
|
e839c6bd6b | ||
|
|
2d9bc50401 | ||
|
|
c48d8b93dd | ||
|
|
e2e96a04d1 | ||
|
|
c724896ecd | ||
|
|
914aaa0a96 | ||
|
|
b5becda6fc | ||
|
|
37868777e7 | ||
|
|
3663ed0235 | ||
|
|
7fa84af66a | ||
|
|
55718a09e0 | ||
|
|
3754e0cbe3 | ||
|
|
3df2536bb6 | ||
|
|
9e07f1924c | ||
|
|
fbf4544849 | ||
|
|
2d4e6bb8da | ||
|
|
211dfc62e4 | ||
|
|
679c5892a4 | ||
|
|
1dac755787 | ||
|
|
1f4e0f5e73 | ||
|
|
b616894f2e | ||
|
|
7a910709f9 | ||
|
|
d61f8dac2e | ||
|
|
6d1fecc408 | ||
|
|
366d44959e | ||
|
|
d37c8f5387 | ||
|
|
06c5ca412a | ||
|
|
afa95f79cd | ||
|
|
8fe3457e0a | ||
|
|
7bfd60be86 | ||
|
|
b7284ada94 | ||
|
|
66e2dc73f9 | ||
|
|
d254e5670b | ||
|
|
9c945b33fb | ||
|
|
c53a66d20e | ||
|
|
335b113327 | ||
|
|
122590265d | ||
|
|
aab2f8b090 | ||
|
|
f0a4c130f6 | ||
|
|
029f0a09ba | ||
|
|
8fe3d2b0b3 | ||
|
|
25c31fcb2e | ||
|
|
2a74809294 | ||
|
|
09154e40aa | ||
|
|
2e9b236406 | ||
|
|
1f88b72dba | ||
|
|
0c133afbaf | ||
|
|
2f87121e27 | ||
|
|
b72e2d3fe0 | ||
|
|
4119414079 | ||
|
|
955fe6795d | ||
|
|
fbbb59971c | ||
|
|
0a6df20b7d | ||
|
|
d640d86160 | ||
|
|
6a70bed30f | ||
|
|
91503cfd25 | ||
|
|
56feba9b45 | ||
|
|
5eec7c317c | ||
|
|
04c650528f | ||
|
|
e8ba0fb0bb | ||
|
|
22cb24da09 | ||
|
|
8204641656 | ||
|
|
c5ba127b9e | ||
|
|
d2be562619 | ||
|
|
a4c8638448 | ||
|
|
51cf58fcdf | ||
|
|
b00b7817f2 | ||
|
|
6b1e432f6d | ||
|
|
f590194fba | ||
|
|
72ec59bdac | ||
|
|
a07df519ab | ||
|
|
7bf3049f4a | ||
|
|
a88315ee74 | ||
|
|
c182c70b8d | ||
|
|
fab8568633 | ||
|
|
74545012ed | ||
|
|
903a1654b6 | ||
|
|
7161c1ac4e | ||
|
|
a9cf307cbf | ||
|
|
f9cfcaeabe | ||
|
|
b9aacf28e5 | ||
|
|
54512491b7 | ||
|
|
a3fee54f7a | ||
|
|
e5f05aa724 | ||
|
|
312c2d1574 | ||
|
|
7289636d35 | ||
|
|
733da1ea94 | ||
|
|
a1b4344943 | ||
|
|
3c26beb48c | ||
|
|
c0049326b6 | ||
|
|
543d345aea | ||
|
|
fb1354898c | ||
|
|
e0263edc54 | ||
|
|
b3a7d7c9a8 | ||
|
|
a8008a9418 | ||
|
|
e82f560c44 | ||
|
|
3589c7de69 | ||
|
|
72cf2c7578 | ||
|
|
eddd77d2d9 | ||
|
|
5d61468de6 | ||
|
|
e85debddfc | ||
|
|
d45ea02562 | ||
|
|
bad43090ff | ||
|
|
c2867d9638 | ||
|
|
6dbbbac344 | ||
|
|
e903f609a5 | ||
|
|
9dd1f1f90b | ||
|
|
4b22390faf | ||
|
|
9dbfef3df8 | ||
|
|
28c794b2da | ||
|
|
ee96ce5046 | ||
|
|
28d311e759 | ||
|
|
d355393074 | ||
|
|
7b220da936 | ||
|
|
a1130b0e7c | ||
|
|
8bba55e441 | ||
|
|
d6d2e32b2e | ||
|
|
37c8317410 | ||
|
|
19337b230c | ||
|
|
d0ec6d8244 | ||
|
|
a232e7dfcd | ||
|
|
9b0a8dbb07 | ||
|
|
2e7a2a07ac | ||
|
|
36e119770a | ||
|
|
ac2efd2baf | ||
|
|
5bd9c5fefc | ||
|
|
68bccb4d3f | ||
|
|
284b2c0db3 | ||
|
|
83a63da6c4 | ||
|
|
dc7c0885a7 | ||
|
|
82a42f3649 | ||
|
|
30b600fe36 | ||
|
|
eedfc99064 | ||
|
|
80c316201d | ||
|
|
a8f7f6a04e | ||
|
|
94eb306692 | ||
|
|
e673c5340c | ||
|
|
3c7c836b64 | ||
|
|
7068faaa92 | ||
|
|
d063bc0e78 | ||
|
|
c6442ed68a | ||
|
|
ebb95a8292 | ||
|
|
7a185b5054 | ||
|
|
0bd9b5b0d1 | ||
|
|
74e85cdadc | ||
|
|
82dadb31b5 | ||
|
|
b65e56b9fd | ||
|
|
0b696202e7 | ||
|
|
5d0c6c0c6e | ||
|
|
99d2d7a2ae | ||
|
|
0e8b626528 | ||
|
|
d80ce1d8c5 | ||
|
|
86c0520076 | ||
|
|
966870200b | ||
|
|
a3004a5140 | ||
|
|
dc97556807 | ||
|
|
79d8aeee11 | ||
|
|
d5430256c7 | ||
|
|
6691801721 | ||
|
|
46c1c972ab | ||
|
|
4339a653ce | ||
|
|
299122f965 | ||
|
|
a6b160caed | ||
|
|
a5672bc1b3 | ||
|
|
6e5dff6454 | ||
|
|
38e060f704 | ||
|
|
227652ec8f | ||
|
|
fa263eb68d | ||
|
|
d3992b81ef | ||
|
|
c430657738 | ||
|
|
d78301567b | ||
|
|
bddd93cd80 | ||
|
|
a659820b07 | ||
|
|
d32f9ef763 | ||
|
|
920dd9a947 | ||
|
|
3f352a393b | ||
|
|
86df27587e | ||
|
|
7b1ccd956b | ||
|
|
e928faf4f9 | ||
|
|
70e2cefd98 | ||
|
|
49e8dbe5f6 | ||
|
|
250dd0c92d | ||
|
|
d4adafbcb7 | ||
|
|
ffc98f31c9 | ||
|
|
1a71de851a | ||
|
|
dd67efe0f6 | ||
|
|
033383eea4 | ||
|
|
ee873a4ae2 | ||
|
|
5667a6ee09 | ||
|
|
d26a4a35ab | ||
|
|
d7acc88c05 | ||
|
|
1ab6dfceb1 | ||
|
|
a90c746626 | ||
|
|
fb1b5802ab | ||
|
|
69ceeff9b8 | ||
|
|
b2baef0643 | ||
|
|
2d1a2fd187 | ||
|
|
6d02d8876a | ||
|
|
712d0051d9 | ||
|
|
e64a892275 | ||
|
|
2e8a8966d7 | ||
|
|
f9b3db4058 | ||
|
|
633f224be6 | ||
|
|
79501b46fe | ||
|
|
df55398100 | ||
|
|
2bcb20d710 | ||
|
|
79ae96f15d | ||
|
|
ac6d269d90 | ||
|
|
a4026e8c25 | ||
|
|
b448dad860 | ||
|
|
17762d9daa | ||
|
|
205201668c | ||
|
|
522cfca0af | ||
|
|
9bef8ddee3 | ||
|
|
7999c1fbe5 | ||
|
|
bec893d662 | ||
|
|
6f999f6a87 | ||
|
|
10fef82225 | ||
|
|
ebbcfa3157 | ||
|
|
313144bebf | ||
|
|
c6b5a5b400 | ||
|
|
1fdcbd848c | ||
|
|
e63e741ad6 | ||
|
|
282aede691 | ||
|
|
e5b95921cf | ||
|
|
8c6726800f | ||
|
|
6987b3b4d4 | ||
|
|
28a2196143 | ||
|
|
5b9a03a261 | ||
|
|
228ffcfbc9 | ||
|
|
cc3b3575b6 | ||
|
|
ecacc71596 | ||
|
|
b2ad4b6995 | ||
|
|
86929d8f69 | ||
|
|
39fa7e3e17 | ||
|
|
70bc909565 | ||
|
|
9ebe967e28 | ||
|
|
93c35fd0ec | ||
|
|
2e80e82fc4 | ||
|
|
2d19a1e86a | ||
|
|
91700ab93e | ||
|
|
ecc736be8b | ||
|
|
8feb2287cc | ||
|
|
e8d907156c | ||
|
|
744980f119 | ||
|
|
7f4dd8859e | ||
|
|
f3962266b4 | ||
|
|
b867c985ed | ||
|
|
0baa06cee0 | ||
|
|
e84d7f8741 | ||
|
|
8c5e9534b2 | ||
|
|
8f5a9c9349 | ||
|
|
e11d1dd5d9 | ||
|
|
df7210f9ad | ||
|
|
8eead759d9 | ||
|
|
c6b9fd181f | ||
|
|
c4ad9f1e88 | ||
|
|
8455994118 | ||
|
|
2495405511 | ||
|
|
68f6312953 | ||
|
|
e87b8dc368 | ||
|
|
6083484d19 | ||
|
|
3bdd0a7265 | ||
|
|
9d509efe35 | ||
|
|
97acc7d1d0 | ||
|
|
3534aa7e69 | ||
|
|
700370f70f | ||
|
|
95c96b3894 | ||
|
|
fdce55cf3b | ||
|
|
9d118e0ef3 | ||
|
|
18ef32a34c | ||
|
|
cfd81a91fc | ||
|
|
87ebbcd7ec | ||
|
|
4b2ebf4761 | ||
|
|
1482cfcf32 | ||
|
|
472ed62c12 | ||
|
|
04822e9d8f | ||
|
|
fe81c6cad7 | ||
|
|
6e6771ff3b | ||
|
|
e5fc1bef44 | ||
|
|
68b213b737 | ||
|
|
ceb86a2d5f | ||
|
|
6bd28ba82e | ||
|
|
dbc0c0ad40 | ||
|
|
6baebfad11 | ||
|
|
536b154aaa | ||
|
|
db75a5fb74 | ||
|
|
be1e161f31 | ||
|
|
7864114d7c | ||
|
|
405114a893 | ||
|
|
a90adf1212 | ||
|
|
6c5fb4cd35 | ||
|
|
a443710669 | ||
|
|
9e881bc9a5 | ||
|
|
4197cfba98 | ||
|
|
4ec1086fc9 | ||
|
|
3d11f2cacc | ||
|
|
b4ce2e8167 | ||
|
|
5527ed0a86 | ||
|
|
107ad572f8 | ||
|
|
f16315328b | ||
|
|
ae705e1b40 | ||
|
|
2d9287805e | ||
|
|
ed35ddc388 | ||
|
|
8379624581 | ||
|
|
86b31575eb | ||
|
|
654e4278fa | ||
|
|
f9c6c0465a | ||
|
|
9cb3bd564b | ||
|
|
bc884175be | ||
|
|
fb6e789909 | ||
|
|
944982898e | ||
|
|
a8357dffb9 | ||
|
|
50f5c6a98d | ||
|
|
f5d050f3f2 | ||
|
|
2a79303241 | ||
|
|
a72fa5b8dd | ||
|
|
66421ae557 | ||
|
|
4b2f6a2c27 | ||
|
|
9b99fe61e0 | ||
|
|
e0584066a9 | ||
|
|
d70e60d4a5 | ||
|
|
7abec2ccb8 | ||
|
|
16a39410b8 | ||
|
|
b63c4e510c | ||
|
|
520dda70c0 | ||
|
|
b6169ac706 | ||
|
|
080d921791 | ||
|
|
a283329e4d | ||
|
|
5bb48df01d | ||
|
|
b3e961a3c6 | ||
|
|
420b61ab52 | ||
|
|
dbd81eed2b | ||
|
|
d0a00236ba | ||
|
|
01aa9352aa | ||
|
|
5c258520a2 | ||
|
|
c232260e46 | ||
|
|
bce825ff32 | ||
|
|
3c1ed52bb9 | ||
|
|
982fc6aaa2 | ||
|
|
19890460b9 | ||
|
|
a46824c8ab | ||
|
|
bbfa03c894 | ||
|
|
56d1f7b6eb | ||
|
|
1d2e183839 | ||
|
|
d741f24e8c | ||
|
|
22489f2dec | ||
|
|
163c116871 | ||
|
|
7d5d791376 | ||
|
|
4b3f11418e | ||
|
|
0b4d1639c6 | ||
|
|
018d19857d | ||
|
|
4233c36fd0 | ||
|
|
8375caaaba | ||
|
|
12ae7bbf56 | ||
|
|
8555ad5118 | ||
|
|
eeffa02f59 | ||
|
|
7003e3a03b | ||
|
|
fc023fd833 | ||
|
|
b45a968a9a | ||
|
|
8dac520a79 | ||
|
|
6237673725 | ||
|
|
0f9ec99c1d | ||
|
|
433da35d34 | ||
|
|
1a675ed40e | ||
|
|
a1c47b7ca3 | ||
|
|
6c8e7b024f | ||
|
|
76d7b8c3b8 | ||
|
|
2b1387620b | ||
|
|
2d0fa2d26f | ||
|
|
3eca4b3dac | ||
|
|
436ae6c610 | ||
|
|
70c00f1424 | ||
|
|
61fc79ff47 | ||
|
|
7dfefedf77 | ||
|
|
48ce07eaa1 | ||
|
|
61d0f87f5b | ||
|
|
2ee7668382 | ||
|
|
eaf1d1be6d | ||
|
|
36a24add6e | ||
|
|
e66c14b086 | ||
|
|
6b646e3510 | ||
|
|
a727a7f377 |
@@ -1 +0,0 @@
|
||||
web
|
||||
18
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,18 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report a bug encountered while operating Nightingale
|
||||
labels: kind/bug
|
||||
---
|
||||
|
||||
**What happened**:
|
||||
|
||||
**What you expected to happen**:
|
||||
|
||||
**How to reproduce it (as minimally and precisely as possible)**:
|
||||
|
||||
**Anything else we need to know?**:
|
||||
|
||||
**Environment**:
|
||||
- OS (e.g: `cat /etc/os-release`):
|
||||
- Logs:
|
||||
- Others:
|
||||
67
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Bug Report
|
||||
description: Report a bug encountered while running Nightingale
|
||||
labels: ["kind/bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking time to fill out this bug report!
|
||||
The more detailed the form is filled in, the easier the problem will be solved.
|
||||
- type: textarea
|
||||
id: config
|
||||
attributes:
|
||||
label: Relevant server.conf | webapi.conf
|
||||
description: Place config in the toml code section. This will be automatically formatted into toml, so no need for backticks.
|
||||
render: toml
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant logs
|
||||
description: categraf | telegraf | server | webapi | prometheus | chrome request/response ...
|
||||
render: text
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: system-info
|
||||
attributes:
|
||||
label: System info
|
||||
description: Include nightingale version, operating system, and other relevant details
|
||||
placeholder: ex. n9e 5.9.2, n9e-fe 5.5.0, categraf 0.1.0, Ubuntu 20.04, Docker 20.10.8
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Describe the steps to reproduce the bug.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: Describe what you expected to happen when you performed the above steps.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: actual-behavior
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: Describe what actually happened when you performed the above steps.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional-info
|
||||
attributes:
|
||||
label: Additional info
|
||||
description: Include gist of relevant config, logs, etc.
|
||||
validations:
|
||||
required: false
|
||||
6
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Nightingale community
|
||||
url: https://n9e.didiyun.com/community/
|
||||
about: List of communication channels for the Nightingale community.
|
||||
- name: Nightingale docs
|
||||
url: https://n9e.github.io/
|
||||
about: You may want to read through the document before asking questions.
|
||||
44
.github/workflows/n9e.yml
vendored
@@ -1,26 +1,32 @@
|
||||
name: Go
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
tags:
|
||||
- 'v*'
|
||||
env:
|
||||
GO_VERSION: 1.18
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
run: ./control build
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Go Environment
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
26
.gitignore
vendored
@@ -29,25 +29,27 @@ _test
|
||||
/build
|
||||
/dist
|
||||
/etc/*.local.yml
|
||||
/etc/log/log.test.json
|
||||
/etc/*.local.conf
|
||||
/etc/plugins/*.local.yml
|
||||
/data*
|
||||
/tarball
|
||||
/run
|
||||
/vendor
|
||||
/tmp
|
||||
/pub
|
||||
/n9e
|
||||
/docker/pub
|
||||
/docker/n9e
|
||||
/docker/mysqldata
|
||||
|
||||
.alerts
|
||||
.idea
|
||||
.index
|
||||
.vscode
|
||||
.DS_Store
|
||||
.cache-loader
|
||||
.payload
|
||||
queries.active
|
||||
|
||||
/n9e-*
|
||||
|
||||
/src/modules/index/index
|
||||
/src/modules/collector/collector
|
||||
/src/modules/transfer/transfer
|
||||
/src/modules/tsdb/tsdb
|
||||
/src/modules/monapi/monapi
|
||||
|
||||
/web/node_modules
|
||||
/web/.cache-loader
|
||||
/web/yarn.lock
|
||||
|
||||
|
||||
|
||||
88
.goreleaser.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
before:
|
||||
hooks:
|
||||
# You may remove this if you don't use go modules.
|
||||
- go mod tidy
|
||||
|
||||
snapshot:
|
||||
name_template: '{{ .Tag }}'
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
changelog:
|
||||
skip: true
|
||||
|
||||
builds:
|
||||
- id: build
|
||||
hooks:
|
||||
pre:
|
||||
- ./fe.sh
|
||||
main: ./src/
|
||||
binary: n9e
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X github.com/didi/nightingale/v5/src/pkg/version.VERSION={{ .Tag }}-{{.Commit}}
|
||||
|
||||
archives:
|
||||
- id: n9e
|
||||
builds:
|
||||
- build
|
||||
format: tar.gz
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
name_template: "n9e-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
|
||||
wrap_in_directory: false
|
||||
files:
|
||||
- docker/*
|
||||
- etc/*
|
||||
- pub/*
|
||||
|
||||
release:
|
||||
github:
|
||||
owner: ccfos
|
||||
name: nightingale
|
||||
name_template: "v{{ .Version }}"
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
- flashcatcloud/nightingale:{{ .Version }}-amd64
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- build
|
||||
dockerfile: docker/Dockerfile.goreleaser
|
||||
extra_files:
|
||||
- pub
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- image_templates:
|
||||
- flashcatcloud/nightingale:{{ .Version }}-arm64v8
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
ids:
|
||||
- build
|
||||
dockerfile: docker/Dockerfile.goreleaser
|
||||
extra_files:
|
||||
- pub
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64/v8"
|
||||
|
||||
docker_manifests:
|
||||
|
||||
- name_template: flashcatcloud/nightingale:{{ .Version }}
|
||||
image_templates:
|
||||
- flashcatcloud/nightingale:{{ .Version }}-amd64
|
||||
- flashcatcloud/nightingale:{{ .Version }}-arm64v8
|
||||
|
||||
- name_template: flashcatcloud/nightingale:latest
|
||||
image_templates:
|
||||
- flashcatcloud/nightingale:{{ .Version }}-amd64
|
||||
- flashcatcloud/nightingale:{{ .Version }}-arm64v8
|
||||
11
Dockerfile
@@ -1,11 +0,0 @@
|
||||
FROM golang:1.13
|
||||
|
||||
LABEL maintainer="llitfkitfk@gmail.com,chenjiandongx@qq.com"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install net-tools -y
|
||||
|
||||
COPY . .
|
||||
RUN ./control build docker
|
||||
RUN mv /app/bin/* /usr/local/bin
|
||||
42
Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
.PHONY: start build
|
||||
|
||||
NOW = $(shell date -u '+%Y%m%d%I%M%S')
|
||||
|
||||
RELEASE_VERSION = 5.9.4
|
||||
|
||||
APP = n9e
|
||||
SERVER_BIN = $(APP)
|
||||
# RELEASE_ROOT = release
|
||||
# RELEASE_SERVER = release/${APP}
|
||||
# GIT_COUNT = $(shell git rev-list --all --count)
|
||||
# GIT_HASH = $(shell git rev-parse --short HEAD)
|
||||
# RELEASE_TAG = $(RELEASE_VERSION).$(GIT_COUNT).$(GIT_HASH)
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
go build -ldflags "-w -s -X github.com/didi/nightingale/v5/src/pkg/version.VERSION=$(RELEASE_VERSION)" -o $(SERVER_BIN) ./src
|
||||
|
||||
# start:
|
||||
# @go run -ldflags "-X main.VERSION=$(RELEASE_TAG)" ./cmd/${APP}/main.go web -c ./configs/config.toml -m ./configs/model.conf --menu ./configs/menu.yaml
|
||||
run_webapi:
|
||||
nohup ./n9e webapi > webapi.log 2>&1 &
|
||||
|
||||
run_server:
|
||||
nohup ./n9e server > server.log 2>&1 &
|
||||
|
||||
# swagger:
|
||||
# @swag init --parseDependency --generalInfo ./cmd/${APP}/main.go --output ./internal/app/swagger
|
||||
|
||||
# wire:
|
||||
# @wire gen ./internal/app
|
||||
|
||||
# test:
|
||||
# cd ./internal/app/test && go test -v
|
||||
|
||||
# clean:
|
||||
# rm -rf data release $(SERVER_BIN) internal/app/test/data cmd/${APP}/data
|
||||
|
||||
pack: build
|
||||
rm -rf $(APP)-$(RELEASE_VERSION).tar.gz
|
||||
tar -zcvf $(APP)-$(RELEASE_VERSION).tar.gz docker etc $(SERVER_BIN) pub/font pub/index.html pub/assets pub/image
|
||||
124
README.md
@@ -1,54 +1,102 @@
|
||||
<img src="https://s3-gz01.didistatic.com/n9e-pub/image/n9e-logo-bg-white.png" width="200" alt="Nightingale"/>
|
||||
<br>
|
||||
<img src="doc/img/ccf-n9e.png" width="240">
|
||||
|
||||
[中文简介](README_ZH.md)
|
||||
[English](./README_EN.md) | [中文](./README.md)
|
||||
|
||||
Nightingale is a fork of Open-Falcon, and all the core modules have been greatly optimized. It integrates the best practices of DiDi. You can think of it as the next generation of Open-Falcon, and use directly in production environment.
|
||||
> 夜莺是一款开源的云原生监控系统,采用 All-In-One 的设计,提供企业级的功能特性,开箱即用的产品体验。推荐升级您的 Prometheus + AlertManager + Grafana 组合方案到夜莺。
|
||||
|
||||
## Documentation
|
||||
**夜莺监控具有以下特点:**
|
||||
|
||||
Nightingale user manual: [https://n9e.didiyun.com/](https://n9e.didiyun.com/)
|
||||
#### 1. 开箱即用
|
||||
支持 Docker、Helm Chart 等多种部署方式,内置多种监控大盘、快捷视图、告警规则模板,导入即可快速使用,活跃、专业的社区用户也在持续迭代和沉淀更多的最佳实践于产品中;
|
||||
|
||||
## Compile
|
||||
#### 2. 兼容并包
|
||||
支持 [Categraf](https://github.com/flashcatcloud/categraf)、Telegraf、Grafana-agent 等多种采集器,支持 Prometheus、VictoriaMetrics、M3DB 等各种时序数据库,支持对接 Grafana,与云原生生态无缝集成;
|
||||
|
||||
```bash
|
||||
mkdir -p $GOPATH/src/github.com/didi
|
||||
cd $GOPATH/src/github.com/didi
|
||||
git clone https://github.com/didi/nightingale.git
|
||||
cd nightingale
|
||||
./control build
|
||||
```
|
||||
#### 3. 开放社区
|
||||
托管于[中国计算机学会开源发展委员会](https://www.ccf.org.cn/kyfzwyh/),有[快猫星云](https://flashcat.cloud)的持续投入,和数千名社区用户的积极参与,以及夜莺监控项目清晰明确的定位,都保证了夜莺开源社区健康、长久的发展;
|
||||
|
||||
## Quickstart with Docker
|
||||
#### 4. 高性能
|
||||
得益于夜莺的多数据源管理引擎,和夜莺引擎侧优秀的架构设计,借助于高性能时序库,可以满足数亿时间线的采集、存储、告警分析场景,节省大量成本;
|
||||
|
||||
We has offered a Docker demo for the users who want to give it a try. Before you get started, make sure you have installed **Docker** & **docker-compose** and there are some details you should know.
|
||||
#### 5. 高可用
|
||||
夜莺监控组件均可水平扩展,无单点,已在上千家企业部署落地,经受了严苛的生产实践检验。众多互联网头部公司,夜莺集群机器达百台,处理十亿级时间线,重度使用夜莺监控;
|
||||
|
||||
* We highly recommend users prepare a new VM environment to use it.
|
||||
* All the core components will be installed on your OS according to the `docker-compose.yaml`.
|
||||
* Nightingale will use the following ports, `80`, `5800`, `5810`, `5811`, `5820`, `5821`, `5830`, `5831`, `5840`, `5841`, `6379`, `2058`, `3306`.
|
||||
|
||||
Okay. Run it! Once the docker finish its jobs, visits http://your-env-ip in your broswer. Default username and password is `root:root`.
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Upgrading
|
||||
If upgrade `version<1.4.0` to `v1.4.0`, follow the operating instructions in [v1.4.0](https://github.com/didi/nightingale/releases/tag/V1.4.0) release
|
||||
#### 6. 灵活扩展
|
||||
夜莺监控,可部署在1核1G的云主机,可在上百台机器部署集群,可运行在K8s中;也可将时序库、告警引擎等组件下沉到各机房、各region,兼顾边缘部署和中心化管理;
|
||||
|
||||
|
||||
## Team
|
||||
#### 如果您在使用 Prometheus 过程中,有以下的一个或者多个需求场景,推荐您升级到夜莺:
|
||||
|
||||
[ulricqin](https://github.com/ulricqin) [710leo](https://github.com/710leo) [jsers](https://github.com/jsers) [hujter](https://github.com/hujter) [n4mine](https://github.com/n4mine) [heli567](https://github.com/heli567)
|
||||
- Prometheus、Alertmanager、Grafana 等多个系统较为割裂,缺乏统一视图,无法开箱即用;
|
||||
- 通过修改配置文件来管理 Prometheus、Alertmanager 的方式,学习曲线大,协同有难度;
|
||||
- 数据量过大而无法扩展您的 Prometheus 集群;
|
||||
- 生产环境运行多套 Prometheus 集群,面临管理和使用成本高的问题;
|
||||
|
||||
## Community
|
||||
#### 如果您在使用 Zabbix,有以下的场景,推荐您升级到夜莺:
|
||||
|
||||
Nightingale is developed in open. Here we set up an organization, [github.com/n9e](https://github.com/n9e), which is used to communicate and contribute. We sincerely hope more developers can use their creativity to make lots of related projects for the Nightingale ecosystem.
|
||||
- 监控的数据量太大,希望有更好的扩展解决方案;
|
||||
- 学习曲线高,多人多团队模式下,希望有更好的协同使用效率;
|
||||
- 微服务和云原生架构下,监控数据的生命周期多变、监控数据维度基数高,Zabbix 数据模型不易适配;
|
||||
|
||||
#### 如果您在使用 [open-falcon](https://github.com/open-falcon/falcon-plus),我们更推荐您升级到夜莺:
|
||||
- 关于open-falcon和夜莺的详细介绍,请参考阅读[《云原生监控的十个特点和趋势》](https://mp.weixin.qq.com/s?__biz=MzkzNjI5OTM5Nw==&mid=2247483738&idx=1&sn=e8bdbb974a2cd003c1abcc2b5405dd18&chksm=c2a19fb0f5d616a63185cd79277a79a6b80118ef2185890d0683d2bb20451bd9303c78d083c5#rd)。
|
||||
|
||||
#### 我们推荐您使用 [Categraf](https://github.com/flashcatcloud/categraf) 作为首选的监控数据采集器:
|
||||
- Categraf 是夜莺监控的默认采集器,采用开放插件机制和 all-in-one 的设计,同时支持 metric、log、trace、event 的采集。Categraf 不仅可以采集 CPU、内存、网络等系统层面的指标,也集成了众多开源组件的采集能力,支持K8s生态。Categraf 内置了对应的仪表盘和告警规则,开箱即用。
|
||||
|
||||
|
||||
## 资料链接
|
||||
|
||||
- [快速安装](https://mp.weixin.qq.com/s/iEC4pfL1TgjMDOWYh8H-FA)
|
||||
- [详细文档](https://n9e.github.io/)
|
||||
- [社区分享](https://n9e.github.io/docs/prologue/share/)
|
||||
|
||||
## 产品演示
|
||||
|
||||
<img src="doc/img/intro.gif" width="680">
|
||||
|
||||
## 架构介绍
|
||||
|
||||
<img src="doc/img/arch-product.png" width="680">
|
||||
|
||||
Nightingale 可以接收各种采集器上报的监控数据(比如 [Categraf](https://github.com/flashcatcloud/categraf)、telegraf、grafana-agent、Prometheus),并写入多种流行的时序数据库中(可以支持Prometheus、M3DB、VictoriaMetrics、Thanos、TDEngine等),提供告警规则、屏蔽规则、订阅规则的配置能力,提供监控数据的查看能力,提供告警自愈机制(告警触发之后自动回调某个webhook地址或者执行某个脚本),提供历史告警事件的存储管理、分组查看的能力。
|
||||
|
||||
|
||||
<img src="doc/img/arch-system.png" width="680">
|
||||
|
||||
夜莺 v5 版本的设计非常简单,核心是 server 和 webapi 两个模块,webapi 无状态,放到中心端,承接前端请求,将用户配置写入数据库;server 是告警引擎和数据转发模块,一般随着时序库走,一个时序库就对应一套 server,每套 server 可以只用一个实例,也可以多个实例组成集群,server 可以接收 Categraf、Telegraf、Grafana-Agent、Datadog-Agent、Falcon-Plugins 上报的数据,写入后端时序库,周期性从数据库同步告警规则,然后查询时序库做告警判断。每套 server 依赖一个 redis。
|
||||
|
||||
|
||||
<img src="doc/img/install-vm.png" width="680">
|
||||
|
||||
如果单机版本的 Prometheus 性能不够或容灾较差,我们推荐使用 [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics),VictoriaMetrics 架构较为简单,性能优异,易于部署和运维,架构图如上。VictoriaMetrics 更详尽的文档,还请参考其[官网](https://victoriametrics.com/)。
|
||||
|
||||
|
||||
## 如何参与
|
||||
|
||||
开源项目要更有生命力,离不开开放的治理架构和源源不断的开发者和用户共同参与,我们致力于建立开放、中立的开源治理架构,吸纳更多来自企业、高校等各方面对云原生监控感兴趣、有热情的计算机专业人士,打造专业、有活力的开发者社区。关于《夜莺开源项目和社区治理架构(草案)》,请查阅 [doc/community-governance.md](./doc/community-governance.md).
|
||||
|
||||
**我们欢迎您以各种方式参与到夜莺开源项目和开源社区中来,工作包括不限于**:
|
||||
- 补充和完善文档 => [n9e.github.io](https://n9e.github.io/);
|
||||
- 分享您在使用夜莺监控过程中的最佳实践和经验心得 => [文章分享](https://n9e.github.io/docs/prologue/share/);
|
||||
- 提交产品建议 =》 [github issue](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Ffeature&template=enhancement.md);
|
||||
- 提交代码,让夜莺监控更快、更稳、更好用 => [github pull request](https://github.com/didi/nightingale/pulls);
|
||||
|
||||
|
||||
**尊重、认可和记录每一位贡献者的工作**是夜莺开源社区的第一指导原则,我们提倡**高效的提问**,这既是对开发者时间的尊重,也是对整个社区知识沉淀的贡献:
|
||||
1. 提问之前请先查阅 [FAQ](https://www.gitlink.org.cn/ccfos/nightingale/wiki/faq) ;
|
||||
2. 提问之前请先搜索 [github issue](https://github.com/ccfos/nightingale/issues);
|
||||
3. 我们优先推荐通过提交 github issue 来提问,如果[有问题点击这里](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Fbug&template=bug_report.yml) | [有需求建议点击这里](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Ffeature&template=enhancement.md);
|
||||
4. 最后,我们推荐你加入微信群,针对相关开放式问题,相互交流咨询 (请先加好友:[UlricGO](https://www.gitlink.org.cn/UlricQin/gist/tree/master/self.jpeg) 备注:夜莺加群+姓名+公司,交流群里会有开发者团队和专业、热心的群友回答问题);
|
||||
|
||||
|
||||
## 联系我们
|
||||
- 推荐您关注夜莺监控公众号,及时获取相关产品和社区动态
|
||||
|
||||
<img src="doc/img/n9e-vx-new.png" width="180">
|
||||
|
||||
## Stargazers over time
|
||||
[](https://starchart.cc/ccfos/nightingale)
|
||||
|
||||
## License
|
||||
|
||||
<img alt="Apache-2.0 license" src="https://s3-gz01.didistatic.com/n9e-pub/image/apache.jpeg" width="128">
|
||||
|
||||
Nightingale is available under the Apache-2.0 license. See the [LICENSE](LICENSE) file for more info.
|
||||
|
||||
- [Apache License V2.0](https://github.com/didi/nightingale/blob/main/LICENSE)
|
||||
68
README_EN.md
Normal file
@@ -0,0 +1,68 @@
|
||||
<img src="doc/img/ccf-n9e.png" width="240">
|
||||
|
||||
Nightingale is an enterprise-level cloud-native monitoring system, which can be used as drop-in replacement of Prometheus for alerting and management.
|
||||
|
||||
[English](./README_EN.md) | [中文](./README.md)
|
||||
|
||||
## Introduction
|
||||
Nightingale is an cloud-native monitoring system by All-In-On design, support enterprise-class functional features with an out-of-the-box experience. We recommend upgrading your `Prometheus` + `AlertManager` + `Grafana` combo solution to Nightingale.
|
||||
|
||||
- **Multiple prometheus data sources management**: manage all alerts and dashboards in one centralized visually view;
|
||||
- **Out-of-the-box alert rule**: built-in multiple alert rules, reuse alert rules template by one-click import with detailed explanation of metrics;
|
||||
- **Multiple modes for visualizing data**: out-of-the-box dashboards, instance customize views, expression browser and Grafana integration;
|
||||
- **Multiple collection clients**: support using Promethues Exporter、Telegraf、Datadog Agent to collecting metrics;
|
||||
- **Integration of multiple storage**: support Prometheus, M3DB, VictoriaMetrics, Influxdb, TDEngine as storage solutions, and original support for PromQL;
|
||||
- **Fault self-healing**: support the ability to self-heal from failures by configuring webhook;
|
||||
|
||||
#### If you are using Prometheus and have one or more of the following requirement scenarios, it is recommended that you upgrade to Nightingale:
|
||||
|
||||
- Multiple systems such as Prometheus, Alertmanager, Grafana, etc. are fragmented and lack a unified view and cannot be used out of the box;
|
||||
- The way to manage Prometheus and Alertmanager by modifying configuration files has a big learning curve and is difficult to collaborate;
|
||||
- Too much data to scale-up your Prometheus cluster;
|
||||
- Multiple Prometheus clusters running in production environments, which faced high management and usage costs;
|
||||
|
||||
#### If you are using Zabbix and have the following scenarios, it is recommended that you upgrade to Nightingale:
|
||||
|
||||
- Monitoring too much data and wanting a better scalable solution;
|
||||
- A high learning curve and a desire for better efficiency of collaborative use in a multi-person, multi-team model;
|
||||
- Microservice and cloud-native architectures with variable monitoring data lifecycles and high monitoring data dimension bases, which are not easily adaptable to the Zabbix data model;
|
||||
|
||||
|
||||
#### If you are using [open-falcon](https://github.com/open-falcon/falcon-plus), we recommend you to upgrade to Nightingale:
|
||||
- For more information about open-falcon and Nightingale, please refer to read [Ten features and trends of cloud-native monitoring](https://mp.weixin.qq.com/s?__biz=MzkzNjI5OTM5Nw==&mid=2247483738&idx=1&sn=e8bdbb974a2cd003c1abcc2b5405dd18&chksm=c2a19fb0f5d616a63185cd79277a79a6b80118ef2185890d0683d2bb20451bd9303c78d083c5#rd)。
|
||||
|
||||
## Quickstart
|
||||
- [n9e.github.io/quickstart](https://n9e.github.io/docs/install/compose/)
|
||||
|
||||
## Documentation
|
||||
- [n9e.github.io](https://n9e.github.io/)
|
||||
|
||||
## Example of use
|
||||
|
||||
<img src="doc/img/intro.gif" width="680">
|
||||
|
||||
## System Architecture
|
||||
#### A typical Nightingale deployment architecture:
|
||||
<img src="doc/img/arch-system.png" width="680">
|
||||
|
||||
#### Typical deployment architecture using VictoriaMetrics as storage:
|
||||
<img src="doc/img/install-vm.png" width="680">
|
||||
|
||||
## Contact us and feedback questions
|
||||
- We recommend that you use [github issue](https://github.com/didi/nightingale/issues) as the preferred channel for issue feedback and requirement submission;
|
||||
- You can join our WeChat group
|
||||
|
||||
<img src="doc/img/n9e-vx-new.png" width="180">
|
||||
|
||||
|
||||
## Contributing
|
||||
We welcome your participation in the Nightingale open source project and open source community in a variety of ways:
|
||||
- Feedback on problems and bugs => [github issue](https://github.com/didi/nightingale/issues)
|
||||
- Additional and improved documentation => [n9e.github.io](https://n9e.github.io/)
|
||||
- Share your best practices and insights on using Nightingale => [User Story](https://github.com/didi/nightingale/issues/897)
|
||||
- Join our community events => [Nightingale wechat group](https://s3-gz01.didistatic.com/n9e-pub/image/n9e-wx.png)
|
||||
- Submit code to make Nightingale better =>[github PR](https://github.com/didi/nightingale/pulls)
|
||||
|
||||
|
||||
## License
|
||||
Nightingale with [Apache License V2.0](https://github.com/didi/nightingale/blob/main/LICENSE) open source license.
|
||||
52
README_ZH.md
@@ -1,52 +0,0 @@
|
||||
<img src="https://s3-gz01.didistatic.com/n9e-pub/image/n9e-logo-bg-white.png" width="200" alt="Nightingale"/>
|
||||
<br>
|
||||
|
||||
[English Introduction](README.md)
|
||||
|
||||
Nightingale 是一套衍生自 Open-Falcon 的互联网监控解决方案,融入了部分滴滴生产环境的最佳实践,灵活易用,稳定可靠,是一个生产环境直接可用的版本 :-)
|
||||
|
||||
## 文档
|
||||
|
||||
使用手册请参考:[夜莺使用手册](https://n9e.didiyun.com/)
|
||||
|
||||
## 编译
|
||||
|
||||
```bash
|
||||
mkdir -p $GOPATH/src/github.com/didi
|
||||
cd $GOPATH/src/github.com/didi
|
||||
git clone https://github.com/didi/nightingale.git
|
||||
cd nightingale
|
||||
./control build
|
||||
```
|
||||
|
||||
## 快速开始
|
||||
|
||||
使用 docker 和 docker-compose 环境可以快速部署一整套 nightingale 系统,涵盖了所有的核心组件。
|
||||
|
||||
* 强烈建议使用一个新的虚拟环境来部署和测试这个系统。
|
||||
* 系统组件占用了以下端口,`80`, `5800`, `5810`, `5811`, `5820`, `5821`, `5830`, `5831`, `5840`, `5841`, `6379`, `2058`, `3306`,部署前请确保这些端口没有被使用。
|
||||
|
||||
|
||||
使用 docker-compose 一键构建部署,完成以后可以使用浏览器打开 http://your-env-ip。 默认的登录账号密码均为 `root`。
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 版本升级
|
||||
如果需要从 `v1.4.0` 之前的版本升级到 `v1.4.0` , 按照 [v1.4.0](https://github.com/didi/nightingale/releases/tag/V1.4.0) release 说明操作即可
|
||||
|
||||
## 团队
|
||||
|
||||
[ulricqin](https://github.com/ulricqin) [710leo](https://github.com/710leo) [jsers](https://github.com/jsers) [hujter](https://github.com/hujter) [n4mine](https://github.com/n4mine) [heli567](https://github.com/heli567)
|
||||
|
||||
## 社区
|
||||
|
||||
[github.com/n9e](https://github.com/n9e) 是为夜莺所创建的 Organization,用于收集和开发夜莺周边项目。
|
||||
|
||||
## License
|
||||
|
||||
<img alt="Apache-2.0 license" src="https://s3-gz01.didistatic.com/n9e-pub/image/apache.jpeg" width="128">
|
||||
|
||||
Nightingale 基于 Apache-2.0 许可证进行分发和使用,更多信息参见 [LICENSE](LICENSE)。
|
||||
231
control
@@ -1,231 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# release version
|
||||
version=2.4.1
|
||||
|
||||
CWD=$(cd $(dirname $0)/; pwd)
|
||||
cd $CWD
|
||||
|
||||
usage()
|
||||
{
|
||||
echo $"Usage: $0 {start|stop|restart|status|build|pack} <module>"
|
||||
exit 0
|
||||
}
|
||||
|
||||
start_all()
|
||||
{
|
||||
# http: 5800
|
||||
test -x n9e-monapi && start monapi
|
||||
# http: 5810 ; rpc: 5811
|
||||
test -x n9e-transfer && start transfer
|
||||
# http: 5820 ; rpc: 5821
|
||||
test -x n9e-tsdb && start tsdb
|
||||
# http: 5830 ; rpc: 5831
|
||||
test -x n9e-index && start index
|
||||
# http: 5840 ; rpc: 5841
|
||||
test -x n9e-judge && start judge
|
||||
# http: 2058
|
||||
test -x n9e-collector && start collector
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
mod=$1
|
||||
if [ "x${mod}" = "x" ]; then
|
||||
usage
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "x${mod}" = "xall" ]; then
|
||||
start_all
|
||||
return
|
||||
fi
|
||||
|
||||
binfile=n9e-${mod}
|
||||
|
||||
if [ ! -f $binfile ]; then
|
||||
echo "file[$binfile] not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $(ps aux|grep -v grep|grep -v control|grep "$binfile" -c) -gt 0 ]; then
|
||||
echo "${mod} already started"
|
||||
return
|
||||
fi
|
||||
|
||||
mkdir -p logs/$mod
|
||||
nohup $CWD/$binfile &> logs/${mod}/stdout.log &
|
||||
|
||||
for((i=1;i<=15;i++)); do
|
||||
if [ $(ps aux|grep -v grep|grep -v control|grep "$binfile" -c) -gt 0 ]; then
|
||||
echo "${mod} started"
|
||||
return
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
echo "cannot start ${mod}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
stop_all()
|
||||
{
|
||||
test -x n9e-monapi && stop monapi
|
||||
test -x n9e-transfer && stop transfer
|
||||
test -x n9e-tsdb && stop tsdb
|
||||
test -x n9e-index && stop index
|
||||
test -x n9e-judge && stop judge
|
||||
test -x n9e-collector && stop collector
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
mod=$1
|
||||
if [ "x${mod}" = "x" ]; then
|
||||
usage
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "x${mod}" = "xall" ]; then
|
||||
stop_all
|
||||
return
|
||||
fi
|
||||
|
||||
binfile=n9e-${mod}
|
||||
|
||||
if [ $(ps aux|grep -v grep|grep -v control|grep "$binfile" -c) -eq 0 ]; then
|
||||
echo "${mod} already stopped"
|
||||
return
|
||||
fi
|
||||
|
||||
ps aux|grep -v grep|grep -v control|grep "$binfile"|awk '{print $2}'|xargs kill
|
||||
for((i=1;i<=15;i++)); do
|
||||
if [ $(ps aux|grep -v grep|grep -v control|grep "$binfile" -c) -eq 0 ]; then
|
||||
echo "${mod} stopped"
|
||||
return
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
echo "cannot stop $mod"
|
||||
exit 1
|
||||
}
|
||||
|
||||
restart()
|
||||
{
|
||||
mod=$1
|
||||
if [ "x${mod}" = "x" ]; then
|
||||
usage
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "x${mod}" = "xall" ]; then
|
||||
stop_all
|
||||
start_all
|
||||
return
|
||||
fi
|
||||
|
||||
stop $mod
|
||||
start $mod
|
||||
|
||||
status
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
ps aux|grep -v grep|grep "n9e"
|
||||
}
|
||||
|
||||
build_one()
|
||||
{
|
||||
mod=$1
|
||||
go build -ldflags "-X main.version=${version} -X main.buildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitHash=`git rev-parse HEAD`" -mod=vendor -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
|
||||
}
|
||||
|
||||
build_docker()
|
||||
{
|
||||
mod=$1
|
||||
go build -ldflags "-X main.version=${version} -X main.buildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitHash=`git rev-parse HEAD`" -mod=vendor -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
export GO111MODULE=on
|
||||
|
||||
mod=$1
|
||||
if [ "x${mod}" = "x" ]; then
|
||||
build_one monapi
|
||||
build_one transfer
|
||||
build_one index
|
||||
build_one judge
|
||||
build_one collector
|
||||
build_one tsdb
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "x${mod}" = "xdocker" ]; then
|
||||
build_docker monapi
|
||||
build_docker transfer
|
||||
build_docker index
|
||||
build_docker judge
|
||||
build_docker collector
|
||||
build_docker tsdb
|
||||
return
|
||||
fi
|
||||
|
||||
build_one $mod
|
||||
}
|
||||
|
||||
reload()
|
||||
{
|
||||
mod=$1
|
||||
if [ "x${mod}" = "x" ]; then
|
||||
echo "arg: <mod> is necessary"
|
||||
return
|
||||
fi
|
||||
|
||||
build_one $mod
|
||||
restart $mod
|
||||
}
|
||||
|
||||
pack()
|
||||
{
|
||||
v=$1
|
||||
if [ "x${v}" = "x" ]; then
|
||||
v=$(date +%Y-%m-%d-%H-%M-%S)
|
||||
fi
|
||||
|
||||
tar zcvf n9e-$v.tar.gz control sql plugin pub etc/log etc/port etc/service etc/nginx.conf etc/mysql.yml etc/address.yml \
|
||||
n9e-collector etc/collector.yml \
|
||||
n9e-tsdb etc/tsdb.yml \
|
||||
n9e-index etc/index.yml \
|
||||
n9e-judge etc/judge.yml \
|
||||
n9e-transfer etc/transfer.yml \
|
||||
n9e-monapi etc/monapi.yml
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start $2
|
||||
;;
|
||||
stop)
|
||||
stop $2
|
||||
;;
|
||||
restart)
|
||||
restart $2
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
build)
|
||||
build $2
|
||||
;;
|
||||
reload)
|
||||
reload $2
|
||||
;;
|
||||
pack)
|
||||
pack $2
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
esac
|
||||
689
doc/api.md
@@ -1,689 +0,0 @@
|
||||
# 前端接口
|
||||
|
||||
`POST /api/portal/auth/login`
|
||||
|
||||
校验用户登录信息的接口,is_ldap=0表示不使用LDAP账号验证,is_ldap=1表示使用LDAP账号验证
|
||||
|
||||
```
|
||||
{
|
||||
"username": "",
|
||||
"password": "",
|
||||
"is_ldap": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/auth/logout`
|
||||
|
||||
退出当前账号,如果请求成功,前端需要跳转到登录页面
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/self/profile`
|
||||
|
||||
获取个人信息,可以用此接口校验用户是否登录了
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/self/profile`
|
||||
|
||||
更新个人信息
|
||||
|
||||
```
|
||||
{
|
||||
"dispname": "",
|
||||
"phone": "",
|
||||
"email": "",
|
||||
"im": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/self/password`
|
||||
|
||||
更新个人密码,新密码输入两次做校验,在前端完成
|
||||
|
||||
```
|
||||
{
|
||||
"oldpass": "",
|
||||
"newpass": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/user`
|
||||
|
||||
获取用户列表,支持搜索,搜索条件参数是query,每页显示条数是limit,页码是p,如果当前用户是root,则展示相关操作按钮,如果不是,则所有按钮不展示,只是查看
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/user`
|
||||
|
||||
root账号新增一个用户,is_root字段表示新增的这个用户是否是个root
|
||||
|
||||
```
|
||||
{
|
||||
"username": "",
|
||||
"password": "",
|
||||
"dispname": "",
|
||||
"phone": "",
|
||||
"email": "",
|
||||
"im": "",
|
||||
"is_root": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/user/:id/profile`
|
||||
|
||||
获取某个人的信息
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/user/:id/profile`
|
||||
|
||||
root账号修改某人的信息
|
||||
|
||||
```
|
||||
{
|
||||
"dispname": "",
|
||||
"phone": "",
|
||||
"email": "",
|
||||
"im": "",
|
||||
"is_root": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/user/:id/password`
|
||||
|
||||
root账号重置某人的密码,输入两次新密码保证一致的校验由前端来做
|
||||
|
||||
```
|
||||
{
|
||||
"password": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/user/:id`
|
||||
|
||||
root账号来删除某个用户
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/team`
|
||||
|
||||
获取团队列表,支持搜索,搜索条件参数是query,每页显示条数是limit,页码是p
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/team`
|
||||
|
||||
创建团队,mgmt=0表示成员管理制,mgmt=1表示管理员管理制,admins是团队管理员的id列表,members是团队普通成员的id列表
|
||||
|
||||
```
|
||||
{
|
||||
"ident": "",
|
||||
"name": "",
|
||||
"mgmt: 0,
|
||||
"admins": [],
|
||||
"members": []
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/team/:id`
|
||||
|
||||
修改团队信息
|
||||
|
||||
```
|
||||
{
|
||||
"ident": "",
|
||||
"name": "",
|
||||
"mgmt: 0,
|
||||
"admins": [],
|
||||
"members": []
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/team/:id`
|
||||
|
||||
删除团队
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/endpoint`
|
||||
|
||||
获取endpoint列表,用于【服务树】-【对象列表】页面,该页展示endpoint列表,搜索条件参数是query,每页显示条数是limit,页码是p,如果要做批量筛选,则同时要指定用哪个字段(参数名字是field)来筛选,只支持ident和alias,批量筛选的内容是batch,即batch和field一般是同时出现的
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/endpoint`
|
||||
|
||||
导入endpoint,要求传入列表,每一条是ident::alias拼接在一起
|
||||
|
||||
```
|
||||
{
|
||||
"endpoints": []
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/endpoint/:id`
|
||||
|
||||
修改一个endpoint的alias信息
|
||||
|
||||
```
|
||||
{
|
||||
"alias": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/endpoint`
|
||||
|
||||
删除多个endpoint,ids参数放到request body里
|
||||
|
||||
```
|
||||
{
|
||||
"ids": [10000, 200000]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/endpoints/bindings`
|
||||
|
||||
查询endpoint的绑定关系,QueryString:idents,逗号分隔多个
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/endpoints/bynodeids`
|
||||
|
||||
根据节点id查询挂载了哪些endpoint,QueryString:ids,逗号分隔的多个节点id
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/tree`
|
||||
|
||||
查询整颗服务树
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/tree/search`
|
||||
|
||||
根据节点路径(path)查询服务树子树
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/node`
|
||||
|
||||
创建服务树节点,pid表示父节点id,leaf=0表示非叶子节点,leaf=1表示叶子节点,note是备注信息
|
||||
|
||||
```
|
||||
{
|
||||
"pid": 0,
|
||||
"name": "",
|
||||
"leaf": 0,
|
||||
"note": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/node/:id/name`
|
||||
|
||||
服务树节点改名
|
||||
|
||||
```
|
||||
{
|
||||
"name": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/node/:id`
|
||||
|
||||
删除服务树节点
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/node/:id/endpoint`
|
||||
|
||||
获取节点下面的endpoint列表,查询字符串使用query,每页展示多少条使用limit,页码使用p,如要批量筛选,一行一个,使用batch,同时必须指定field,即使用哪个字段进行批量筛选,有ident和alias可选
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/node/:id/endpoint-bind`
|
||||
|
||||
绑定一批endpoint到当前节点,del_old=1表示同时删除老的挂载关系
|
||||
|
||||
```
|
||||
{
|
||||
"idents": [],
|
||||
"del_old": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/node/:id/endpoint-unbind`
|
||||
|
||||
解绑endpoint和节点的挂载关系
|
||||
|
||||
```
|
||||
{
|
||||
"idents": []
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/nodes/search`
|
||||
|
||||
搜索节点,limit表示最多返回多少条,query是搜索条件
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/nodes/leafids`
|
||||
|
||||
获取节点对应的叶子节点的id,参数是ids,逗号分隔的多个节点id
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/nodes/pids`
|
||||
|
||||
获取节点对应的父、祖节点的id,参数是ids,逗号分隔的多个节点id
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/nodes/byids`
|
||||
|
||||
查询节点的信息,参数是ids,逗号分隔的多个节点id,返回这多个节点的信息
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/node/:id/maskconf`
|
||||
|
||||
获取报警屏蔽列表,因为已经是某个节点下的了,量比较少,后端不分页
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/maskconf`
|
||||
|
||||
创建一个报警屏蔽策略
|
||||
|
||||
```
|
||||
{
|
||||
"nid": 0,
|
||||
"endpoints": [],
|
||||
"metric": "",
|
||||
"tags": "",
|
||||
"cause": "",
|
||||
"btime": 1563838361,
|
||||
"etime": 1563838461
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/maskconf/:id`
|
||||
|
||||
修改一个报警屏蔽策略
|
||||
|
||||
```
|
||||
{
|
||||
"endpoints": [],
|
||||
"metric": "",
|
||||
"tags": "",
|
||||
"cause": "",
|
||||
"btime": 1563838361,
|
||||
"etime": 1563838461
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/maskconf/:id`
|
||||
|
||||
删除一个报警屏蔽策略
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/node/:id/screen`
|
||||
|
||||
获取screen列表,因为已经是某个节点下的了,量比较少,后端不分页
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/node/:id/screen`
|
||||
|
||||
创建screen
|
||||
|
||||
```
|
||||
{
|
||||
"name": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/screen/:id`
|
||||
|
||||
修改screen,其中node_id顺带也可以修改,这样screen相当于直接挪动了挂载节点
|
||||
|
||||
```
|
||||
{
|
||||
"name": "",
|
||||
"node_id": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/screen/:id`
|
||||
|
||||
删除某个screen
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/screen/:id/subclass`
|
||||
|
||||
获取screen下面的子类,返回的subclass按照weight字段排序
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/screen/:id/subclass`
|
||||
|
||||
创建subclass
|
||||
|
||||
```
|
||||
{
|
||||
"name": "",
|
||||
"weight": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/subclass`
|
||||
|
||||
批量修改subclass
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "a",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "b",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/subclass/:id`
|
||||
|
||||
删除某个subclass
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/subclasses/loc`
|
||||
|
||||
修改subclass的location,即所属的screen
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"screen_id": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"screen_id": 1
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/subclass/:id/chart`
|
||||
|
||||
获取chart列表,根据chart的weight排序,不分页
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/subclass/:id/chart`
|
||||
|
||||
创建chart
|
||||
|
||||
```
|
||||
{
|
||||
"configs": "",
|
||||
"weight": 0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/chart/:id`
|
||||
|
||||
修改某个chart的信息
|
||||
|
||||
```
|
||||
{
|
||||
"subclass_id": 1,
|
||||
"configs": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/chart/:id`
|
||||
|
||||
删除某个chart
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/charts/weights`
|
||||
|
||||
修改chart的排序权重
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"weight": 9
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/tmpchart`
|
||||
|
||||
获取临时图,参数是QueryString:ids,逗号分隔的多个id
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/tmpchart`
|
||||
|
||||
创建一个临时图,返回生成的临时图的id列表
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"configs": ""
|
||||
},
|
||||
{
|
||||
"configs": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/event/cur`
|
||||
|
||||
获取某个节点下的未恢复报警列表,QueryString:
|
||||
|
||||
- 节点路径:nodepath
|
||||
- 开始时间:stime
|
||||
- 结束时间:etime
|
||||
- 每页条数:limit
|
||||
- 查询条件:query
|
||||
- 优先级:priorities,逗号分隔的多个
|
||||
- 发送类型:sendtypes,逗号分隔的多个
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/event/cur/:id`
|
||||
|
||||
获取当前某一个未恢复的报警
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/event/cur/:id`
|
||||
|
||||
删除当前某一个未恢复的报警
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/event/curs/claim`
|
||||
|
||||
认领某一些未恢复的告警,避免告警升级到老板那里,id和nodepath只能传入一个,不能同时传入,也不能一个都不传,业务上的语义是:要么认领某一个告警事件,要么认领某个节点下的所有告警事件
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"nodepath": ""
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/event/his`
|
||||
|
||||
获取某个节点下的所有报警列表,QueryString:
|
||||
|
||||
- 节点路径:nodepath
|
||||
- 开始时间:stime
|
||||
- 结束时间:etime
|
||||
- 每页条数:limit
|
||||
- 查询条件:query
|
||||
- 优先级:priorities,逗号分隔的多个
|
||||
- 发送类型:sendtypes,逗号分隔的多个
|
||||
- 事件类型:type
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/event/his/:id`
|
||||
|
||||
获取某个历史告警事件
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/collect/list`
|
||||
|
||||
获取某个节点下面配置的采集策略,必传QueryString: nid表示节点id,后端不分页,返回全部
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/collect`
|
||||
|
||||
获取单个采集配置的详情,QueryString:type和id,都必传,type是port、proc、log之一。
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/collect`
|
||||
|
||||
创建一个采集策略
|
||||
|
||||
```
|
||||
{
|
||||
"type": "",
|
||||
"data": {
|
||||
# 端口、进程、日志配置不同,参阅model/collect.go
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/collect`
|
||||
|
||||
修改一个采集策略
|
||||
|
||||
```
|
||||
{
|
||||
"type": "",
|
||||
"data": {
|
||||
# 端口、进程、日志配置不同,参阅model/collect.go
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/collect`
|
||||
|
||||
删除采集策略
|
||||
|
||||
```
|
||||
{
|
||||
"type": "",
|
||||
"ids": []
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/collect/check`
|
||||
|
||||
校验用户输入的数据是否匹配正则,跟商业版本数据结构一致
|
||||
|
||||
---
|
||||
|
||||
`POST /api/portal/stra`
|
||||
|
||||
新增告警策略,跟商业版本数据结构一致
|
||||
|
||||
---
|
||||
|
||||
`PUT /api/portal/stra`
|
||||
|
||||
修改告警策略,跟商业版本数据结构一致
|
||||
|
||||
---
|
||||
|
||||
`DELETE /api/portal/stra`
|
||||
|
||||
删除告警策略,跟商业版本数据结构一致
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/stra`
|
||||
|
||||
获取告警策略列表,跟商业版本数据结构一致
|
||||
|
||||
---
|
||||
|
||||
`GET /api/portal/stra/:id`
|
||||
|
||||
获取单个告警策略,跟商业版本数据结构一致
|
||||
52
doc/community-governance.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# 夜莺开源项目和社区治理架构(草案)
|
||||
|
||||
#### 用户(User)
|
||||
|
||||
>欢迎任何个人、公司以及组织,使用 Nightingale,并积极的反馈 bug、提交功能需求、以及相互帮助,我们推荐使用 github issue 来跟踪 bug 和管理需求。
|
||||
|
||||
#### 贡献者(Contributer)
|
||||
|
||||
>欢迎每一位用户,包括但不限于以下列方式参与到 Nightingale 开源项目并做出贡献:
|
||||
>1. 在 [github issue](https://github.com/ccfos/nightingale/issues) 中积极参与讨论;
|
||||
>2. 提交代码补丁;
|
||||
>3. 修订、补充和完善文档;
|
||||
>4. 提交建议 / 批评;
|
||||
|
||||
#### 提交者(Committer)
|
||||
|
||||
>Committer 是指拥有 Nightingale 代码仓库写操作权限的贡献者,而且他们也签署了 Nightingale 项目贡献者许可协议(CLA),他们拥有 ccf.org.cn 为后缀的邮箱地址。原则上 Committer 能够自主决策某个代码补丁是否可以合入到 Nightingale 代码仓库,但是项目管委会拥有最终的决策权。
|
||||
|
||||
#### 项目管委会成员(PMC Member)
|
||||
|
||||
> 项目管委会成员,从贡献者或者 Committer 中选举产生,他们拥有 Nightingale 代码仓库的写操作权限,拥有 ccf.org.cn 为后缀的邮箱地址,拥有 Nightingale 社区相关事务的投票权、以及提名 Committer 候选人的权利。 项目管委会作为一个实体,为整个项目的发展全权负责。
|
||||
|
||||
#### 项目管委会主席(PMC Chair)
|
||||
|
||||
> 项目管委会主席采用任命制,由 [CCF ODC](https://www.ccf.org.cn/kyfzwyh/) 从项目管委会成员中任命产生。项目管委会作为一个统一的实体,来管理和领导 Nightingale 项目。管委会主席是 CCF ODC 和项目管委会之间的沟通桥梁,履行特定的项目管理职责。
|
||||
|
||||
# 沟通机制(Communication)
|
||||
1. 我们推荐使用邮件列表来反馈建议(待发布);
|
||||
2. 我们推荐使用 [github issue](https://github.com/ccfos/nightingale/issues) 跟踪 bug 和管理需求;
|
||||
3. 我们推荐使用 [github milestone](https://github.com/ccfos/nightingale/milestones) 来管理项目进度和规划;
|
||||
4. 我们推荐使用腾讯会议来定期召开项目例会;
|
||||
|
||||
# 文档(Documentation)
|
||||
1. 我们推荐使用 [github pages](https://n9e.github.io) 来沉淀文档;
|
||||
2. 我们推荐使用 [gitlink wiki](https://www.gitlink.org.cn/ccfos/nightingale/wiki/faq) 来沉淀FAQ;
|
||||
|
||||
|
||||
# 运营机制(Operation)
|
||||
1. 我们定期组织用户、贡献者、项目管委会成员之间的沟通会议,讨论项目开发的目标、方案、进度,以及讨论相关需求的合理性、优先级等议题;
|
||||
2. 我们定期组织 meetup (线上&线下),创造良好的用户交流分享环境,并沉淀相关内容到文档站点;
|
||||
3. 我们定期组织 Nightingale 开发者大会,分享 best user story、同步年度开发目标和计划、讨论新技术方向等;
|
||||
|
||||
# 社区指导原则(Philosophy)
|
||||
- 尊重、认可和记录每一位贡献者的工作;
|
||||
|
||||
# 关于提问的原则
|
||||
按照**尊重、认可、记录每一位贡献者的工作**原则,我们提倡**高效的提问**,这既是对开发者时间的尊重,也是对整个社区的知识沉淀的贡献:
|
||||
|
||||
1. 提问之前请先查阅 [FAQ](https://www.gitlink.org.cn/ccfos/nightingale/wiki/faq) ;
|
||||
2. 提问之前请先搜索 [github issue](https://github.com/ccfos/nightingale/issues);
|
||||
3. 我们优先推荐通过提交 github issue 来提问,如果[有问题点击这里](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Fbug&template=bug_report.yml) | [有需求建议点击这里](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Ffeature&template=enhancement.md);
|
||||
4. 最后,我们推荐你加入微信群,针对相关开放式问题,相互交流咨询 (请先加好友:[UlricGO](https://www.gitlink.org.cn/UlricQin/gist/tree/master/self.jpeg) 备注:夜莺加群+姓名+公司,交流群里会有开发者团队和专业、热心的群友回答问题);
|
||||
BIN
doc/img/alert-events.png
Normal file
|
After Width: | Height: | Size: 450 KiB |
BIN
doc/img/arch-product.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
doc/img/arch-system.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
doc/img/arch.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
doc/img/ccf-n9e.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
doc/img/dingtalk.png
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
doc/img/install-vm.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
doc/img/intro.gif
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
doc/img/mysql-alerts.png
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
doc/img/n9e-node-dashboard.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
doc/img/n9e-vx-new.png
Normal file
|
After Width: | Height: | Size: 331 KiB |
BIN
doc/img/redis-dash.png
Normal file
|
After Width: | Height: | Size: 801 KiB |
BIN
doc/img/vm-cluster-arch.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
doc/img/wx.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
@@ -1,90 +0,0 @@
|
||||
version: "3"
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:stable-alpine
|
||||
network_mode: host
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./docker/nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./pub:/home/n9e/pub
|
||||
|
||||
nightingale:
|
||||
build: .
|
||||
image: nightingale
|
||||
|
||||
monapi:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-monapi
|
||||
ports:
|
||||
- 5800:5800
|
||||
|
||||
transfer:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-transfer
|
||||
ports:
|
||||
- 5810:5810
|
||||
- 5811:5811
|
||||
|
||||
tsdb:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-tsdb
|
||||
ports:
|
||||
- 5820:5820
|
||||
- 5821:5821
|
||||
|
||||
index:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-index
|
||||
ports:
|
||||
- 5830:5830
|
||||
- 5831:5831
|
||||
|
||||
judge:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-judge
|
||||
ports:
|
||||
- 5840:5840
|
||||
- 5841:5841
|
||||
|
||||
collector:
|
||||
image: nightingale
|
||||
network_mode: host
|
||||
restart: always
|
||||
command: n9e-collector
|
||||
ports:
|
||||
- 2058:2058
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
network_mode: host
|
||||
restart: always
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
network_mode: host
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=1234
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
- mysql-data:/var/lib/mysql
|
||||
7
docker/.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
||||
ibexetc
|
||||
initsql
|
||||
mysqletc
|
||||
n9eetc
|
||||
prometc
|
||||
build.sh
|
||||
docker-compose.yaml
|
||||
14
docker/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM python:2
|
||||
#FROM ubuntu:21.04
|
||||
|
||||
WORKDIR /app
|
||||
ADD n9e /app
|
||||
ADD http://download.flashcat.cloud/wait /wait
|
||||
RUN mkdir -p /app/pub && chmod +x /wait
|
||||
ADD pub /app/pub/
|
||||
RUN chmod +x n9e
|
||||
|
||||
EXPOSE 19000
|
||||
EXPOSE 18000
|
||||
|
||||
CMD ["/app/n9e", "-h"]
|
||||
14
docker/Dockerfile.goreleaser
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM --platform=$BUILDPLATFORM python:2
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
ADD n9e /app
|
||||
ADD http://download.flashcat.cloud/wait /wait
|
||||
RUN mkdir -p /app/pub && chmod +x /wait
|
||||
ADD pub /app/pub/
|
||||
RUN chmod +x n9e
|
||||
|
||||
EXPOSE 19000
|
||||
EXPOSE 18000
|
||||
|
||||
CMD ["/app/n9e", "-h"]
|
||||
20
docker/build.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "$0 <tag>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tag=$1
|
||||
|
||||
echo "tag: ${tag}"
|
||||
|
||||
rm -rf n9e pub
|
||||
cp ../n9e .
|
||||
cp -r ../pub .
|
||||
|
||||
docker build -t nightingale:${tag} .
|
||||
|
||||
docker tag nightingale:${tag} ulric2019/nightingale:${tag}
|
||||
docker push ulric2019/nightingale:${tag}
|
||||
|
||||
rm -rf n9e pub
|
||||
45
docker/categraf/conf/config.toml
Normal file
@@ -0,0 +1,45 @@
|
||||
[global]
|
||||
# whether print configs
|
||||
print_configs = false
|
||||
|
||||
# add label(agent_hostname) to series
|
||||
# "" -> auto detect hostname
|
||||
# "xx" -> use specified string xx
|
||||
# "$hostname" -> auto detect hostname
|
||||
# "$ip" -> auto detect ip
|
||||
# "$hostname-$ip" -> auto detect hostname and ip to replace the vars
|
||||
hostname = "$HOSTNAME"
|
||||
|
||||
# will not add label(agent_hostname) if true
|
||||
omit_hostname = false
|
||||
|
||||
# s | ms
|
||||
precision = "ms"
|
||||
|
||||
# global collect interval
|
||||
interval = 15
|
||||
|
||||
[global.labels]
|
||||
source="categraf"
|
||||
# region = "shanghai"
|
||||
# env = "localhost"
|
||||
|
||||
[writer_opt]
|
||||
# default: 2000
|
||||
batch = 2000
|
||||
# channel(as queue) size
|
||||
chan_size = 10000
|
||||
|
||||
[[writers]]
|
||||
url = "http://nserver:19000/prometheus/v1/write"
|
||||
|
||||
# Basic auth username
|
||||
basic_auth_user = ""
|
||||
|
||||
# Basic auth password
|
||||
basic_auth_pass = ""
|
||||
|
||||
# timeout settings, unit: ms
|
||||
timeout = 5000
|
||||
dial_timeout = 2500
|
||||
max_idle_conns_per_host = 100
|
||||
5
docker/categraf/conf/input.cpu/cpu.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # whether collect per cpu
|
||||
# collect_per_cpu = false
|
||||
11
docker/categraf/conf/input.disk/disk.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # By default stats will be gathered for all mount points.
|
||||
# # Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
|
||||
# Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
ignore_mount_points = ["/boot"]
|
||||
6
docker/categraf/conf/input.diskio/diskio.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # By default, categraf will gather stats for all devices including disk partitions.
|
||||
# # Setting devices will restrict the stats to the specified devices.
|
||||
# devices = ["sda", "sdb", "vd*"]
|
||||
63
docker/categraf/conf/input.docker/docker.toml
Normal file
@@ -0,0 +1,63 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
[[instances]]
|
||||
# # append some labels for series
|
||||
# labels = { region="cloud", product="n9e" }
|
||||
|
||||
# # interval = global.interval * interval_times
|
||||
# interval_times = 1
|
||||
|
||||
## Docker Endpoint
|
||||
## To use TCP, set endpoint = "tcp://[ip]:[port]"
|
||||
## To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
|
||||
## Set to true to collect Swarm metrics(desired_replicas, running_replicas)
|
||||
gather_services = false
|
||||
gather_extend_memstats = false
|
||||
|
||||
container_id_label_enable = true
|
||||
container_id_label_short_style = true
|
||||
|
||||
## Containers to include and exclude. Globs accepted.
|
||||
## Note that an empty array for both will include all containers
|
||||
container_name_include = []
|
||||
container_name_exclude = []
|
||||
|
||||
## Container states to include and exclude. Globs accepted.
|
||||
## When empty only containers in the "running" state will be captured.
|
||||
## example: container_state_include = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
|
||||
## example: container_state_exclude = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
|
||||
# container_state_include = []
|
||||
# container_state_exclude = []
|
||||
|
||||
## Timeout for docker list, info, and stats commands
|
||||
timeout = "5s"
|
||||
|
||||
## Specifies for which classes a per-device metric should be issued
|
||||
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
|
||||
## Please note that this setting has no effect if 'perdevice' is set to 'true'
|
||||
perdevice_include = []
|
||||
|
||||
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
|
||||
## Possible values are 'cpu', 'blkio' and 'network'
|
||||
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
|
||||
## Please note that this setting has no effect if 'total' is set to 'false'
|
||||
total_include = ["cpu", "blkio", "network"]
|
||||
|
||||
## Which environment variables should we use as a tag
|
||||
##tag_env = ["JAVA_HOME", "HEAP_SIZE"]
|
||||
|
||||
## docker labels to include and exclude as tags. Globs accepted.
|
||||
## Note that an empty array for both will include all labels as tags
|
||||
docker_label_include = []
|
||||
docker_label_exclude = ["annotation*", "io.kubernetes*", "*description*", "*maintainer*", "*hash", "*author*"]
|
||||
|
||||
## Optional TLS Config
|
||||
# use_tls = false
|
||||
# tls_ca = "/etc/telegraf/ca.pem"
|
||||
# tls_cert = "/etc/telegraf/cert.pem"
|
||||
# tls_key = "/etc/telegraf/key.pem"
|
||||
## Use TLS but skip chain & host verification
|
||||
# insecure_skip_verify = false
|
||||
2
docker/categraf/conf/input.kernel/kernel.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
124
docker/categraf/conf/input.kernel_vmstat/kernel_vmstat.toml
Normal file
@@ -0,0 +1,124 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# file: /proc/vmstat
|
||||
[white_list]
|
||||
oom_kill = 1
|
||||
nr_free_pages = 0
|
||||
nr_alloc_batch = 0
|
||||
nr_inactive_anon = 0
|
||||
nr_active_anon = 0
|
||||
nr_inactive_file = 0
|
||||
nr_active_file = 0
|
||||
nr_unevictable = 0
|
||||
nr_mlock = 0
|
||||
nr_anon_pages = 0
|
||||
nr_mapped = 0
|
||||
nr_file_pages = 0
|
||||
nr_dirty = 0
|
||||
nr_writeback = 0
|
||||
nr_slab_reclaimable = 0
|
||||
nr_slab_unreclaimable = 0
|
||||
nr_page_table_pages = 0
|
||||
nr_kernel_stack = 0
|
||||
nr_unstable = 0
|
||||
nr_bounce = 0
|
||||
nr_vmscan_write = 0
|
||||
nr_vmscan_immediate_reclaim = 0
|
||||
nr_writeback_temp = 0
|
||||
nr_isolated_anon = 0
|
||||
nr_isolated_file = 0
|
||||
nr_shmem = 0
|
||||
nr_dirtied = 0
|
||||
nr_written = 0
|
||||
numa_hit = 0
|
||||
numa_miss = 0
|
||||
numa_foreign = 0
|
||||
numa_interleave = 0
|
||||
numa_local = 0
|
||||
numa_other = 0
|
||||
workingset_refault = 0
|
||||
workingset_activate = 0
|
||||
workingset_nodereclaim = 0
|
||||
nr_anon_transparent_hugepages = 0
|
||||
nr_free_cma = 0
|
||||
nr_dirty_threshold = 0
|
||||
nr_dirty_background_threshold = 0
|
||||
pgpgin = 0
|
||||
pgpgout = 0
|
||||
pswpin = 0
|
||||
pswpout = 0
|
||||
pgalloc_dma = 0
|
||||
pgalloc_dma32 = 0
|
||||
pgalloc_normal = 0
|
||||
pgalloc_movable = 0
|
||||
pgfree = 0
|
||||
pgactivate = 0
|
||||
pgdeactivate = 0
|
||||
pgfault = 0
|
||||
pgmajfault = 0
|
||||
pglazyfreed = 0
|
||||
pgrefill_dma = 0
|
||||
pgrefill_dma32 = 0
|
||||
pgrefill_normal = 0
|
||||
pgrefill_movable = 0
|
||||
pgsteal_kswapd_dma = 0
|
||||
pgsteal_kswapd_dma32 = 0
|
||||
pgsteal_kswapd_normal = 0
|
||||
pgsteal_kswapd_movable = 0
|
||||
pgsteal_direct_dma = 0
|
||||
pgsteal_direct_dma32 = 0
|
||||
pgsteal_direct_normal = 0
|
||||
pgsteal_direct_movable = 0
|
||||
pgscan_kswapd_dma = 0
|
||||
pgscan_kswapd_dma32 = 0
|
||||
pgscan_kswapd_normal = 0
|
||||
pgscan_kswapd_movable = 0
|
||||
pgscan_direct_dma = 0
|
||||
pgscan_direct_dma32 = 0
|
||||
pgscan_direct_normal = 0
|
||||
pgscan_direct_movable = 0
|
||||
pgscan_direct_throttle = 0
|
||||
zone_reclaim_failed = 0
|
||||
pginodesteal = 0
|
||||
slabs_scanned = 0
|
||||
kswapd_inodesteal = 0
|
||||
kswapd_low_wmark_hit_quickly = 0
|
||||
kswapd_high_wmark_hit_quickly = 0
|
||||
pageoutrun = 0
|
||||
allocstall = 0
|
||||
pgrotated = 0
|
||||
drop_pagecache = 0
|
||||
drop_slab = 0
|
||||
numa_pte_updates = 0
|
||||
numa_huge_pte_updates = 0
|
||||
numa_hint_faults = 0
|
||||
numa_hint_faults_local = 0
|
||||
numa_pages_migrated = 0
|
||||
pgmigrate_success = 0
|
||||
pgmigrate_fail = 0
|
||||
compact_migrate_scanned = 0
|
||||
compact_free_scanned = 0
|
||||
compact_isolated = 0
|
||||
compact_stall = 0
|
||||
compact_fail = 0
|
||||
compact_success = 0
|
||||
htlb_buddy_alloc_success = 0
|
||||
htlb_buddy_alloc_fail = 0
|
||||
unevictable_pgs_culled = 0
|
||||
unevictable_pgs_scanned = 0
|
||||
unevictable_pgs_rescued = 0
|
||||
unevictable_pgs_mlocked = 0
|
||||
unevictable_pgs_munlocked = 0
|
||||
unevictable_pgs_cleared = 0
|
||||
unevictable_pgs_stranded = 0
|
||||
thp_fault_alloc = 0
|
||||
thp_fault_fallback = 0
|
||||
thp_collapse_alloc = 0
|
||||
thp_collapse_alloc_failed = 0
|
||||
thp_split = 0
|
||||
thp_zero_page_alloc = 0
|
||||
thp_zero_page_alloc_failed = 0
|
||||
balloon_inflate = 0
|
||||
balloon_deflate = 0
|
||||
balloon_migrate = 0
|
||||
@@ -0,0 +1,2 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
5
docker/categraf/conf/input.mem/mem.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # whether collect platform specified metrics
|
||||
collect_platform_fields = true
|
||||
8
docker/categraf/conf/input.net/net.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # whether collect protocol stats on Linux
|
||||
# collect_protocol_stats = false
|
||||
|
||||
# # setting interfaces will tell categraf to gather these explicit interfaces
|
||||
# interfaces = ["eth0"]
|
||||
2
docker/categraf/conf/input.netstat/netstat.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
8
docker/categraf/conf/input.processes/processes.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # force use ps command to gather
|
||||
# force_ps = false
|
||||
|
||||
# # force use /proc to gather
|
||||
# force_proc = false
|
||||
5
docker/categraf/conf/input.system/system.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
# # collect interval
|
||||
# interval = 15
|
||||
|
||||
# # whether collect metric: system_n_users
|
||||
# collect_user_number = false
|
||||
35
docker/categraf/conf/logs.toml
Normal file
@@ -0,0 +1,35 @@
|
||||
[logs]
|
||||
## key 占位符
|
||||
api_key = "ef4ahfbwzwwtlwfpbertgq1i6mq0ab1q"
|
||||
## 是否开启日志采集
|
||||
enable = false
|
||||
## 接受日志的server地址
|
||||
send_to = "127.0.0.1:17878"
|
||||
## 发送日志的协议 http/tcp
|
||||
send_type = "http"
|
||||
## 是否压缩发送
|
||||
use_compress = false
|
||||
## 是否采用ssl
|
||||
send_with_tls = false
|
||||
##
|
||||
batch_wait = 5
|
||||
## 日志offset信息保存目录
|
||||
run_path = "/opt/categraf/run"
|
||||
## 最多同时采集多少个日志文件
|
||||
open_files_limit = 100
|
||||
## 定期扫描目录下是否有新增日志
|
||||
scan_period = 10
|
||||
##
|
||||
frame_size = 10
|
||||
##
|
||||
collect_container_all = true
|
||||
## 全局的处理规则
|
||||
[[logs.Processing_rules]]
|
||||
## 单个日志采集配置
|
||||
[[logs.items]]
|
||||
## file/journald
|
||||
type = "file"
|
||||
## type=file时 path必填,type=journald时 port必填
|
||||
path = "/opt/tomcat/logs/*.txt"
|
||||
source = "tomcat"
|
||||
service = "my_service"
|
||||
178
docker/docker-compose.yaml
Normal file
@@ -0,0 +1,178 @@
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
nightingale:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: "mysql:5.7"
|
||||
container_name: mysql
|
||||
hostname: mysql
|
||||
restart: always
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
MYSQL_ROOT_PASSWORD: 1234
|
||||
volumes:
|
||||
- ./mysqldata:/var/lib/mysql/
|
||||
- ./initsql:/docker-entrypoint-initdb.d/
|
||||
- ./mysqletc/my.cnf:/etc/my.cnf
|
||||
networks:
|
||||
- nightingale
|
||||
|
||||
redis:
|
||||
image: "redis:6.2"
|
||||
container_name: redis
|
||||
hostname: redis
|
||||
restart: always
|
||||
ports:
|
||||
- "6379:6379"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
networks:
|
||||
- nightingale
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
container_name: prometheus
|
||||
hostname: prometheus
|
||||
restart: always
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./prometc:/etc/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
networks:
|
||||
- nightingale
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.path=/prometheus"
|
||||
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
|
||||
- "--web.console.templates=/usr/share/prometheus/consoles"
|
||||
- "--enable-feature=remote-write-receiver"
|
||||
- "--query.lookback-delta=2m"
|
||||
|
||||
ibex:
|
||||
image: ulric2019/ibex:0.3
|
||||
container_name: ibex
|
||||
hostname: ibex
|
||||
restart: always
|
||||
environment:
|
||||
GIN_MODE: release
|
||||
TZ: Asia/Shanghai
|
||||
WAIT_HOSTS: mysql:3306
|
||||
ports:
|
||||
- "10090:10090"
|
||||
- "20090:20090"
|
||||
volumes:
|
||||
- ./ibexetc:/app/etc
|
||||
networks:
|
||||
- nightingale
|
||||
depends_on:
|
||||
- mysql
|
||||
links:
|
||||
- mysql:mysql
|
||||
command: >
|
||||
sh -c "/wait && /app/ibex server"
|
||||
|
||||
nwebapi:
|
||||
image: ulric2019/nightingale:5.9.4
|
||||
container_name: nwebapi
|
||||
hostname: nwebapi
|
||||
restart: always
|
||||
environment:
|
||||
GIN_MODE: release
|
||||
TZ: Asia/Shanghai
|
||||
WAIT_HOSTS: mysql:3306, redis:6379
|
||||
volumes:
|
||||
- ./n9eetc:/app/etc
|
||||
ports:
|
||||
- "18000:18000"
|
||||
networks:
|
||||
- nightingale
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
- prometheus
|
||||
- ibex
|
||||
links:
|
||||
- mysql:mysql
|
||||
- redis:redis
|
||||
- prometheus:prometheus
|
||||
- ibex:ibex
|
||||
command: >
|
||||
sh -c "/wait && /app/n9e webapi"
|
||||
|
||||
nserver:
|
||||
image: ulric2019/nightingale:5.9.4
|
||||
container_name: nserver
|
||||
hostname: nserver
|
||||
restart: always
|
||||
environment:
|
||||
GIN_MODE: release
|
||||
TZ: Asia/Shanghai
|
||||
WAIT_HOSTS: mysql:3306, redis:6379
|
||||
volumes:
|
||||
- ./n9eetc:/app/etc
|
||||
ports:
|
||||
- "19000:19000"
|
||||
networks:
|
||||
- nightingale
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
- prometheus
|
||||
- ibex
|
||||
links:
|
||||
- mysql:mysql
|
||||
- redis:redis
|
||||
- prometheus:prometheus
|
||||
- ibex:ibex
|
||||
command: >
|
||||
sh -c "/wait && /app/n9e server"
|
||||
|
||||
categraf:
|
||||
image: "flashcatcloud/categraf:v0.1.9"
|
||||
container_name: "categraf"
|
||||
hostname: "categraf01"
|
||||
restart: always
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
HOST_PROC: /hostfs/proc
|
||||
HOST_SYS: /hostfs/sys
|
||||
HOST_MOUNT_PREFIX: /hostfs
|
||||
volumes:
|
||||
- ./categraf/conf:/etc/categraf/conf
|
||||
- /:/hostfs
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
ports:
|
||||
- "8094:8094/tcp"
|
||||
networks:
|
||||
- nightingale
|
||||
depends_on:
|
||||
- nserver
|
||||
links:
|
||||
- nserver:nserver
|
||||
|
||||
agentd:
|
||||
image: ulric2019/ibex:0.3
|
||||
container_name: agentd
|
||||
hostname: agentd
|
||||
restart: always
|
||||
environment:
|
||||
GIN_MODE: release
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./ibexetc:/app/etc
|
||||
networks:
|
||||
- nightingale
|
||||
depends_on:
|
||||
- ibex
|
||||
links:
|
||||
- ibex:ibex
|
||||
command:
|
||||
- "/app/ibex"
|
||||
- "agentd"
|
||||
38
docker/ibexetc/agentd.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
# debug, release
|
||||
RunMode = "release"
|
||||
|
||||
# task meta storage dir
|
||||
MetaDir = "./meta"
|
||||
|
||||
[HTTP]
|
||||
Enable = true
|
||||
# http listening address
|
||||
Host = "0.0.0.0"
|
||||
# http listening port
|
||||
Port = 2090
|
||||
# https cert file path
|
||||
CertFile = ""
|
||||
# https key file path
|
||||
KeyFile = ""
|
||||
# whether print access log
|
||||
PrintAccessLog = true
|
||||
# whether enable pprof
|
||||
PProf = false
|
||||
# http graceful shutdown timeout, unit: s
|
||||
ShutdownTimeout = 30
|
||||
# max content length: 64M
|
||||
MaxContentLength = 67108864
|
||||
# http server read timeout, unit: s
|
||||
ReadTimeout = 20
|
||||
# http server write timeout, unit: s
|
||||
WriteTimeout = 40
|
||||
# http server idle timeout, unit: s
|
||||
IdleTimeout = 120
|
||||
|
||||
[Heartbeat]
|
||||
# unit: ms
|
||||
Interval = 1000
|
||||
# rpc servers
|
||||
Servers = ["ibex:20090"]
|
||||
# $ip or $hostname or specified string
|
||||
Host = "categraf01"
|
||||
97
docker/ibexetc/server.conf
Normal file
@@ -0,0 +1,97 @@
|
||||
# debug, release
|
||||
RunMode = "release"
|
||||
|
||||
[Log]
|
||||
# log write dir
|
||||
Dir = "logs-server"
|
||||
# log level: DEBUG INFO WARNING ERROR
|
||||
Level = "DEBUG"
|
||||
# stdout, stderr, file
|
||||
Output = "stdout"
|
||||
# # rotate by time
|
||||
# KeepHours: 4
|
||||
# # rotate by size
|
||||
# RotateNum = 3
|
||||
# # unit: MB
|
||||
# RotateSize = 256
|
||||
|
||||
[HTTP]
|
||||
Enable = true
|
||||
# http listening address
|
||||
Host = "0.0.0.0"
|
||||
# http listening port
|
||||
Port = 10090
|
||||
# https cert file path
|
||||
CertFile = ""
|
||||
# https key file path
|
||||
KeyFile = ""
|
||||
# whether print access log
|
||||
PrintAccessLog = true
|
||||
# whether enable pprof
|
||||
PProf = false
|
||||
# http graceful shutdown timeout, unit: s
|
||||
ShutdownTimeout = 30
|
||||
# max content length: 64M
|
||||
MaxContentLength = 67108864
|
||||
# http server read timeout, unit: s
|
||||
ReadTimeout = 20
|
||||
# http server write timeout, unit: s
|
||||
WriteTimeout = 40
|
||||
# http server idle timeout, unit: s
|
||||
IdleTimeout = 120
|
||||
|
||||
[BasicAuth]
|
||||
# using when call apis
|
||||
ibex = "ibex"
|
||||
|
||||
[RPC]
|
||||
Listen = "0.0.0.0:20090"
|
||||
|
||||
[Heartbeat]
|
||||
# auto detect if blank
|
||||
IP = ""
|
||||
# unit: ms
|
||||
Interval = 1000
|
||||
|
||||
[Output]
|
||||
# database | remote
|
||||
ComeFrom = "database"
|
||||
AgtdPort = 2090
|
||||
|
||||
[Gorm]
|
||||
# enable debug mode or not
|
||||
Debug = false
|
||||
# mysql postgres
|
||||
DBType = "mysql"
|
||||
# unit: s
|
||||
MaxLifetime = 7200
|
||||
# max open connections
|
||||
MaxOpenConns = 150
|
||||
# max idle connections
|
||||
MaxIdleConns = 50
|
||||
# table prefix
|
||||
TablePrefix = ""
|
||||
|
||||
[MySQL]
|
||||
# mysql address host:port
|
||||
Address = "mysql:3306"
|
||||
# mysql username
|
||||
User = "root"
|
||||
# mysql password
|
||||
Password = "1234"
|
||||
# database name
|
||||
DBName = "ibex"
|
||||
# connection params
|
||||
Parameters = "charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
||||
|
||||
[Postgres]
|
||||
# pg address host:port
|
||||
Address = "postgres:5432"
|
||||
# pg user
|
||||
User = "root"
|
||||
# pg password
|
||||
Password = "1234"
|
||||
# database name
|
||||
DBName = "ibex"
|
||||
# ssl mode
|
||||
SSLMode = "disable"
|
||||
500
docker/initsql/a-n9e.sql
Normal file
@@ -0,0 +1,500 @@
|
||||
set names utf8mb4;
|
||||
|
||||
drop database if exists n9e_v5;
|
||||
create database n9e_v5;
|
||||
use n9e_v5;
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`username` varchar(64) not null comment 'login name, cannot rename',
|
||||
`nickname` varchar(64) not null comment 'display name, chinese name',
|
||||
`password` varchar(128) not null default '',
|
||||
`phone` varchar(16) not null default '',
|
||||
`email` varchar(64) not null default '',
|
||||
`portrait` varchar(255) not null default '' comment 'portrait image url',
|
||||
`roles` varchar(255) not null comment 'Admin | Standard | Guest, split by space',
|
||||
`contacts` varchar(1024) comment 'json e.g. {wecom:xx, dingtalk_robot_token:yy}',
|
||||
`maintainer` tinyint(1) not null default 0,
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`username`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into `users`(id, username, nickname, password, roles, create_at, create_by, update_at, update_by) values(1, 'root', '超管', 'root.2020', 'Admin', unix_timestamp(now()), 'system', unix_timestamp(now()), 'system');
|
||||
|
||||
CREATE TABLE `user_group` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(128) not null default '',
|
||||
`note` varchar(255) not null default '',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`create_by`),
|
||||
KEY (`update_at`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into user_group(id, name, create_at, create_by, update_at, update_by) values(1, 'demo-root-group', unix_timestamp(now()), 'root', unix_timestamp(now()), 'root');
|
||||
|
||||
CREATE TABLE `user_group_member` (
|
||||
`group_id` bigint unsigned not null,
|
||||
`user_id` bigint unsigned not null,
|
||||
KEY (`group_id`),
|
||||
KEY (`user_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into user_group_member(group_id, user_id) values(1, 1);
|
||||
|
||||
CREATE TABLE `configs` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`ckey` varchar(191) not null,
|
||||
`cval` varchar(1024) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`ckey`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `role` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(191) not null default '',
|
||||
`note` varchar(255) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`name`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into `role`(name, note) values('Admin', 'Administrator role');
|
||||
insert into `role`(name, note) values('Standard', 'Ordinary user role');
|
||||
insert into `role`(name, note) values('Guest', 'Readonly user role');
|
||||
|
||||
CREATE TABLE `role_operation`(
|
||||
`role_name` varchar(128) not null,
|
||||
`operation` varchar(191) not null,
|
||||
KEY (`role_name`),
|
||||
KEY (`operation`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- Admin is special, who has no concrete operation but can do anything.
|
||||
insert into `role_operation`(role_name, operation) values('Guest', '/metric/explorer');
|
||||
insert into `role_operation`(role_name, operation) values('Guest', '/object/explorer');
|
||||
insert into `role_operation`(role_name, operation) values('Guest', '/help/version');
|
||||
insert into `role_operation`(role_name, operation) values('Guest', '/help/contact');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/metric/explorer');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/object/explorer');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/help/version');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/help/contact');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/users');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/user-groups');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/user-groups/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/user-groups/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/user-groups/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/busi-groups');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/busi-groups/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/busi-groups/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/busi-groups/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/targets');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/targets/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/targets/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/targets/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/dashboards');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/dashboards/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/dashboards/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/dashboards/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-rules');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-rules/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-rules/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-rules/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-mutes');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-mutes/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-mutes/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-subscribes');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-subscribes/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-subscribes/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-subscribes/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-cur-events');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-cur-events/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/alert-his-events');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tpls');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tpls/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tpls/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tpls/del');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/del');
|
||||
|
||||
-- for alert_rule | collect_rule | mute | dashboard grouping
|
||||
CREATE TABLE `busi_group` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(191) not null,
|
||||
`label_enable` tinyint(1) not null default 0,
|
||||
`label_value` varchar(191) not null default '' comment 'if label_enable: label_value can not be blank',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`name`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into busi_group(id, name, create_at, create_by, update_at, update_by) values(1, 'Default Busi Group', unix_timestamp(now()), 'root', unix_timestamp(now()), 'root');
|
||||
|
||||
CREATE TABLE `busi_group_member` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`busi_group_id` bigint not null comment 'busi group id',
|
||||
`user_group_id` bigint not null comment 'user group id',
|
||||
`perm_flag` char(2) not null comment 'ro | rw',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`busi_group_id`),
|
||||
KEY (`user_group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into busi_group_member(busi_group_id, user_group_id, perm_flag) values(1, 1, "rw");
|
||||
|
||||
-- for dashboard new version
|
||||
CREATE TABLE `board` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`name` varchar(191) not null,
|
||||
`tags` varchar(255) not null comment 'split by space',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`group_id`, `name`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- for dashboard new version
|
||||
CREATE TABLE `board_payload` (
|
||||
`id` bigint unsigned not null comment 'dashboard id',
|
||||
`payload` mediumtext not null,
|
||||
UNIQUE KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- deprecated
|
||||
CREATE TABLE `dashboard` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`name` varchar(191) not null,
|
||||
`tags` varchar(255) not null comment 'split by space',
|
||||
`configs` varchar(8192) comment 'dashboard variables',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`group_id`, `name`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- deprecated
|
||||
-- auto create the first subclass 'Default chart group' of dashboard
|
||||
CREATE TABLE `chart_group` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`dashboard_id` bigint unsigned not null,
|
||||
`name` varchar(255) not null,
|
||||
`weight` int not null default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`dashboard_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- deprecated
|
||||
CREATE TABLE `chart` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint unsigned not null comment 'chart group id',
|
||||
`configs` text,
|
||||
`weight` int not null default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `chart_share` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`cluster` varchar(128) not null,
|
||||
`configs` text,
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
primary key (`id`),
|
||||
key (`create_at`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_rule` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`cluster` varchar(128) not null,
|
||||
`name` varchar(255) not null,
|
||||
`note` varchar(1024) not null default '',
|
||||
`prod` varchar(255) not null default '',
|
||||
`algorithm` varchar(255) not null default '',
|
||||
`algo_params` varchar(255),
|
||||
`delay` int not null default 0,
|
||||
`severity` tinyint(1) not null comment '1:Emergency 2:Warning 3:Notice',
|
||||
`disabled` tinyint(1) not null comment '0:enabled 1:disabled',
|
||||
`prom_for_duration` int not null comment 'prometheus for, unit:s',
|
||||
`prom_ql` text not null comment 'promql',
|
||||
`prom_eval_interval` int not null comment 'evaluate interval',
|
||||
`enable_stime` char(5) not null default '00:00',
|
||||
`enable_etime` char(5) not null default '23:59',
|
||||
`enable_days_of_week` varchar(32) not null default '' comment 'split by space: 0 1 2 3 4 5 6',
|
||||
`enable_in_bg` tinyint(1) not null default 0 comment '1: only this bg 0: global',
|
||||
`notify_recovered` tinyint(1) not null comment 'whether notify when recovery',
|
||||
`notify_channels` varchar(255) not null default '' comment 'split by space: sms voice email dingtalk wecom',
|
||||
`notify_groups` varchar(255) not null default '' comment 'split by space: 233 43',
|
||||
`notify_repeat_step` int not null default 0 comment 'unit: min',
|
||||
`notify_max_number` int not null default 0 comment '',
|
||||
`recover_duration` int not null default 0 comment 'unit: s',
|
||||
`callbacks` varchar(255) not null default '' comment 'split by space: http://a.com/api/x http://a.com/api/y',
|
||||
`runbook_url` varchar(255),
|
||||
`append_tags` varchar(255) not null default '' comment 'split by space: service=n9e mod=api',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`group_id`),
|
||||
KEY (`update_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_mute` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`prod` varchar(255) not null default '',
|
||||
`cluster` varchar(128) not null,
|
||||
`tags` varchar(4096) not null default '' comment 'json,map,tagkey->regexp|value',
|
||||
`cause` varchar(255) not null default '',
|
||||
`btime` bigint not null default 0 comment 'begin time',
|
||||
`etime` bigint not null default 0 comment 'end time',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`create_at`),
|
||||
KEY (`group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_subscribe` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`cluster` varchar(128) not null,
|
||||
`rule_id` bigint not null default 0,
|
||||
`tags` varchar(4096) not null default '' comment 'json,map,tagkey->regexp|value',
|
||||
`redefine_severity` tinyint(1) default 0 comment 'is redefine severity?',
|
||||
`new_severity` tinyint(1) not null comment '0:Emergency 1:Warning 2:Notice',
|
||||
`redefine_channels` tinyint(1) default 0 comment 'is redefine channels?',
|
||||
`new_channels` varchar(255) not null default '' comment 'split by space: sms voice email dingtalk wecom',
|
||||
`user_group_ids` varchar(250) not null comment 'split by space 1 34 5, notify cc to user_group_ids',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`update_at`),
|
||||
KEY (`group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `target` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default 0 comment 'busi group id',
|
||||
`cluster` varchar(128) not null comment 'append to alert event as field',
|
||||
`ident` varchar(191) not null comment 'target id',
|
||||
`note` varchar(255) not null default '' comment 'append to alert event as field',
|
||||
`tags` varchar(512) not null default '' comment 'append to series data as tags, split by space, append external space at suffix',
|
||||
`update_at` bigint not null default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY (`ident`),
|
||||
KEY (`group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
-- case1: target_idents; case2: target_tags
|
||||
-- CREATE TABLE `collect_rule` (
|
||||
-- `id` bigint unsigned not null auto_increment,
|
||||
-- `group_id` bigint not null default 0 comment 'busi group id',
|
||||
-- `cluster` varchar(128) not null,
|
||||
-- `target_idents` varchar(512) not null default '' comment 'ident list, split by space',
|
||||
-- `target_tags` varchar(512) not null default '' comment 'filter targets by tags, split by space',
|
||||
-- `name` varchar(191) not null default '',
|
||||
-- `note` varchar(255) not null default '',
|
||||
-- `step` int not null,
|
||||
-- `type` varchar(64) not null comment 'e.g. port proc log plugin',
|
||||
-- `data` text not null,
|
||||
-- `append_tags` varchar(255) not null default '' comment 'split by space: e.g. mod=n9e dept=cloud',
|
||||
-- `create_at` bigint not null default 0,
|
||||
-- `create_by` varchar(64) not null default '',
|
||||
-- `update_at` bigint not null default 0,
|
||||
-- `update_by` varchar(64) not null default '',
|
||||
-- PRIMARY KEY (`id`),
|
||||
-- KEY (`group_id`, `type`, `name`)
|
||||
-- ) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `metric_view` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(191) not null default '',
|
||||
`cate` tinyint(1) not null comment '0: preset 1: custom',
|
||||
`configs` varchar(8192) not null default '',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` bigint not null default 0 comment 'user id',
|
||||
`update_at` bigint not null default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`create_by`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into metric_view(name, cate, configs) values('Host View', 0, '{"filters":[{"oper":"=","label":"__name__","value":"cpu_usage_idle"}],"dynamicLabels":[],"dimensionLabels":[{"label":"ident","value":""}]}');
|
||||
|
||||
CREATE TABLE `recording_rule` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default '0' comment 'group_id',
|
||||
`cluster` varchar(128) not null,
|
||||
`name` varchar(255) not null comment 'new metric name',
|
||||
`note` varchar(255) not null comment 'rule note',
|
||||
`disabled` tinyint(1) not null comment '0:enabled 1:disabled',
|
||||
`prom_ql` varchar(8192) not null comment 'promql',
|
||||
`prom_eval_interval` int not null comment 'evaluate interval',
|
||||
`append_tags` varchar(255) default '' comment 'split by space: service=n9e mod=api',
|
||||
`create_at` bigint default '0',
|
||||
`create_by` varchar(64) default '',
|
||||
`update_at` bigint default '0',
|
||||
`update_by` varchar(64) default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `group_id` (`group_id`),
|
||||
KEY `update_at` (`update_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_aggr_view` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(191) not null default '',
|
||||
`rule` varchar(2048) not null default '',
|
||||
`cate` tinyint(1) not null comment '0: preset 1: custom',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` bigint not null default 0 comment 'user id',
|
||||
`update_at` bigint not null default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`create_by`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
insert into alert_aggr_view(name, rule, cate) values('By BusiGroup, Severity', 'field:group_name::field:severity', 0);
|
||||
insert into alert_aggr_view(name, rule, cate) values('By RuleName', 'field:rule_name', 0);
|
||||
|
||||
CREATE TABLE `alert_cur_event` (
|
||||
`id` bigint unsigned not null comment 'use alert_his_event.id',
|
||||
`cluster` varchar(128) not null,
|
||||
`group_id` bigint unsigned not null comment 'busi group id of rule',
|
||||
`group_name` varchar(255) not null default '' comment 'busi group name',
|
||||
`hash` varchar(64) not null comment 'rule_id + vector_pk',
|
||||
`rule_id` bigint unsigned not null,
|
||||
`rule_name` varchar(255) not null,
|
||||
`rule_note` varchar(2048) not null default 'alert rule note',
|
||||
`rule_prod` varchar(255) not null default '',
|
||||
`rule_algo` varchar(255) not null default '',
|
||||
`severity` tinyint(1) not null comment '0:Emergency 1:Warning 2:Notice',
|
||||
`prom_for_duration` int not null comment 'prometheus for, unit:s',
|
||||
`prom_ql` varchar(8192) not null comment 'promql',
|
||||
`prom_eval_interval` int not null comment 'evaluate interval',
|
||||
`callbacks` varchar(255) not null default '' comment 'split by space: http://a.com/api/x http://a.com/api/y',
|
||||
`runbook_url` varchar(255),
|
||||
`notify_recovered` tinyint(1) not null comment 'whether notify when recovery',
|
||||
`notify_channels` varchar(255) not null default '' comment 'split by space: sms voice email dingtalk wecom',
|
||||
`notify_groups` varchar(255) not null default '' comment 'split by space: 233 43',
|
||||
`notify_repeat_next` bigint not null default 0 comment 'next timestamp to notify, get repeat settings from rule',
|
||||
`notify_cur_number` int not null default 0 comment '',
|
||||
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
|
||||
`target_note` varchar(191) not null default '' comment 'target note',
|
||||
`trigger_time` bigint not null,
|
||||
`trigger_value` varchar(255) not null,
|
||||
`tags` varchar(1024) not null default '' comment 'merge data_tags rule_tags, split by ,,',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`hash`),
|
||||
KEY (`rule_id`),
|
||||
KEY (`trigger_time`, `group_id`),
|
||||
KEY (`notify_repeat_next`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_his_event` (
|
||||
`id` bigint unsigned not null AUTO_INCREMENT,
|
||||
`is_recovered` tinyint(1) not null,
|
||||
`cluster` varchar(128) not null,
|
||||
`group_id` bigint unsigned not null comment 'busi group id of rule',
|
||||
`group_name` varchar(255) not null default '' comment 'busi group name',
|
||||
`hash` varchar(64) not null comment 'rule_id + vector_pk',
|
||||
`rule_id` bigint unsigned not null,
|
||||
`rule_name` varchar(255) not null,
|
||||
`rule_note` varchar(2048) not null default 'alert rule note',
|
||||
`rule_prod` varchar(255) not null default '',
|
||||
`rule_algo` varchar(255) not null default '',
|
||||
`severity` tinyint(1) not null comment '0:Emergency 1:Warning 2:Notice',
|
||||
`prom_for_duration` int not null comment 'prometheus for, unit:s',
|
||||
`prom_ql` varchar(8192) not null comment 'promql',
|
||||
`prom_eval_interval` int not null comment 'evaluate interval',
|
||||
`callbacks` varchar(255) not null default '' comment 'split by space: http://a.com/api/x http://a.com/api/y',
|
||||
`runbook_url` varchar(255),
|
||||
`notify_recovered` tinyint(1) not null comment 'whether notify when recovery',
|
||||
`notify_channels` varchar(255) not null default '' comment 'split by space: sms voice email dingtalk wecom',
|
||||
`notify_groups` varchar(255) not null default '' comment 'split by space: 233 43',
|
||||
`notify_cur_number` int not null default 0 comment '',
|
||||
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
|
||||
`target_note` varchar(191) not null default '' comment 'target note',
|
||||
`trigger_time` bigint not null,
|
||||
`trigger_value` varchar(255) not null,
|
||||
`recover_time` bigint not null default 0,
|
||||
`last_eval_time` bigint not null default 0 comment 'for time filter',
|
||||
`tags` varchar(1024) not null default '' comment 'merge data_tags rule_tags, split by ,,',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`hash`),
|
||||
KEY (`rule_id`),
|
||||
KEY (`trigger_time`, `group_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `task_tpl`
|
||||
(
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int unsigned not null comment 'busi group id',
|
||||
`title` varchar(255) not null default '',
|
||||
`account` varchar(64) not null,
|
||||
`batch` int unsigned not null default 0,
|
||||
`tolerance` int unsigned not null default 0,
|
||||
`timeout` int unsigned not null default 0,
|
||||
`pause` varchar(255) not null default '',
|
||||
`script` text not null,
|
||||
`args` varchar(512) not null default '',
|
||||
`tags` varchar(255) not null default '' comment 'split by space',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
`update_at` bigint not null default 0,
|
||||
`update_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`group_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `task_tpl_host`
|
||||
(
|
||||
`ii` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id` int unsigned not null comment 'task tpl id',
|
||||
`host` varchar(128) not null comment 'ip or hostname',
|
||||
PRIMARY KEY (`ii`),
|
||||
KEY (`id`, `host`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `task_record`
|
||||
(
|
||||
`id` bigint unsigned not null comment 'ibex task id',
|
||||
`group_id` bigint not null comment 'busi group id',
|
||||
`ibex_address` varchar(128) not null,
|
||||
`ibex_auth_user` varchar(128) not null default '',
|
||||
`ibex_auth_pass` varchar(128) not null default '',
|
||||
`title` varchar(255) not null default '',
|
||||
`account` varchar(64) not null,
|
||||
`batch` int unsigned not null default 0,
|
||||
`tolerance` int unsigned not null default 0,
|
||||
`timeout` int unsigned not null default 0,
|
||||
`pause` varchar(255) not null default '',
|
||||
`script` text not null,
|
||||
`args` varchar(512) not null default '',
|
||||
`create_at` bigint not null default 0,
|
||||
`create_by` varchar(64) not null default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`create_at`, `group_id`),
|
||||
KEY (`create_by`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
1362
docker/initsql/b-ibex.sql
Normal file
3
docker/initsql/c-init.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
GRANT ALL ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY '1234';
|
||||
GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY '1234';
|
||||
GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '1234';
|
||||
551
docker/initsql_for_postgres/a-n9e-for-Postgres.sql
Normal file
@@ -0,0 +1,551 @@
|
||||
-- n9e version 5.8 for postgres
|
||||
CREATE TABLE users (
|
||||
id bigserial,
|
||||
username varchar(64) not null ,
|
||||
nickname varchar(64) not null ,
|
||||
password varchar(128) not null default '',
|
||||
phone varchar(16) not null default '',
|
||||
email varchar(64) not null default '',
|
||||
portrait varchar(255) not null default '' ,
|
||||
roles varchar(255) not null ,
|
||||
contacts varchar(1024) ,
|
||||
maintainer smallint not null default 0,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE users ADD CONSTRAINT users_pk PRIMARY KEY (id);
|
||||
ALTER TABLE users ADD CONSTRAINT users_un UNIQUE (username);
|
||||
|
||||
COMMENT ON COLUMN users.username IS 'login name, cannot rename';
|
||||
COMMENT ON COLUMN users.nickname IS 'display name, chinese name';
|
||||
COMMENT ON COLUMN users.portrait IS 'portrait image url';
|
||||
COMMENT ON COLUMN users.roles IS 'Admin | Standard | Guest, split by space';
|
||||
COMMENT ON COLUMN users.contacts IS 'json e.g. {wecom:xx, dingtalk_robot_token:yy}';
|
||||
|
||||
insert into users(id, username, nickname, password, roles, create_at, create_by, update_at, update_by) values(1, 'root', '超管', 'root.2020', 'Admin', date_part('epoch',current_timestamp)::int, 'system', date_part('epoch',current_timestamp)::int, 'system');
|
||||
|
||||
|
||||
CREATE TABLE user_group (
|
||||
id bigserial,
|
||||
name varchar(128) not null default '',
|
||||
note varchar(255) not null default '',
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE user_group ADD CONSTRAINT user_group_pk PRIMARY KEY (id);
|
||||
CREATE INDEX user_group_create_by_idx ON user_group (create_by);
|
||||
CREATE INDEX user_group_update_at_idx ON user_group (update_at);
|
||||
|
||||
insert into user_group(id, name, create_at, create_by, update_at, update_by) values(1, 'demo-root-group', date_part('epoch',current_timestamp)::int, 'root', date_part('epoch',current_timestamp)::int, 'root');
|
||||
|
||||
CREATE TABLE user_group_member (
|
||||
group_id bigint not null,
|
||||
user_id bigint not null
|
||||
) ;
|
||||
CREATE INDEX user_group_member_group_id_idx ON user_group_member (group_id);
|
||||
CREATE INDEX user_group_member_user_id_idx ON user_group_member (user_id);
|
||||
|
||||
insert into user_group_member(group_id, user_id) values(1, 1);
|
||||
|
||||
CREATE TABLE configs (
|
||||
id bigserial,
|
||||
ckey varchar(191) not null,
|
||||
cval varchar(1024) not null default ''
|
||||
) ;
|
||||
ALTER TABLE configs ADD CONSTRAINT configs_pk PRIMARY KEY (id);
|
||||
ALTER TABLE configs ADD CONSTRAINT configs_un UNIQUE (ckey);
|
||||
|
||||
CREATE TABLE role (
|
||||
id bigserial,
|
||||
name varchar(191) not null default '',
|
||||
note varchar(255) not null default ''
|
||||
) ;
|
||||
ALTER TABLE role ADD CONSTRAINT role_pk PRIMARY KEY (id);
|
||||
ALTER TABLE role ADD CONSTRAINT role_un UNIQUE ("name");
|
||||
|
||||
insert into role(name, note) values('Admin', 'Administrator role');
|
||||
insert into role(name, note) values('Standard', 'Ordinary user role');
|
||||
insert into role(name, note) values('Guest', 'Readonly user role');
|
||||
|
||||
CREATE TABLE role_operation(
|
||||
role_name varchar(128) not null,
|
||||
operation varchar(191) not null
|
||||
) ;
|
||||
CREATE INDEX role_operation_role_name_idx ON role_operation (role_name);
|
||||
CREATE INDEX role_operation_operation_idx ON role_operation (operation);
|
||||
|
||||
|
||||
-- Admin is special, who has no concrete operation but can do anything.
|
||||
insert into role_operation(role_name, operation) values('Guest', '/metric/explorer');
|
||||
insert into role_operation(role_name, operation) values('Guest', '/object/explorer');
|
||||
insert into role_operation(role_name, operation) values('Guest', '/help/version');
|
||||
insert into role_operation(role_name, operation) values('Guest', '/help/contact');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/metric/explorer');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/object/explorer');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/help/version');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/help/contact');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/users');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/user-groups');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/user-groups/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/user-groups/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/user-groups/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/busi-groups');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/busi-groups/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/busi-groups/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/busi-groups/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/targets');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/targets/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/targets/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/targets/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/dashboards');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/dashboards/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/dashboards/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/dashboards/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-rules');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-rules/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-rules/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-rules/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-mutes');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-mutes/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-mutes/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-subscribes');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-subscribes/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-subscribes/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-subscribes/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-cur-events');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-cur-events/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/alert-his-events');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tpls');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tpls/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tpls/put');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tpls/del');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tasks');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tasks/add');
|
||||
insert into role_operation(role_name, operation) values('Standard', '/job-tasks/put');
|
||||
|
||||
|
||||
-- for alert_rule | collect_rule | mute | dashboard grouping
|
||||
CREATE TABLE busi_group (
|
||||
id bigserial,
|
||||
name varchar(191) not null,
|
||||
label_enable smallint not null default 0,
|
||||
label_value varchar(191) not null default '' ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE busi_group ADD CONSTRAINT busi_group_pk PRIMARY KEY (id);
|
||||
ALTER TABLE busi_group ADD CONSTRAINT busi_group_un UNIQUE ("name");
|
||||
COMMENT ON COLUMN busi_group.label_value IS 'if label_enable: label_value can not be blank';
|
||||
|
||||
insert into busi_group(id, name, create_at, create_by, update_at, update_by) values(1, 'Default Busi Group', date_part('epoch',current_timestamp)::int, 'root', date_part('epoch',current_timestamp)::int, 'root');
|
||||
|
||||
CREATE TABLE busi_group_member (
|
||||
id bigserial,
|
||||
busi_group_id bigint not null ,
|
||||
user_group_id bigint not null ,
|
||||
perm_flag char(2) not null
|
||||
) ;
|
||||
ALTER TABLE busi_group_member ADD CONSTRAINT busi_group_member_pk PRIMARY KEY (id);
|
||||
CREATE INDEX busi_group_member_busi_group_id_idx ON busi_group_member (busi_group_id);
|
||||
CREATE INDEX busi_group_member_user_group_id_idx ON busi_group_member (user_group_id);
|
||||
COMMENT ON COLUMN busi_group_member.busi_group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN busi_group_member.user_group_id IS 'user group id';
|
||||
COMMENT ON COLUMN busi_group_member.perm_flag IS 'ro | rw';
|
||||
|
||||
insert into busi_group_member(busi_group_id, user_group_id, perm_flag) values(1, 1, 'rw');
|
||||
|
||||
-- for dashboard new version
|
||||
CREATE TABLE board (
|
||||
id bigserial not null ,
|
||||
group_id bigint not null default 0 ,
|
||||
name varchar(191) not null,
|
||||
tags varchar(255) not null ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE board ADD CONSTRAINT board_pk PRIMARY KEY (id);
|
||||
ALTER TABLE board ADD CONSTRAINT board_un UNIQUE (group_id,"name");
|
||||
COMMENT ON COLUMN board.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN board.tags IS 'split by space';
|
||||
|
||||
-- for dashboard new version
|
||||
CREATE TABLE board_payload (
|
||||
id bigint not null ,
|
||||
payload text not null
|
||||
);
|
||||
ALTER TABLE board_payload ADD CONSTRAINT board_payload_un UNIQUE (id);
|
||||
COMMENT ON COLUMN board_payload.id IS 'dashboard id';
|
||||
|
||||
-- deprecated
|
||||
CREATE TABLE dashboard (
|
||||
id bigserial,
|
||||
group_id bigint not null default 0 ,
|
||||
name varchar(191) not null,
|
||||
tags varchar(255) not null ,
|
||||
configs varchar(8192) ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE dashboard ADD CONSTRAINT dashboard_pk PRIMARY KEY (id);
|
||||
|
||||
-- deprecated
|
||||
-- auto create the first subclass 'Default chart group' of dashboard
|
||||
CREATE TABLE chart_group (
|
||||
id bigserial,
|
||||
dashboard_id bigint not null,
|
||||
name varchar(255) not null,
|
||||
weight int not null default 0
|
||||
) ;
|
||||
ALTER TABLE chart_group ADD CONSTRAINT chart_group_pk PRIMARY KEY (id);
|
||||
|
||||
-- deprecated
|
||||
CREATE TABLE chart (
|
||||
id bigserial,
|
||||
group_id bigint not null ,
|
||||
configs text,
|
||||
weight int not null default 0
|
||||
) ;
|
||||
ALTER TABLE chart ADD CONSTRAINT chart_pk PRIMARY KEY (id);
|
||||
|
||||
CREATE TABLE chart_share (
|
||||
id bigserial,
|
||||
cluster varchar(128) not null,
|
||||
configs text,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE chart_share ADD CONSTRAINT chart_share_pk PRIMARY KEY (id);
|
||||
CREATE INDEX chart_share_create_at_idx ON chart_share (create_at);
|
||||
|
||||
CREATE TABLE alert_rule (
|
||||
id bigserial NOT NULL,
|
||||
group_id int8 NOT NULL DEFAULT 0,
|
||||
"cluster" varchar(128) NOT NULL,
|
||||
"name" varchar(255) NOT NULL,
|
||||
note varchar(1024) NOT NULL,
|
||||
severity int2 NOT NULL,
|
||||
disabled int2 NOT NULL,
|
||||
prom_for_duration int4 NOT NULL,
|
||||
prom_ql text NOT NULL,
|
||||
prom_eval_interval int4 NOT NULL,
|
||||
enable_stime bpchar(5) NOT NULL DEFAULT '00:00'::bpchar,
|
||||
enable_etime bpchar(5) NOT NULL DEFAULT '23:59'::bpchar,
|
||||
enable_days_of_week varchar(32) NOT NULL DEFAULT ''::character varying,
|
||||
enable_in_bg int2 NOT NULL DEFAULT 0,
|
||||
notify_recovered int2 NOT NULL,
|
||||
notify_channels varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_groups varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_repeat_step int4 NOT NULL DEFAULT 0,
|
||||
notify_max_number int4 not null default 0,
|
||||
recover_duration int4 NOT NULL DEFAULT 0,
|
||||
callbacks varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
runbook_url varchar(255) NULL,
|
||||
append_tags varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
create_at int8 NOT NULL DEFAULT 0,
|
||||
create_by varchar(64) NOT NULL DEFAULT ''::character varying,
|
||||
update_at int8 NOT NULL DEFAULT 0,
|
||||
update_by varchar(64) NOT NULL DEFAULT ''::character varying,
|
||||
prod varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
algorithm varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
algo_params varchar(255) NULL,
|
||||
delay int4 NOT NULL DEFAULT 0,
|
||||
CONSTRAINT alert_rule_pk PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX alert_rule_group_id_idx ON alert_rule USING btree (group_id);
|
||||
CREATE INDEX alert_rule_update_at_idx ON alert_rule USING btree (update_at);
|
||||
|
||||
COMMENT ON COLUMN alert_rule.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN alert_rule.severity IS '0:Emergency 1:Warning 2:Notice';
|
||||
COMMENT ON COLUMN alert_rule.disabled IS '0:enabled 1:disabled';
|
||||
COMMENT ON COLUMN alert_rule.prom_for_duration IS 'prometheus for, unit:s';
|
||||
COMMENT ON COLUMN alert_rule.prom_ql IS 'promql';
|
||||
COMMENT ON COLUMN alert_rule.prom_eval_interval IS 'evaluate interval';
|
||||
COMMENT ON COLUMN alert_rule.enable_stime IS '00:00';
|
||||
COMMENT ON COLUMN alert_rule.enable_etime IS '23:59';
|
||||
COMMENT ON COLUMN alert_rule.enable_days_of_week IS 'split by space: 0 1 2 3 4 5 6';
|
||||
COMMENT ON COLUMN alert_rule.enable_in_bg IS '1: only this bg 0: global';
|
||||
COMMENT ON COLUMN alert_rule.notify_recovered IS 'whether notify when recovery';
|
||||
COMMENT ON COLUMN alert_rule.notify_channels IS 'split by space: sms voice email dingtalk wecom';
|
||||
COMMENT ON COLUMN alert_rule.notify_groups IS 'split by space: 233 43';
|
||||
COMMENT ON COLUMN alert_rule.notify_repeat_step IS 'unit: min';
|
||||
COMMENT ON COLUMN alert_rule.recover_duration IS 'unit: s';
|
||||
COMMENT ON COLUMN alert_rule.callbacks IS 'split by space: http://a.com/api/x http://a.com/api/y';
|
||||
COMMENT ON COLUMN alert_rule.append_tags IS 'split by space: service=n9e mod=api';
|
||||
|
||||
CREATE TABLE alert_mute (
|
||||
id bigserial,
|
||||
group_id bigint not null default 0 ,
|
||||
prod varchar(255) NOT NULL DEFAULT '' ,
|
||||
cluster varchar(128) not null,
|
||||
tags varchar(4096) not null default '' ,
|
||||
cause varchar(255) not null default '',
|
||||
btime bigint not null default 0 ,
|
||||
etime bigint not null default 0 ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE alert_mute ADD CONSTRAINT alert_mute_pk PRIMARY KEY (id);
|
||||
CREATE INDEX alert_mute_create_at_idx ON alert_mute (create_at);
|
||||
CREATE INDEX alert_mute_group_id_idx ON alert_mute (group_id);
|
||||
COMMENT ON COLUMN alert_mute.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN alert_mute.tags IS 'json,map,tagkey->regexp|value';
|
||||
COMMENT ON COLUMN alert_mute.btime IS 'begin time';
|
||||
COMMENT ON COLUMN alert_mute.etime IS 'end time';
|
||||
|
||||
CREATE TABLE alert_subscribe (
|
||||
id bigserial,
|
||||
group_id bigint not null default 0 ,
|
||||
cluster varchar(128) not null,
|
||||
rule_id bigint not null default 0,
|
||||
tags jsonb not null ,
|
||||
redefine_severity smallint default 0 ,
|
||||
new_severity smallint not null ,
|
||||
redefine_channels smallint default 0 ,
|
||||
new_channels varchar(255) not null default '' ,
|
||||
user_group_ids varchar(250) not null ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE alert_subscribe ADD CONSTRAINT alert_subscribe_pk PRIMARY KEY (id);
|
||||
CREATE INDEX alert_subscribe_group_id_idx ON alert_subscribe (group_id);
|
||||
CREATE INDEX alert_subscribe_update_at_idx ON alert_subscribe (update_at);
|
||||
COMMENT ON COLUMN alert_subscribe.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN alert_subscribe.tags IS 'json,map,tagkey->regexp|value';
|
||||
COMMENT ON COLUMN alert_subscribe.redefine_severity IS 'is redefine severity?';
|
||||
COMMENT ON COLUMN alert_subscribe.new_severity IS '0:Emergency 1:Warning 2:Notice';
|
||||
COMMENT ON COLUMN alert_subscribe.redefine_channels IS 'is redefine channels?';
|
||||
COMMENT ON COLUMN alert_subscribe.new_channels IS 'split by space: sms voice email dingtalk wecom';
|
||||
COMMENT ON COLUMN alert_subscribe.user_group_ids IS 'split by space 1 34 5, notify cc to user_group_ids';
|
||||
|
||||
|
||||
CREATE TABLE target (
|
||||
id bigserial,
|
||||
group_id bigint not null default 0 ,
|
||||
cluster varchar(128) not null ,
|
||||
ident varchar(191) not null ,
|
||||
note varchar(255) not null default '' ,
|
||||
tags varchar(512) not null default '' ,
|
||||
update_at bigint not null default 0
|
||||
) ;
|
||||
ALTER TABLE target ADD CONSTRAINT target_pk PRIMARY KEY (id);
|
||||
ALTER TABLE target ADD CONSTRAINT target_un UNIQUE (ident);
|
||||
CREATE INDEX target_group_id_idx ON target (group_id);
|
||||
|
||||
COMMENT ON COLUMN target.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN target."cluster" IS 'append to alert event as field';
|
||||
COMMENT ON COLUMN target.ident IS 'target id';
|
||||
COMMENT ON COLUMN target.note IS 'append to alert event as field';
|
||||
COMMENT ON COLUMN target.tags IS 'append to series data as tags, split by space, append external space at suffix';
|
||||
|
||||
|
||||
CREATE TABLE metric_view (
|
||||
id bigserial,
|
||||
name varchar(191) not null default '',
|
||||
cate smallint not null ,
|
||||
configs varchar(8192) not null default '',
|
||||
create_at bigint not null default 0,
|
||||
create_by bigint not null default 0 ,
|
||||
update_at bigint not null default 0
|
||||
) ;
|
||||
ALTER TABLE metric_view ADD CONSTRAINT metric_view_pk PRIMARY KEY (id);
|
||||
CREATE INDEX metric_view_create_by_idx ON metric_view (create_by);
|
||||
|
||||
COMMENT ON COLUMN metric_view.cate IS '0: preset 1: custom';
|
||||
COMMENT ON COLUMN metric_view.create_by IS 'user id';
|
||||
|
||||
insert into metric_view(name, cate, configs) values('Host View', 0, '{"filters":[{"oper":"=","label":"__name__","value":"cpu_usage_idle"}],"dynamicLabels":[],"dimensionLabels":[{"label":"ident","value":""}]}');
|
||||
|
||||
CREATE TABLE alert_aggr_view (
|
||||
id bigserial,
|
||||
name varchar(191) not null default '',
|
||||
rule varchar(2048) not null default '',
|
||||
cate smallint not null ,
|
||||
create_at bigint not null default 0,
|
||||
create_by bigint not null default 0 ,
|
||||
update_at bigint not null default 0
|
||||
) ;
|
||||
ALTER TABLE alert_aggr_view ADD CONSTRAINT alert_aggr_view_pk PRIMARY KEY (id);
|
||||
CREATE INDEX alert_aggr_view_create_by_idx ON alert_aggr_view (create_by);
|
||||
|
||||
COMMENT ON COLUMN alert_aggr_view.cate IS '0: preset 1: custom';
|
||||
COMMENT ON COLUMN alert_aggr_view.create_by IS 'user id';
|
||||
|
||||
insert into alert_aggr_view(name, rule, cate) values('By BusiGroup, Severity', 'field:group_name::field:severity', 0);
|
||||
insert into alert_aggr_view(name, rule, cate) values('By RuleName', 'field:rule_name', 0);
|
||||
|
||||
CREATE TABLE alert_cur_event (
|
||||
id bigserial NOT NULL,
|
||||
"cluster" varchar(128) NOT NULL,
|
||||
group_id int8 NOT NULL,
|
||||
group_name varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
hash varchar(64) NOT NULL,
|
||||
rule_id int8 NOT NULL,
|
||||
rule_name varchar(255) NOT NULL,
|
||||
rule_note varchar(2048) NOT NULL DEFAULT 'alert rule note'::character varying,
|
||||
severity int2 NOT NULL,
|
||||
prom_for_duration int4 NOT NULL,
|
||||
prom_ql varchar(8192) NOT NULL,
|
||||
prom_eval_interval int4 NOT NULL,
|
||||
callbacks varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
runbook_url varchar(255) NULL,
|
||||
notify_recovered int2 NOT NULL,
|
||||
notify_channels varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_groups varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_repeat_next int8 NOT NULL DEFAULT 0,
|
||||
notify_cur_number int4 not null default 0,
|
||||
target_ident varchar(191) NOT NULL DEFAULT ''::character varying,
|
||||
target_note varchar(191) NOT NULL DEFAULT ''::character varying,
|
||||
trigger_time int8 NOT NULL,
|
||||
trigger_value varchar(255) NOT NULL,
|
||||
tags varchar(1024) NOT NULL DEFAULT ''::character varying,
|
||||
rule_prod varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
rule_algo varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
CONSTRAINT alert_cur_event_pk PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX alert_cur_event_hash_idx ON alert_cur_event USING btree (hash);
|
||||
CREATE INDEX alert_cur_event_notify_repeat_next_idx ON alert_cur_event USING btree (notify_repeat_next);
|
||||
CREATE INDEX alert_cur_event_rule_id_idx ON alert_cur_event USING btree (rule_id);
|
||||
CREATE INDEX alert_cur_event_trigger_time_idx ON alert_cur_event USING btree (trigger_time, group_id);
|
||||
COMMENT ON COLUMN alert_cur_event.id IS 'use alert_his_event.id';
|
||||
COMMENT ON COLUMN alert_cur_event.group_id IS 'busi group id of rule';
|
||||
COMMENT ON COLUMN alert_cur_event.group_name IS 'busi group name';
|
||||
COMMENT ON COLUMN alert_cur_event.hash IS 'rule_id + vector_pk';
|
||||
COMMENT ON COLUMN alert_cur_event.rule_note IS 'alert rule note';
|
||||
COMMENT ON COLUMN alert_cur_event.severity IS '1:Emergency 2:Warning 3:Notice';
|
||||
COMMENT ON COLUMN alert_cur_event.prom_for_duration IS 'prometheus for, unit:s';
|
||||
COMMENT ON COLUMN alert_cur_event.prom_ql IS 'promql';
|
||||
COMMENT ON COLUMN alert_cur_event.prom_eval_interval IS 'evaluate interval';
|
||||
COMMENT ON COLUMN alert_cur_event.callbacks IS 'split by space: http://a.com/api/x http://a.com/api/y';
|
||||
COMMENT ON COLUMN alert_cur_event.notify_recovered IS 'whether notify when recovery';
|
||||
COMMENT ON COLUMN alert_cur_event.notify_channels IS 'split by space: sms voice email dingtalk wecom';
|
||||
COMMENT ON COLUMN alert_cur_event.notify_groups IS 'split by space: 233 43';
|
||||
COMMENT ON COLUMN alert_cur_event.notify_repeat_next IS 'next timestamp to notify, get repeat settings from rule';
|
||||
COMMENT ON COLUMN alert_cur_event.target_ident IS 'target ident, also in tags';
|
||||
COMMENT ON COLUMN alert_cur_event.target_note IS 'target note';
|
||||
COMMENT ON COLUMN alert_cur_event.tags IS 'merge data_tags rule_tags, split by ,,';
|
||||
|
||||
CREATE TABLE alert_his_event (
|
||||
id bigserial NOT NULL,
|
||||
is_recovered int2 NOT NULL,
|
||||
"cluster" varchar(128) NOT NULL,
|
||||
group_id int8 NOT NULL,
|
||||
group_name varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
hash varchar(64) NOT NULL,
|
||||
rule_id int8 NOT NULL,
|
||||
rule_name varchar(255) NOT NULL,
|
||||
rule_note varchar(2048) NOT NULL DEFAULT 'alert rule note'::character varying,
|
||||
severity int2 NOT NULL,
|
||||
prom_for_duration int4 NOT NULL,
|
||||
prom_ql varchar(8192) NOT NULL,
|
||||
prom_eval_interval int4 NOT NULL,
|
||||
callbacks varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
runbook_url varchar(255) NULL,
|
||||
notify_recovered int2 NOT NULL,
|
||||
notify_channels varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_groups varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
notify_cur_number int4 not null default 0,
|
||||
target_ident varchar(191) NOT NULL DEFAULT ''::character varying,
|
||||
target_note varchar(191) NOT NULL DEFAULT ''::character varying,
|
||||
trigger_time int8 NOT NULL,
|
||||
trigger_value varchar(255) NOT NULL,
|
||||
recover_time int8 NOT NULL DEFAULT 0,
|
||||
last_eval_time int8 NOT NULL DEFAULT 0,
|
||||
tags varchar(1024) NOT NULL DEFAULT ''::character varying,
|
||||
rule_prod varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
rule_algo varchar(255) NOT NULL DEFAULT ''::character varying,
|
||||
CONSTRAINT alert_his_event_pk PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX alert_his_event_hash_idx ON alert_his_event USING btree (hash);
|
||||
CREATE INDEX alert_his_event_rule_id_idx ON alert_his_event USING btree (rule_id);
|
||||
CREATE INDEX alert_his_event_trigger_time_idx ON alert_his_event USING btree (trigger_time, group_id);
|
||||
|
||||
COMMENT ON COLUMN alert_his_event.group_id IS 'busi group id of rule';
|
||||
COMMENT ON COLUMN alert_his_event.group_name IS 'busi group name';
|
||||
COMMENT ON COLUMN alert_his_event.hash IS 'rule_id + vector_pk';
|
||||
COMMENT ON COLUMN alert_his_event.rule_note IS 'alert rule note';
|
||||
COMMENT ON COLUMN alert_his_event.severity IS '0:Emergency 1:Warning 2:Notice';
|
||||
COMMENT ON COLUMN alert_his_event.prom_for_duration IS 'prometheus for, unit:s';
|
||||
COMMENT ON COLUMN alert_his_event.prom_ql IS 'promql';
|
||||
COMMENT ON COLUMN alert_his_event.prom_eval_interval IS 'evaluate interval';
|
||||
COMMENT ON COLUMN alert_his_event.callbacks IS 'split by space: http://a.com/api/x http://a.com/api/y';
|
||||
COMMENT ON COLUMN alert_his_event.notify_recovered IS 'whether notify when recovery';
|
||||
COMMENT ON COLUMN alert_his_event.notify_channels IS 'split by space: sms voice email dingtalk wecom';
|
||||
COMMENT ON COLUMN alert_his_event.notify_groups IS 'split by space: 233 43';
|
||||
COMMENT ON COLUMN alert_his_event.target_ident IS 'target ident, also in tags';
|
||||
COMMENT ON COLUMN alert_his_event.target_note IS 'target note';
|
||||
COMMENT ON COLUMN alert_his_event.last_eval_time IS 'for time filter';
|
||||
COMMENT ON COLUMN alert_his_event.tags IS 'merge data_tags rule_tags, split by ,,';
|
||||
|
||||
CREATE TABLE task_tpl
|
||||
(
|
||||
id serial,
|
||||
group_id int not null ,
|
||||
title varchar(255) not null default '',
|
||||
account varchar(64) not null,
|
||||
batch int not null default 0,
|
||||
tolerance int not null default 0,
|
||||
timeout int not null default 0,
|
||||
pause varchar(255) not null default '',
|
||||
script text not null,
|
||||
args varchar(512) not null default '',
|
||||
tags varchar(255) not null default '' ,
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default '',
|
||||
update_at bigint not null default 0,
|
||||
update_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE task_tpl ADD CONSTRAINT task_tpl_pk PRIMARY KEY (id);
|
||||
CREATE INDEX task_tpl_group_id_idx ON task_tpl (group_id);
|
||||
|
||||
COMMENT ON COLUMN task_tpl.group_id IS 'busi group id';
|
||||
COMMENT ON COLUMN task_tpl.tags IS 'split by space';
|
||||
|
||||
|
||||
CREATE TABLE task_tpl_host
|
||||
(
|
||||
ii serial,
|
||||
id int not null ,
|
||||
host varchar(128) not null
|
||||
) ;
|
||||
ALTER TABLE task_tpl_host ADD CONSTRAINT task_tpl_host_pk PRIMARY KEY (id);
|
||||
CREATE INDEX task_tpl_host_id_idx ON task_tpl_host (id,host);
|
||||
|
||||
COMMENT ON COLUMN task_tpl_host.id IS 'task tpl id';
|
||||
COMMENT ON COLUMN task_tpl_host.host IS 'ip or hostname';
|
||||
|
||||
CREATE TABLE task_record
|
||||
(
|
||||
id bigserial,
|
||||
group_id bigint not null ,
|
||||
ibex_address varchar(128) not null,
|
||||
ibex_auth_user varchar(128) not null default '',
|
||||
ibex_auth_pass varchar(128) not null default '',
|
||||
title varchar(255) not null default '',
|
||||
account varchar(64) not null,
|
||||
batch int not null default 0,
|
||||
tolerance int not null default 0,
|
||||
timeout int not null default 0,
|
||||
pause varchar(255) not null default '',
|
||||
script text not null,
|
||||
args varchar(512) not null default '',
|
||||
create_at bigint not null default 0,
|
||||
create_by varchar(64) not null default ''
|
||||
) ;
|
||||
ALTER TABLE task_record ADD CONSTRAINT task_record_pk PRIMARY KEY (id);
|
||||
CREATE INDEX task_record_create_at_idx ON task_record (create_at,group_id);
|
||||
CREATE INDEX task_record_create_by_idx ON task_record (create_by);
|
||||
|
||||
COMMENT ON COLUMN task_record.id IS 'ibex task id';
|
||||
COMMENT ON COLUMN task_record.group_id IS 'busi group id';
|
||||
5
docker/mysqletc/my.cnf
Normal file
@@ -0,0 +1,5 @@
|
||||
[mysqld]
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
datadir = /var/lib/mysql
|
||||
bind-address = 0.0.0.0
|
||||
392
docker/n9eetc/alerts/elasticsearch_by_exporter.json
Normal file
@@ -0,0 +1,392 @@
|
||||
[
|
||||
{
|
||||
"name": "Elastic Cluster Red status",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": " elasticsearch_cluster_health_status{color=\"red\"} == 1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchClusterRed"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elastic Cluster Yellow status",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "elasticsearch_cluster_health_status{color=\"yellow\"} == 1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchClusterYellow"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch disk out of space of the instance",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 10",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchDiskOutOfSpace"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch disk space low of the instance",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 20",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchDiskSpaceLow"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch Heap Usage Too High of the instance",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "(elasticsearch_jvm_memory_used_bytes{area=\"heap\"} / elasticsearch_jvm_memory_max_bytes{area=\"heap\"}) * 100 > 90",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchHeapUsageTooHigh"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch Heap Usage warning of the instance",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "(elasticsearch_jvm_memory_used_bytes{area=\"heap\"} / elasticsearch_jvm_memory_max_bytes{area=\"heap\"}) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchHeapUsageWarning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch initializing shards of the instance",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 900,
|
||||
"prom_ql": "elasticsearch_cluster_health_initializing_shards > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchInitializingShards"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch no new documents of the instance",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 300,
|
||||
"prom_ql": "rate(elasticsearch_indices_docs{es_data_node=\"true\"}[5m]) == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchNoNewDocuments"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch pending tasks of the instance",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 900,
|
||||
"prom_ql": "elasticsearch_cluster_health_number_of_pending_tasks > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchPendingTasks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch relocation shards of the instance",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 900,
|
||||
"prom_ql": "elasticsearch_cluster_health_relocating_shards > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchRelocationShards"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch unassigned shards of the instance",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "elasticsearch_cluster_health_unassigned_shards > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchUnassignedShards"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch Unhealthy Data Nodes",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "elasticsearch_cluster_health_number_of_data_nodes < number_of_data_nodes",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchHealthyDataNodes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Elasticsearch Unhealthy Nodes",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": " elasticsearch_cluster_health_number_of_nodes < number_of_nodes",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ElasticsearchHealthyNodes"
|
||||
]
|
||||
}
|
||||
]
|
||||
30
docker/n9eetc/alerts/http_response_by_categraf.json
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"name": "HTTP地址探测失败",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "http_response_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
58
docker/n9eetc/alerts/kafka_by_exporter.json
Normal file
@@ -0,0 +1,58 @@
|
||||
[
|
||||
{
|
||||
"name": "数据有丢失风险-同步副本数小于3",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "sum(kafka_topic_partition_in_sync_replica) by (topic) < 3",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "消费能力不足-积压消息数超过50条",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "sum(kafka_topic_partition_current_offset{instance=\"$instance\"}) by (topic) - sum(kafka_consumergroup_current_offset{instance=\"$instance\"}) by (topic) ",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
243
docker/n9eetc/alerts/linux_by_categraf.json
Normal file
@@ -0,0 +1,243 @@
|
||||
[
|
||||
{
|
||||
"name": "监控对象失联",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "max_over_time(target_up[130s]) == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "机器负载-CPU较高,请关注",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "cpu_usage_idle{cpu=\"cpu-total\"} < 25",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "机器负载-内存较高,请关注",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "mem_available_percent < 25",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "硬盘-IO有点繁忙",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(diskio_io_time[1m])/10 > 99",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "硬盘-预计再有4小时写满",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "predict_linear(disk_free[1h], 4*3600) < 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡-入向有丢包",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "increase(net_drop_in[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡-出向有丢包",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "increase(net_drop_out[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网络连接-TME_WAIT数量超过2万",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "netstat_tcp_time_wait > 20000",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
|
||||
344
docker/n9eetc/alerts/linux_by_exporter.json
Normal file
@@ -0,0 +1,344 @@
|
||||
[
|
||||
{
|
||||
"name": "inode资源不足-使用率超过90",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(100 - ((node_filesystem_files_free * 100) / node_filesystem_files))>90",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "内存资源不足-利用率大于75%",
|
||||
"note": "需要扩容或者升级配置了",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(node_memory_MemTotal_bytes - node_memory_MemFree_bytes - (node_memory_Cached_bytes + node_memory_Buffers_bytes))/node_memory_MemTotal_bytes*100 > 75",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"dingtalk"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "内存资源不足-利用率大于95%",
|
||||
"note": "需要扩容或者升级配置了",
|
||||
"severity": 1,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(node_memory_MemTotal_bytes - node_memory_MemFree_bytes - (node_memory_Cached_bytes + node_memory_Buffers_bytes))/node_memory_MemTotal_bytes*100 > 95",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"dingtalk"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "文件句柄不足-使用率超过90%",
|
||||
"note": "可以将文件句柄limit调大,或者扩容",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(node_filefd_allocated{instance=\"$node\"}/node_filefd_maximum{instance=\"$node\"}*100) > 90",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "某磁盘无法正常读写",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(node_filesystem_device_error{instance=\"$node\",mountpoint!~\"/var/lib/.*\",mountpoint!~\"/run.*\"}) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "磁盘需要清理了-利用率达到92%",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(100 - ((node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes) ) > 92 ",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"dingtalk"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "系统conntrack需要调整-使用率超过80%",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "node_nf_conntrack_entries / node_nf_conntrack_entries_limit*100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "系统出现oom",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "increase(node_vmstat_oom_kill[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡入方向丢包",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(node_network_receive_drop_total{device=~\"e.*\"}[1m]) > 3",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡出方向丢包",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(node_network_transmit_drop_total{device=~\"e.*\"}[1m]) > 3",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "计算资源不足-机器每个核平均负载大于10",
|
||||
"note": "需要扩容或者升级配置了",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "avg (node_load1) by (instance)/count(count(node_cpu_seconds_total) by (cpu,instance)) by (instance) >10",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "运行进程数过多-超过3000",
|
||||
"note": "建议扩容",
|
||||
"severity": 2,
|
||||
"disabled": 1,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "node_procs_running > 3000",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
393
docker/n9eetc/alerts/linux_by_telegraf.json
Normal file
@@ -0,0 +1,393 @@
|
||||
[
|
||||
{
|
||||
"name": "有地址PING不通,请注意",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "ping_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "有监控对象失联",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "target_up != 1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "有端口探测失败,请注意",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "net_response_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "机器负载-CPU较高,请关注",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "cpu_usage_idle{cpu=\"cpu-total\"} < 25",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "机器负载-内存较高,请关注",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "mem_available_percent < 25",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "硬盘-IO非常繁忙",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(diskio_io_time[1m])/10 > 99",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "硬盘-预计再有4小时写满",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "predict_linear(disk_free[1h], 4*3600) < 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡-入向有丢包",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "increase(net_drop_in[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网卡-出向有丢包",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "increase(net_drop_out[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "网络连接-TME_WAIT数量超过2万",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "netstat_tcp_time_wait > 20000",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "进程监控-有进程数为0,某进程可能挂了",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "procstat_lookup_running == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "进程监控-进程句柄限制过小",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "procstat_rlimit_num_fds_soft < 2048",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "进程监控-采集失败",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "procstat_lookup_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
|
||||
242
docker/n9eetc/alerts/mongo_by_exporter.json
Normal file
@@ -0,0 +1,242 @@
|
||||
[
|
||||
{
|
||||
"name": "Mongo出现Assert错误",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 1800,
|
||||
"prom_ql": "rate(mongodb_asserts_total{type=~\"regular|message\"}[5m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoAssertsDetected"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo出现游标超时",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 1800,
|
||||
"prom_ql": "rate(mongodb_mongod_metrics_cursor_timed_out_total[5m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoRecurrentCursorTimeout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo出现页错误中断",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 1800,
|
||||
"prom_ql": "rate(mongodb_extra_info_page_faults_total[5m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoRecurrentMemoryPageFaults"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo刚刚有重启,请注意",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mongodb_instance_uptime_seconds < 60",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoRestarted"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo副本集主从延迟超过30s",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "mongodb_mongod_replset_member_replication_lag > 30",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoSlaveReplicationLag(>30s)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo实例挂了",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "MongoServerDown",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoServerDown"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo操作平均耗时超过250秒",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 600,
|
||||
"prom_ql": "rate(mongodb_mongod_op_latencies_latency_total[5m]) / rate(mongodb_mongod_op_latencies_ops_total[5m]) > 250000",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoOperationHighLatency"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mongo连接数已超过80%",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mongodb_connections{state=\"current\"}) / avg by (instance) (mongodb_connections{state=\"available\"}) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MongoTooManyConnections(>80%)"
|
||||
]
|
||||
}
|
||||
]
|
||||
302
docker/n9eetc/alerts/mysql_by_categraf.json
Normal file
@@ -0,0 +1,302 @@
|
||||
[
|
||||
{
|
||||
"name": "MysqlInnodbLogWaits",
|
||||
"note": "MySQL innodb log writes stalling",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "rate(mysql_global_status_innodb_log_waits[15m]) > 10",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlInnodbLogWaits"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveIoThreadNotRunning",
|
||||
"note": "MySQL Slave IO thread not running",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveIoThreadNotRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveReplicationLag",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) > 30",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveReplicationLag"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveSqlThreadNotRunning",
|
||||
"note": "MySQL Slave SQL thread not running",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveSqlThreadNotRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql刚刚有重启,请注意",
|
||||
"note": "MySQL has just been restarted, less than one minute ago",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_global_status_uptime < 60",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlRestarted"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql实例挂了",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_up == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlDown"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql打开了很多文件句柄,请注意",
|
||||
"note": "More than 80% of MySQL files open",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_open_files) / avg by (instance)(mysql_global_variables_open_files_limit) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlHighOpenFiles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql最近一分钟有慢查询出现",
|
||||
"note": "MySQL server mysql has some new slow query",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "increase(mysql_global_status_slow_queries[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlowQueries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql有超过60%的连接是running状态",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_threads_running) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 60",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlHighThreadsRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql连接数已超过80%",
|
||||
"note": "More than 80% of MySQL connections are in use",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlTooManyConnections"
|
||||
]
|
||||
}
|
||||
]
|
||||
302
docker/n9eetc/alerts/mysql_by_exporter.json
Normal file
@@ -0,0 +1,302 @@
|
||||
[
|
||||
{
|
||||
"name": "MysqlInnodbLogWaits",
|
||||
"note": "MySQL innodb log writes stalling",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "rate(mysql_global_status_innodb_log_waits[15m]) > 10",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlInnodbLogWaits"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveIoThreadNotRunning",
|
||||
"note": "MySQL Slave IO thread not running",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveIoThreadNotRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveReplicationLag",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) > 30",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveReplicationLag"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MysqlSlaveSqlThreadNotRunning",
|
||||
"note": "MySQL Slave SQL thread not running",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlaveSqlThreadNotRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql刚刚有重启,请注意",
|
||||
"note": "MySQL has just been restarted, less than one minute ago",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_global_status_uptime < 60",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlRestarted"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql实例挂了",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "mysql_up == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlDown"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql打开了很多文件句柄,请注意",
|
||||
"note": "More than 80% of MySQL files open",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_innodb_num_open_files) / avg by (instance)(mysql_global_variables_open_files_limit) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlHighOpenFiles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql最近一分钟有慢查询出现",
|
||||
"note": "MySQL server mysql has some new slow query",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "increase(mysql_global_status_slow_queries[1m]) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlSlowQueries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql有超过60%的连接是running状态",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_threads_running) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 60",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlHighThreadsRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mysql连接数已超过80%",
|
||||
"note": "More than 80% of MySQL connections are in use",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 120,
|
||||
"prom_ql": "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=MysqlTooManyConnections"
|
||||
]
|
||||
}
|
||||
]
|
||||
30
docker/n9eetc/alerts/net_response_by_categraf.json
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"name": "网络地址探活失败",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "net_response_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
30
docker/n9eetc/alerts/ntp_by_categraf.json
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"name": "NTP时间偏移太大",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "ntp_offset_ms > 1000 or ntp_offset_ms < -1000",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
30
docker/n9eetc/alerts/ping_by_categraf.json
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"name": "PING地址探测失败",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "ping_result_code != 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
92
docker/n9eetc/alerts/process_by_exporter.json
Normal file
@@ -0,0 +1,92 @@
|
||||
[
|
||||
{
|
||||
"name": "Process X high number of open files",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "avg by (instance) (namedprocess_namegroup_worst_fd_ratio{groupname=\"X\"}) * 100 > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ProcessHighOpenFiles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Process X is down",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "sum by (instance) (namedprocess_namegroup_num_procs{groupname=\"X\"}) == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ProcessNotRunning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Process X is restarted",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "namedprocess_namegroup_oldest_start_time_seconds{groupname=\"X\"} > time() - 60 ",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=ProcessRestarted"
|
||||
]
|
||||
}
|
||||
]
|
||||
62
docker/n9eetc/alerts/procstat_by_categraf.json
Normal file
@@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"name": "进程监控-有进程数为0,某进程可能挂了",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "procstat_lookup_count == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "进程监控-进程句柄限制过小",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "procstat_rlimit_num_fds_soft < 2048",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [
|
||||
"email",
|
||||
"dingtalk",
|
||||
"wecom"
|
||||
],
|
||||
"notify_repeat_step": 60,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
182
docker/n9eetc/alerts/redis_by_categraf.json
Normal file
@@ -0,0 +1,182 @@
|
||||
[
|
||||
{
|
||||
"name": "Redis Ping 延迟高(大于100毫秒)",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "redis_ping_use_seconds > 0.1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=HighPingLatency"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis内存使用率较高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "redis_maxmemory > 0 and (redis_used_memory / redis_maxmemory) > 0.85",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighMemoryUsage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis出现拒绝连接",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "(rate(redis_rejected_connections[5m])) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisRejectedConnHigh"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis刚刚有重启,请注意",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "redis_uptime_in_seconds < 600",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisLowUptime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis较低的命中率",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(redis_keyspace_hits[5m])\n/\n(rate(redis_keyspace_misses[5m]) + rate(redis_keyspace_hits[5m]))\n< 0.9",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisLowHitRatio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis驱逐率较高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(sum(rate(redis_evicted_keys[5m])) / sum(redis_keyspace_keys)) > 0.1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighKeysEvictionRatio"
|
||||
]
|
||||
}
|
||||
]
|
||||
212
docker/n9eetc/alerts/redis_by_exporter.json
Normal file
@@ -0,0 +1,212 @@
|
||||
[
|
||||
{
|
||||
"name": "Redis内存使用率较高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "redis_memory_max_bytes > 0 and (redis_memory_used_bytes / redis_memory_max_bytes) > 0.85",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighMemoryUsage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis出现拒绝连接",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "(rate(redis_rejected_connections_total[5m])) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisRejectedConnHigh"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis刚刚有重启,请注意",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 0,
|
||||
"prom_ql": "redis_uptime_in_seconds < 600",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisLowUptime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis客户端连接数过高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(redis_connected_clients / redis_config_maxclients) > 0.85",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighClientsUsage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis延迟高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "sum(rate(redis_commands_duration_seconds_total[5m])) / sum(rate(redis_commands_processed_total[5m])) > 0.25",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighResponseTime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis较低的命中率",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "rate(redis_keyspace_hits_total[5m])\n/\n(rate(redis_keyspace_misses_total[5m]) + rate(redis_keyspace_hits_total[5m]))\n< 0.9",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisLowHitRatio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Redis驱逐率较高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "(sum(rate(redis_evicted_keys_total[5m])) / sum(redis_db_keys)) > 0.1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=RedisHighKeysEvictionRatio"
|
||||
]
|
||||
}
|
||||
]
|
||||
182
docker/n9eetc/alerts/windows_by_exporter.json
Normal file
@@ -0,0 +1,182 @@
|
||||
[
|
||||
{
|
||||
"name": "CPU利用率高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "100 * sum by (instance) (rate(windows_cpu_time_total{mode != 'idle'}[5m])) / count by (instance) (windows_cpu_core_frequency_mhz) > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=HighCPUUsage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "机器在15分钟内发生过重启",
|
||||
"note": "",
|
||||
"severity": 3,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "time() - windows_system_system_up_time < 900",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=UpTimeLessThan15Min"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "物理内存使用率过高",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "100 * (windows_cs_physical_memory_bytes - windows_os_physical_memory_free_bytes) / windows_cs_physical_memory_bytes > 80",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=HighPhysicalMemoryUsage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "硬盘快要写满了,注意",
|
||||
"note": "",
|
||||
"severity": 1,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "100 * (windows_logical_disk_size_bytes - windows_logical_disk_free_bytes) / windows_logical_disk_size_bytes > 90",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=LogicalDiskFull"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "系统有In方向丢包情况出现",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "100 * rate(windows_net_packets_received_errors[5m]) / (rate(windows_net_packets_received_errors[5m]) + rate(windows_net_packets_received_total[5m])>0) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=HighInboundErrorRate"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "系统有Out方向丢包情况出现",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "100 * rate(windows_net_packets_outbound_errors[5m]) / (rate(windows_net_packets_outbound_errors[5m]) + rate(windows_net_packets_sent_total[5m])>0) > 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": [
|
||||
"alertname=HighOutboundErrorRate"
|
||||
]
|
||||
}
|
||||
]
|
||||
114
docker/n9eetc/alerts/zookeeper_by_exporter.json
Normal file
@@ -0,0 +1,114 @@
|
||||
[
|
||||
{
|
||||
"name": "Zookeeper leader 个数大于1",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "sum(zk_server_leader) > 1",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "Zookeeper 实例运行异常",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "zk_ruok == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "Zookeeper 没有 leader 了",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "sum(zk_server_leader) == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
},
|
||||
{
|
||||
"name": "Zookeeper 挂掉了",
|
||||
"note": "",
|
||||
"severity": 2,
|
||||
"disabled": 0,
|
||||
"prom_for_duration": 60,
|
||||
"prom_ql": "zk_up == 0",
|
||||
"prom_eval_interval": 15,
|
||||
"enable_stime": "00:00",
|
||||
"enable_etime": "23:59",
|
||||
"enable_days_of_week": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"0"
|
||||
],
|
||||
"enable_in_bg": 0,
|
||||
"notify_recovered": 1,
|
||||
"notify_channels": [],
|
||||
"notify_repeat_step": 60,
|
||||
"recover_duration": 0,
|
||||
"callbacks": [],
|
||||
"runbook_url": "",
|
||||
"append_tags": []
|
||||
}
|
||||
]
|
||||
431
docker/n9eetc/dashboards/elasticsearch_by_exporter.json
Normal file
@@ -0,0 +1,431 @@
|
||||
[
|
||||
{
|
||||
"name": "ElasticSearch - 模板",
|
||||
"tags": "Prometheus ElasticSearch ES",
|
||||
"configs": "{\"var\":[{\"name\":\"cluster\",\"definition\":\"label_values(elasticsearch_indices_docs,cluster)\",\"options\":[\"elasticsearch-cluster\"]},{\"name\":\"instance\",\"definition\":\"label_values(elasticsearch_indices_docs{cluster=\\\"$cluster\\\", name!=\\\"\\\"},instance)\",\"options\":[\"10.206.0.7:9200\"]},{\"name\":\"name\",\"definition\":\"label_values(elasticsearch_indices_docs{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\", name!=\\\"\\\"},name)\",\"options\":[\"node-2\",\"node-1\",\"node-3\"],\"multi\":true,\"allOption\":true}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "KPI",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_number_of_nodes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Data Nodes\",\"description\":\"集群数据节点数量\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":6,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_number_of_nodes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Nodes\",\"description\":\"集群节点数量\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":3,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum (elasticsearch_process_cpu_percent{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"} ) / count (elasticsearch_process_cpu_percent{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"} )\"}],\"name\":\"CPU usage Avg\",\"description\":\"平均CPU使用率\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"special\":80,\"from\":80},\"result\":{\"color\":\"#f90606\"}},{\"type\":\"range\",\"match\":{\"special\":70,\"from\":70},\"result\":{\"color\":\"#f5ac0f\"}},{\"type\":\"range\",\"match\":{\"to\":70},\"result\":{\"color\":\"#21c00c\"}}],\"standardOptions\":{\"util\":\"percent\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":9,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum (elasticsearch_jvm_memory_used_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}) / sum (elasticsearch_jvm_memory_max_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}) * 100\"}],\"name\":\"JVM memory used Avg\",\"description\":\"平均JVM内存使用率\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"special\":80,\"from\":80},\"result\":{\"color\":\"#f12c09\"}},{\"type\":\"range\",\"match\":{\"from\":70,\"to\":80},\"result\":{\"color\":\"#fbca18\"}},{\"type\":\"range\",\"match\":{\"to\":70},\"result\":{\"color\":\"#21c00c\"}}],\"standardOptions\":{\"util\":\"percent\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":12,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum (elasticsearch_process_open_files_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"})\"}],\"name\":\"Open file descriptors\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":15,\"y\":0,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(elasticsearch_breakers_tripped{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"})\"}],\"name\":\"Tripped for breakers\",\"description\":\"集群断路器阻断总数\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"special\",\"result\":{\"text\":\"\",\"color\":\"#21c00c\"},\"match\":{\"special\":0}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":18,\"y\":0,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_number_of_pending_tasks{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Pending tasks\",\"description\":\"等待执行的集群变更任务数量\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":5},\"result\":{\"color\":\"#f24207\"}},{\"type\":\"range\",\"match\":{\"from\":1,\"to\":5},\"result\":{\"color\":\"#f9a006\"}},{\"type\":\"range\",\"match\":{\"to\":1},\"result\":{\"color\":\"#21c00c\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":21,\"y\":0,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_status{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",color=\\\"red\\\"}==1 or (elasticsearch_cluster_health_status{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",color=\\\"green\\\"}==1)+4 or (elasticsearch_cluster_health_status{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",color=\\\"yellow\\\"}==1)+2\"}],\"name\":\"Cluster health\",\"description\":\"绿色:健康,黄色:存在副本分片异常,红色:存在主分片异常\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"special\",\"result\":{\"text\":\"N/A\"},\"match\":{}},{\"type\":\"special\",\"match\":{\"special\":5},\"result\":{\"text\":\"Green\",\"color\":\"#21c00c\"}},{\"type\":\"special\",\"match\":{\"special\":3},\"result\":{\"text\":\"Yellow\",\"color\":\"#f9e406\"}},{\"type\":\"special\",\"match\":{\"special\":1},\"result\":{\"text\":\"Red\",\"color\":\"#f43606\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":0,\"y\":0,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Shards",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_active_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Active shards\",\"description\":\"活跃分片数\\nAggregate total of all shards across all indices, which includes replica shards\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_active_primary_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Active primary shards\",\"description\":\"活跃主分片数\\nThe number of primary shards in your cluster. This is an aggregate total across all indices.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":4,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_initializing_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Initializing shards\",\"description\":\"创建中分片数量\\nCount of shards that are being freshly created\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":8,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_relocating_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Relocating shards\",\"description\":\"迁移中分片数量\\nThe number of shards that are currently moving from one node to another node.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":12,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_unassigned_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Unassigned shards\",\"description\":\"未分配的分片数量\\nThe number of shards that exist in the cluster state, but cannot be found in the cluster itself\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":20,\"y\":0,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_cluster_health_delayed_unassigned_shards{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\"}\"}],\"name\":\"Delayed shards\",\"description\":\"暂缓分配的分片数量,当节点丢失,会发生选主和数据拷贝。为了较少网络抖动等原因导致的重分配情况,配置delay参数,该值为等待delay到期将被重分配的分片数量\\nShards delayed to reduce reallocation overhead\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":16,\"y\":0,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "JVM Garbage Collection",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_jvm_gc_collection_seconds_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}} - {{gc}}\"}],\"name\":\"GC count\",\"description\":\"GC运行次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_jvm_gc_collection_seconds_sum{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}} - {{gc}}\"}],\"name\":\"GC time\",\"description\":\"GC运行耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Translog",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_translog_operations{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Total translog operations\",\"description\":\"translog大小(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_translog_size_in_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Total translog size in bytes\",\"description\":\"translog大小(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Breakers",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_breakers_tripped{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}: {{breaker}}\"}],\"name\":\"Tripped for breakers\",\"description\":\"节点断路器阻断总数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_breakers_estimated_size_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}: {{breaker}}\"},{\"expr\":\"elasticsearch_breakers_limit_size_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"B\",\"legend\":\"{{name}}: limit for {{breaker}}\"}],\"name\":\"Estimated size in bytes of breaker\",\"description\":\"预估内存大小和限制内存大小\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Cpu and Memory",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_os_load1{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"load1: {{name}}\"},{\"expr\":\"elasticsearch_os_load5{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"B\",\"legend\":\"load5: {{name}}\"},{\"expr\":\"elasticsearch_os_load15{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"C\",\"legend\":\"load15: {{name}}\"}],\"name\":\"Load average\",\"description\":\"1m/5m/15m系统负载\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_process_cpu_percent{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"CPU usage\",\"description\":\"进程CPU占比\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_jvm_memory_used_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}} used: {{area}}\"},{\"expr\":\"elasticsearch_jvm_memory_max_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"B\",\"legend\":\"{{name}} max: {{area}}\"},{\"expr\":\"elasticsearch_jvm_memory_pool_peak_used_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"C\",\"legend\":\"{{name}} peak used pool: {{pool}}\"}],\"name\":\"JVM memory usage\",\"description\":\"进程内存占用/限制/峰值(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_jvm_memory_committed_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}} committed: {{area}}\"},{\"expr\":\"elasticsearch_jvm_memory_max_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"refId\":\"B\",\"legend\":\"{{name}} max: {{area}}\"}],\"name\":\"JVM memory committed\",\"description\":\"JVM申请/限制内存(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Disk and Network",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"1-(elasticsearch_filesystem_data_available_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}/elasticsearch_filesystem_data_size_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"})\",\"legend\":\"{{name}}: {{path}}\"}],\"name\":\"Disk usage\",\"description\":\"磁盘使用率\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_transport_tx_size_bytes_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}: sent\"},{\"expr\":\"-irate(elasticsearch_transport_rx_size_bytes_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"B\",\"legend\":\"{{name}}: received\"}],\"name\":\"Network usage\",\"description\":\"网络流量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Documents",
|
||||
"weight": 7,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_docs{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Documents count on node\",\"description\":\"节点文档总数,不包含已删除文档和子文档以及刚索引的文档\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_indexing_index_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Documents indexed rate\",\"description\":\"平均每秒索引文档数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_docs_deleted{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Documents deleted rate\",\"description\":\"平均每秒删除文档数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(elasticsearch_indices_merges_docs_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Documents merged rate\",\"description\":\"平均每秒合并文档数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_merges_total_size_bytes_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Documents merged bytes\",\"description\":\"平均每秒合并文档大小\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Times",
|
||||
"weight": 8,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_search_query_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Query time\",\"description\":\"查询操作耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_indexing_index_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Indexing time\",\"description\":\"索引操作耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_merges_total_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Merging time\",\"description\":\"合并操作耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_store_throttle_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Throttle time for index store\",\"description\":\"索引存储限制耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Total Operations states",
|
||||
"weight": 9,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_indices_indexing_index_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}: indexing\"},{\"expr\":\"irate(elasticsearch_indices_search_query_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"B\",\"legend\":\"{{name}}: query\"},{\"expr\":\"irate(elasticsearch_indices_search_fetch_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"C\",\"legend\":\"{{name}}: fetch\"},{\"expr\":\"irate(elasticsearch_indices_merges_total_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"D\",\"legend\":\"{{name}}: merges\"},{\"expr\":\"irate(elasticsearch_indices_refresh_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"E\",\"legend\":\"{{name}}: refresh\"},{\"expr\":\"irate(elasticsearch_indices_flush_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"F\",\"legend\":\"{{name}}: flush\"},{\"expr\":\"irate(elasticsearch_indices_get_exists_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"G\",\"legend\":\"{{name}}: get_exists\"},{\"expr\":\"irate(elasticsearch_indices_get_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"H\",\"legend\":\"{{name}}: get_time\"},{\"expr\":\"irate(elasticsearch_indices_get_missing_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"I\",\"legend\":\"{{name}}: get_missing\"},{\"expr\":\"irate(elasticsearch_indices_indexing_delete_time_seconds_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"K\",\"legend\":\"{{name}}: indexing_delete\"},{\"expr\":\"irate(elasticsearch_indices_get_time_seconds{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"L\",\"legend\":\"{{name}}: get\"}],\"name\":\"Total Operations time\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(elasticsearch_indices_indexing_index_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}: indexing\"},{\"expr\":\"rate(elasticsearch_indices_search_query_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"B\",\"legend\":\"{{name}}: query\"},{\"expr\":\"rate(elasticsearch_indices_search_fetch_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"C\",\"legend\":\"{{name}}: fetch\"},{\"expr\":\"rate(elasticsearch_indices_merges_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"D\",\"legend\":\"{{name}}: merges\"},{\"expr\":\"rate(elasticsearch_indices_refresh_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"E\",\"legend\":\"{{name}}: refresh\"},{\"expr\":\"rate(elasticsearch_indices_flush_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"F\",\"legend\":\"{{name}}: flush\"},{\"expr\":\"rate(elasticsearch_indices_get_exists_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"G\",\"legend\":\"{{name}}: get_exists\"},{\"expr\":\"rate(elasticsearch_indices_get_missing_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"H\",\"legend\":\"{{name}}: get_missing\"},{\"expr\":\"rate(elasticsearch_indices_get_tota{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"I\",\"legend\":\"{{name}}: get\"},{\"expr\":\"rate(elasticsearch_indices_indexing_delete_total{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"refId\":\"K\",\"legend\":\"{{name}}: indexing_delete\"}],\"name\":\"Total Operations rate\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Thread Pool",
|
||||
"weight": 10,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_thread_pool_rejected_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}: {{ type }}\"}],\"name\":\"Thread Pool operations rejected\",\"description\":\"线程池reject次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_thread_pool_active_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}: {{ type }}\"}],\"name\":\"Thread Pool threads active\",\"description\":\"活跃线程数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_thread_pool_queue_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}: {{ type }}\"}],\"name\":\"Thread Pool threads queued\",\"description\":\"排队等待线程任务数量\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"irate(elasticsearch_thread_pool_completed_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}: {{ type }}\"}],\"name\":\"Thread Pool operations completed\",\"description\":\"线程池complete次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Caches",
|
||||
"weight": 11,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_fielddata_memory_size_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Field data memory size\",\"description\":\"fielddata cache内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(elasticsearch_indices_fielddata_evictions{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Field data evictions\",\"description\":\"fielddata cache平均每秒内存剔除次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_query_cache_memory_size_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Query cache size\",\"description\":\"query cache内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(elasticsearch_indices_query_cache_evictions{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Query cache evictions\",\"description\":\"query cache平均每秒内存剔除次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(elasticsearch_indices_filter_cache_evictions{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}[5m])\",\"legend\":\"{{name}}\"}],\"name\":\"Evictions from filter cache\",\"description\":\"老版本的filter cache内存剔除次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Segments",
|
||||
"weight": 12,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segments_count{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Count of index segments\",\"description\":\"segment个数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segments_memory_bytes{instance=\\\"$instance\\\",cluster=\\\"$cluster\\\",name=~\\\"$name\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Current memory size of segments in bytes\",\"description\":\"segment内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Count of documents and Total size",
|
||||
"weight": 13,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_docs_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Count of documents with only primary shards\",\"description\":\"主分片文档数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"stack\":\"off\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_store_size_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Total size of stored index data in bytes with only primary shards on all nodes\",\"description\":\"主分片索引容量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_store_size_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Total size of stored index data in bytes with all shards on all nodes\",\"description\":\"所有分片索引容量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":4,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Index writer",
|
||||
"weight": 14,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_index_writer_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Index writer with only primary shards on all nodes in bytes\",\"description\":\"主分片索引写入数据量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_index_writer_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Index writer with all shards on all nodes in bytes\",\"description\":\"所有分片索引写入数据量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Segments",
|
||||
"weight": 15,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_count_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Segments with only primary shards on all nodes\",\"description\":\"主分片segment数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_count_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Segments with all shards on all nodes\",\"description\":\"所有分片segment总数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of segments with only primary shards on all nodes in bytes\",\"description\":\"主分片segment容量\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":4,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of segments with all shards on all nodes in bytes\",\"description\":\"所有分片segment容量\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":6,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Doc values",
|
||||
"weight": 16,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_doc_values_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Doc values with only primary shards on all nodes in bytes\",\"description\":\"主分片doc value内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_doc_values_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Doc values with all shards on all nodes in bytes\",\"description\":\"所有分片doc value内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Fields",
|
||||
"weight": 17,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_fields_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of fields with only primary shards on all nodes in bytes\",\"description\":\"分片field内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_fields_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of fields with all shards on all nodes in bytes\",\"description\":\"所有分片field内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Fixed bit",
|
||||
"weight": 18,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_fixed_bit_set_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of fixed bit with only primary shards on all nodes in bytes\",\"description\":\"主分片fixed bit set内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_fixed_bit_set_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of fixed bit with all shards on all nodes in bytes\",\"description\":\"所有分片fixed bit set内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Norms",
|
||||
"weight": 19,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_norms_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of norms with only primary shards on all nodes in bytes\",\"description\":\"主分片normalization factor内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_norms_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of norms with all shards on all nodes in bytes\",\"description\":\"所有分片normalization factor内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Points",
|
||||
"weight": 20,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_points_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of points with only primary shards on all nodes in bytes\",\"description\":\"主分片point内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_points_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of points with all shards on all nodes in bytes\",\"description\":\"所有分片point内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Terms",
|
||||
"weight": 21,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_terms_memory_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of terms with only primary shards on all nodes in bytes\",\"description\":\"主分片term内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_terms_memory_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Number of terms with all shards on all nodes in bytes\",\"description\":\"所有分片term内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Indices: Terms",
|
||||
"weight": 22,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_version_map_memory_bytes_primary{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of version map with only primary shards on all nodes in bytes\",\"description\":\"所有分片version map内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"elasticsearch_indices_segment_version_map_memory_bytes_total{instance=~\\\"$instance\\\"}\",\"legend\":\"{{index}}\"}],\"name\":\"Size of version map with all shards on all nodes in bytes\",\"description\":\"所有分片version map内存占用(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
19
docker/n9eetc/dashboards/http_response_by_categraf.json
Normal file
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"name": "HTTP探测",
|
||||
"tags": "",
|
||||
"configs": "",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Default chart group",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(http_response_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(http_response_response_code) by (target)\",\"refId\":\"B\",\"legend\":\"status code\"},{\"expr\":\"max(http_response_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"},{\"expr\":\"max(http_response_cert_expire_timestamp) by (target) - time()\",\"refId\":\"D\",\"legend\":\"cert expire\"}],\"name\":\"URL Details\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}},{\"type\":\"special\",\"matcher\":{\"value\":\"D\"},\"properties\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
125
docker/n9eetc/dashboards/jmx_by_exporter.json
Normal file
@@ -0,0 +1,125 @@
|
||||
[
|
||||
{
|
||||
"name": "JMX - 模板",
|
||||
"tags": "Prometheus JMX",
|
||||
"configs": "{\"var\":[{\"name\":\"job\",\"definition\":\"jmx_exporter\"},{\"name\":\"instance\",\"definition\":\"label_values(jmx_scrape_error,instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"up{job=\\\"$job\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Status\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":1},\"result\":{\"text\":\"UP\",\"color\":\"#1eac02\"}},{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"DOWN\",\"color\":\"#f00a0a\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"time() - process_start_time_seconds{job=\\\"$job\\\",instance=\\\"$instance\\\"}\"}],\"name\":\"Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"os_available_processors{job=\\\"$job\\\",instance=\\\"$instance\\\"}\"}],\"name\":\"Available CPUs\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"os_open_file_descriptor_count{job=\\\"$job\\\",instance=\\\"$instance\\\"}\"}],\"name\":\"Open file descriptors\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "JVM Memory",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_bytes_used{area=\\\"heap\\\",job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_bytes_max{area=\\\"heap\\\",job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Max\"}],\"name\":\"JVM Memory(heap)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_bytes_used{area=\\\"nonheap\\\",job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_bytes_max{area=\\\"nonheap\\\",job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Max\"}],\"name\":\"JVM Memory(nonheap)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Memory Pool",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"CodeHeap 'non-nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"CodeHeap 'non-nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"CodeHeap 'non-nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"CodeHeap 'non-nmethods'\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"CodeHeap 'profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"CodeHeap 'profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"CodeHeap 'profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"CodeHeap 'profiled nmethods'\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"CodeHeap 'non-profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"CodeHeap 'non-profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"CodeHeap 'non-profiled nmethods'\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"CodeHeap 'non-profiled nmethods'\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"G1 Eden Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"G1 Eden Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"G1 Eden Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"G1 Eden Space\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"Compressed Class Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"Compressed Class Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"Compressed Class Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"Compressed Class Space\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"G1 Survivor Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"G1 Survivor Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"G1 Survivor Space\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"G1 Survivor Space\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"G1 Old Gen\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"G1 Old Gen\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"G1 Old Gen\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"G1 Old Gen\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":2,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_memory_pool_bytes_max{pool=\\\"Metaspace\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Max\"},{\"expr\":\"jvm_memory_pool_bytes_used{pool=\\\"Metaspace\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Used\"},{\"expr\":\"jvm_memory_pool_bytes_committed{pool=\\\"Metaspace\\\", job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Committed\"}],\"name\":\"Metaspace\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":2,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GC",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"increase(jvm_gc_collection_seconds_sum{job=\\\"$job\\\",instance=~\\\"$instance\\\"}[1m])\"}],\"name\":\"过去一分钟GC耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"increase(jvm_gc_collection_seconds_count{job=\\\"$job\\\",instance=\\\"$instance\\\"}[1m])\",\"legend\":\"\"}],\"name\":\"过去一分钟GC次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"increase(jvm_gc_collection_seconds_sum{job=\\\"$job\\\",instance=\\\"$instance\\\"}[1m])/increase(jvm_gc_collection_seconds_count{job=\\\"$job\\\",instance=\\\"$instance\\\"}[1m])\",\"legend\":\"\"}],\"name\":\"过去一分钟每次GC平均耗时(秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"bars\",\"stack\":\"off\",\"fillOpacity\":1},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Threads and Class loading",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_threads_current{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"current\"},{\"expr\":\"jvm_threads_daemon{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"daemon\"},{\"expr\":\"jvm_threads_deadlocked{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"deadlocked\"}],\"name\":\"Threads\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"jvm_classes_loaded{job=\\\"$job\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Class loading\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Physical memory",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"os_total_physical_memory_bytes{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"legend\":\"Total physical memory\"},{\"expr\":\"os_committed_virtual_memory_bytes{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"Committed virtual memory\"},{\"expr\":\"os_free_physical_memory_bytes{job=\\\"$job\\\",instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"Free physical memory\"}],\"name\":\"Physical memory\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
63
docker/n9eetc/dashboards/kafka_by_exporter.json
Normal file
@@ -0,0 +1,63 @@
|
||||
[
|
||||
{
|
||||
"name": "Kafka - 模板",
|
||||
"tags": "Kafka Prometheus ",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(kafka_brokers, instance)\"},{\"name\":\"job\",\"definition\":\"label_values(kafka_brokers, job)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "overview",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"count(count by (topic) (kafka_topic_partitions))\"}],\"name\":\"topics\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":8,\"x\":8,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"kafka_brokers\"}],\"name\":\"brokers\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":8,\"x\":0,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(kafka_topic_partitions)\"}],\"name\":\"partitions\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "throughput",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(kafka_topic_partition_current_offset{instance=\\\"$instance\\\"}[1m])) by (topic)\"}],\"name\":\"Message in per second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(kafka_consumer_lag_millis{instance=\\\"$instance\\\"}) by (consumergroup, topic) \",\"legend\":\"{{consumergroup}} (topic: {{topic}})\"}],\"name\":\"Latency by Consumer Group\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"humantimeMilliseconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(kafka_consumergroup_current_offset{instance=\\\"$instance\\\"}[1m])) by (topic)\"}],\"name\":\"Message consume per second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(kafka_topic_partition_current_offset{instance=\\\"$instance\\\"}) by (topic) - sum(kafka_consumergroup_current_offset{instance=\\\"$instance\\\"}) by (topic) \",\"legend\":\"{{consumergroup}} (topic: {{topic}})\"}],\"name\":\"Lag by Consumer Group\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "patition/replicate",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"kafka_topic_partitions{instance=\\\"$instance\\\"}\",\"legend\":\"{{topic}}\"}],\"name\":\"Partitions per Topic\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"seriesToRows\"},\"options\":{\"standardOptions\":{}},\"overrides\":[{}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"kafka_topic_partition_under_replicated_partition\",\"legend\":\"{{topic}}-{{partition}}\"}],\"name\":\"Under Replicated\",\"description\":\"副本不同步预案\\n1. Restart the Zookeeper leader.\\n2. Restart the broker\\\\brokers that are not replicating some of the partitions.\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"seriesToRows\"},\"options\":{\"standardOptions\":{}},\"overrides\":[{}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1523
docker/n9eetc/dashboards/linux_by_categraf.json
Normal file
223
docker/n9eetc/dashboards/linux_by_exporter.json
Normal file
@@ -0,0 +1,223 @@
|
||||
[
|
||||
{
|
||||
"name": "HOST - 模板",
|
||||
"tags": "Prometheus Host",
|
||||
"configs": "{\"var\":[{\"name\":\"node\",\"definition\":\"label_values(node_cpu_seconds_total, instance)\",\"selected\":\"$node\",\"options\":[\"tt-fc-es01.nj:12345\",\"tt-fc-es02.nj:12345\",\"tt-fc-dev01.nj:12345\",\"10.206.0.13:9100\"]}],\"links\":[{\"title\":\"n9e\",\"url\":\"https://n9e.gitee.io/\",\"targetBlank\":true},{\"title\":\"author\",\"url\":\"http://flashcat.cloud/\",\"targetBlank\":true}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "整体概况",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(10,100-(avg by (mode, instance)(rate(node_cpu_seconds_total{mode=\\\"idle\\\"}[1m])))*100)\",\"legend\":\"{{instance}}\"}],\"name\":\"cpu使用率 top10\",\"links\":[],\"description\":\"\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":9,\"x\":3,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(10,(node_memory_MemTotal_bytes - node_memory_MemFree_bytes - (node_memory_Cached_bytes + node_memory_Buffers_bytes))/node_memory_MemTotal_bytes*100)\",\"legend\":\"{{instance}}\"}],\"name\":\"内存使用率 top10\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(10,(node_filesystem_avail_bytes{device!~'rootfs', device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"} * 100) / node_filesystem_size_bytes{device!~'rootfs', device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"})\",\"legend\":\"{{instance}}-{{mountpoint}}\"}],\"name\":\"磁盘分区使用率 top10\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":1,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(10,rate(node_disk_io_time_seconds_total[5m]) * 100)\",\"legend\":\"{{instance}}-{{device}}\"}],\"name\":\"设备io util top10\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":1,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"count(node_boot_time_seconds)\"}],\"name\":\"监控机器数\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":40}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":0,\"y\":0,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "单机概况",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(node_memory_MemTotal_bytes{instance=\\\"$node\\\"} - node_memory_MemFree_bytes{instance=\\\"$node\\\"} - (node_memory_Cached_bytes{instance=\\\"$node\\\"} + node_memory_Buffers_bytes{instance=\\\"$node\\\"}))/node_memory_MemTotal_bytes{instance=\\\"$node\\\"}*100\"}],\"name\":\"内存使用率\",\"description\":\"如果内存使用率超过50%,则需要扩容或者升级配置了\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":25}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"result\":{\"color\":\"#369903\"},\"match\":{\"from\":0,\"to\":50}},{\"type\":\"range\",\"match\":{\"from\":50,\"to\":100},\"result\":{\"color\":\"#e3170d\"}}],\"standardOptions\":{\"util\":\"percent\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(((count(count(node_cpu_seconds_total{instance=\\\"$node\\\"}) by (cpu))) - avg(sum by (mode)(rate(node_cpu_seconds_total{mode='idle',instance=\\\"$node\\\"}[1m])))) * 100) / count(count(node_cpu_seconds_total{instance=\\\"$node\\\"}) by (cpu))\"}],\"name\":\"CPU使用率\",\"description\":\"如果cpu使用率超过50%,可以通过top命令查看机器上是否有异常进程,如果没有异常进程,则说明服务需要扩容或者机器需要升级配置了\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":30}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"result\":{\"color\":\"#369903\"},\"match\":{\"from\":0,\"to\":50}},{\"type\":\"range\",\"match\":{\"special\":50,\"from\":50,\"to\":100},\"result\":{\"color\":\"#b22222\"}}],\"standardOptions\":{\"util\":\"percent\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"max(100 - ((node_filesystem_avail_bytes{instance=\\\"$node\\\",} * 100) / node_filesystem_size_bytes{instance=\\\"$node\\\"}))\",\"legend\":\"{{mountpoint}}\"}],\"name\":\"磁盘分区使用率最大值\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\",\"decimals\":1},\"thresholds\":{\"steps\":[{\"value\":90,\"color\":\"#f90101\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":1,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_time_seconds{instance=\\\"$node\\\"} - node_boot_time_seconds{instance=\\\"$node\\\"}\"}],\"name\":\"启动时长\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"title\":null,\"value\":20}},\"options\":{\"valueMappings\":[],\"standardOptions\":{\"util\":\"humantimeSeconds\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":21,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(node_memory_SwapTotal_bytes{instance=\\\"$node\\\"} - node_memory_SwapFree_bytes{instance=\\\"$node\\\"})\"}],\"name\":\"SWAP内存使用\",\"description\":\"swap使用过高,会影响系统io性能,如果内存够用但swap使用很高,可以调小swappiness的值\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":30}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"result\":{\"color\":\"#369903\"},\"match\":{\"from\":0,\"to\":50}},{\"type\":\"range\",\"match\":{\"special\":50,\"from\":50,\"to\":80},\"result\":{\"color\":\"#fb9b2d\"}},{\"type\":\"range\",\"match\":{\"from\":80,\"to\":100000},\"result\":{\"color\":\"#d10000\"}}],\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":12,\"y\":0,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_vmstat_oom_kill{instance=\\\"$node\\\"}[1m])\",\"legend\":\"OOM\"}],\"name\":\"OOM次数\",\"description\":\"大于0,说明有进程内存不够用了,需要考虑扩容或升级配置了\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":1},\"thresholds\":{\"steps\":[{\"value\":1,\"color\":\"#f90101\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":1,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"max(rate(node_disk_io_time_seconds_total{instance=\\\"$node\\\"}[5m]) * 100)\",\"legend\":\"{{device}}\"}],\"name\":\"磁盘设备io util 最大值\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":1,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_filefd_allocated{instance=\\\"$node\\\"}/node_filefd_maximum{instance=\\\"$node\\\"}*100\"}],\"name\":\"FD使用率\",\"description\":\"如果超过80%,建议把文件描述符的最大个数调大,或者扩容\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":25}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"result\":{\"color\":\"#369903\"},\"match\":{\"from\":0,\"to\":50}},{\"type\":\"range\",\"match\":{\"special\":50,\"from\":50,\"to\":80},\"result\":{\"color\":\"#fb9b2d\"}},{\"type\":\"range\",\"match\":{\"from\":80,\"to\":100},\"result\":{\"color\":\"#d10000\"}}],\"standardOptions\":{\"util\":\"percent\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":15,\"y\":0,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"max(100 - ((node_filesystem_files_free{instance=\\\"$node\\\",mountpoint!~\\\"/var/lib/.*\\\",mountpoint!~\\\"/run/user.*\\\"} * 100) / node_filesystem_files{instance=\\\"$node\\\",mountpoint!~\\\"/var/lib/.*\\\",mountpoint!~\\\"/run/user.*\\\"}))\",\"legend\":\"{{mountpoint}}\"}],\"name\":\"inode分区使用率最大值\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\",\"decimals\":1},\"thresholds\":{\"steps\":[{\"value\":50,\"color\":\"#f90101\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":1,\"i\":\"8\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(node_filesystem_device_error{instance=\\\"$node\\\",mountpoint!~\\\"/var/lib/.*\\\",mountpoint!~\\\"/run.*\\\"})\",\"legend\":\"{{mountpoint}}\"}],\"name\":\"写文件错误数总和\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":30}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":0,\"to\":0},\"result\":{\"color\":\"#369903\"}},{\"type\":\"range\",\"match\":{\"from\":1,\"to\":10000},\"result\":{\"color\":\"#f0310f\"}}],\"standardOptions\":{\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":3,\"x\":18,\"y\":0,\"i\":\"9\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "系统指标",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_procs_running{instance=\\\"$node\\\"}\",\"legend\":\"{{mountpoint}}\"}],\"name\":\"进程数\",\"description\":\"进程数超过2000,可以考虑扩容了\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{\"steps\":[{\"value\":2000,\"color\":\"#ff0000\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_timex_offset_seconds{instance=\\\"$node\\\"}\",\"legend\":\"ntp偏移\"}],\"name\":\"NTP偏移\",\"description\":\"\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{\"steps\":[]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_intr_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"Interrupts\"},{\"expr\":\"irate(node_context_switches_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"context switches\"}],\"name\":\"上下文切换/中断\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_entropy_available_bits{instance=\\\"$node\\\"}\",\"legend\":\"entropy\"}],\"name\":\"熵池大小\",\"description\":\"熵池太小 ,程序使用随机函数会阻塞,可以安装 rng-tools 工具增加熵池大小,可参考\\n<a href=\\\"https://codeantenna.com/a/Ab6aMd3NSA\\\" target=\\\"_blank\\\">https://codeantenna.com/a/Ab6aMd3NSA</a> \",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{\"steps\":[{\"value\":100,\"color\":\"#f70202\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CPU详情",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\" (avg by (mode)(rate(node_cpu_seconds_total{instance=\\\"$node\\\",mode!=\\\"idle\\\"}[1m])))*100\",\"legend\":\"{{mode}}\"}],\"name\":\"CPU使用率详情\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\" (avg by (mode)(rate(node_cpu_seconds_total{instance=\\\"$node\\\",mode=\\\"idle\\\"}[1m])))*100\",\"legend\":\"cpu_idle\"}],\"name\":\"CPU空闲率\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{\"steps\":[{\"value\":10,\"color\":\"#f90101\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_load1{instance=\\\"$node\\\"}\",\"legend\":\"load1\"},{\"expr\":\"node_load5{instance=\\\"$node\\\"}\",\"legend\":\"load5\"},{\"expr\":\"node_load15{instance=\\\"$node\\\"}\",\"legend\":\"load15\"}],\"name\":\"CPU负载\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{\"steps\":[]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "内存详情",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_memory_HugePages_Total{instance=\\\"$node\\\"}\",\"legend\":\"HugePages_Total\"},{\"expr\":\"node_memory_Hugepagesize_bytes{instance=\\\"$node\\\"}\",\"legend\":\"HugePages_Size\"},{\"expr\":\"node_memory_HugePages_Surp{instance=\\\"$node\\\"}\",\"legend\":\"HugePages_Surp \"},{\"expr\":\"node_memory_HugePages_Free{instance=\\\"$node\\\"}\",\"legend\":\"HugePages_Free\"},{\"expr\":\"node_memory_HugePages_Rsvd{instance=\\\"$node\\\"}\",\"legend\":\"HugePages_Rsvd\"},{\"expr\":\"node_memory_AnonHugePages_bytes{instance=\\\"$node\\\"}\",\"legend\":\"AnonHugePages\"},{\"expr\":\"node_memory_Inactive_file_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Inactive_file\"},{\"expr\":\"node_memory_Inactive_anon_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Inactive_anon\"},{\"expr\":\"node_memory_Active_file_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Active_file\"},{\"expr\":\"node_memory_Active_anon_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Active_anon\"},{\"expr\":\"node_memory_Unevictable_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Unevictable\"},{\"expr\":\"node_memory_AnonPages_bytes{instance=\\\"$node\\\"}\",\"legend\":\"AnonPages\"},{\"expr\":\"node_memory_Shmem_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Shmem\"},{\"expr\":\"node_memory_Mapped_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Mapped\"},{\"expr\":\"node_memory_Cached_bytes{instance=\\\"$node\\\"} \",\"legend\":\"Cache\"},{\"expr\":\"node_memory_SwapCached_bytes{instance=\\\"$node\\\"}\",\"legend\":\"SwapCache\"},{\"expr\":\"node_memory_Mlocked_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Mlocked\"},{\"expr\":\"node_memory_Buffers_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Buffers\"}],\"name\":\"用户态内存使用\",\"description\":\"内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) \",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.35,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_memory_Slab_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Slab \"},{\"expr\":\"node_memory_SReclaimable_bytes{instance=\\\"$node\\\"}\",\"legend\":\"SReclaimable \"},{\"expr\":\"node_memory_SUnreclaim_bytes{instance=\\\"$node\\\"}\",\"legend\":\"SUnreclaim \"},{\"expr\":\"node_memory_VmallocUsed_bytes{instance=\\\"$node\\\"}\",\"legend\":\"VmallocUsed\"},{\"expr\":\"node_memory_VmallocChunk_bytes{instance=\\\"$node\\\"}\",\"legend\":\"VmallocChunk\"},{\"expr\":\"node_memory_KernelStack_bytes{instance=\\\"$node\\\"}\",\"legend\":\"KernelStack\"},{\"expr\":\"node_memory_Bounce_bytes{instance=\\\"$node\\\"}\",\"legend\":\"Bounce \"}],\"name\":\"内核态内存使用\",\"description\":\"内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) \",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_memory_DirectMap1G_bytes{instance=\\\"$node\\\"}\",\"legend\":\"DirectMap1G\"},{\"expr\":\"node_memory_DirectMap2M_bytes{instance=\\\"$node\\\"}\",\"legend\":\"DirectMap2M\"},{\"expr\":\"node_memory_DirectMap4k_bytes{instance=\\\"$node\\\"}\",\"legend\":\"DirectMap4K\"}],\"name\":\"TLB效率\",\"description\":\"/proc/meminfo中的DirectMap所统计的不是关于内存的使用,而是一个反映TLB效率的指标。TLB(Translation Lookaside Buffer)是位于CPU上的缓存,用于将内存的虚拟地址翻译成物理地址,由于TLB的大小有限,不能缓存的地址就需要访问内存里的page table来进行翻译,速度慢很多。为了尽可能地将地址放进TLB缓存,新的CPU硬件支持比4k更大的页面从而达到减少地址数量的目的, 比如2MB,4MB,甚至1GB的内存页,视不同的硬件而定。”DirectMap4k”表示映射为4kB的内存数量, “DirectMap2M”表示映射为2MB的内存数量,以此类推。所以DirectMap其实是一个反映TLB效率的指标\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_memory_NFS_Unstable_bytes{instance=\\\"$node\\\"}\",\"legend\":\"NFS Unstable\"},{\"expr\":\"node_memory_Writeback_bytes{instance=\\\"$node\\\"}\",\"legend\":\"memory_Writeback\"},{\"expr\":\"node_memory_Dirty_bytes{instance=\\\"$node\\\"}\",\"legend\":\"memory_Dirty\"}],\"name\":\"dirty page\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "磁盘详情",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_filesystem_avail_bytes{instance=\\\"$node\\\",device!~'rootfs', device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - Available\"},{\"expr\":\"node_filesystem_free_bytes{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - Free\"},{\"expr\":\"node_filesystem_size_bytes{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - Total\"}],\"name\":\"磁盘空间\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":null},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_filesystem_files{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - total\"},{\"expr\":\"node_filesystem_files_free{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - free\"}],\"name\":\"inode\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_filefd_maximum{instance=\\\"$node\\\"}\",\"legend\":\"Max open files\"},{\"expr\":\"node_filefd_allocated{instance=\\\"$node\\\"}\",\"legend\":\"Open files\"}],\"name\":\"fd使用\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_filesystem_readonly{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - ReadOnly\"},{\"expr\":\"node_filesystem_device_error{instance=\\\"$node\\\",device!~'rootfs',device!~\\\"tmpfs\\\",mountpoint!~\\\"/var/lib.*\\\"}\",\"legend\":\"{{mountpoint}} - Device error\"}],\"name\":\"读写错误\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_disk_reads_completed_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}}-reads\"},{\"expr\":\"rate(node_disk_writes_completed_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}} - Writes\"},{\"expr\":\"rate(node_disk_reads_merged_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}} - Read merged\"},{\"expr\":\"rate(node_disk_writes_merged_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}} - Write merged\"}],\"name\":\"IO/Merged次数\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_disk_read_bytes_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}}-Read bytes\"},{\"expr\":\"rate(node_disk_written_bytes_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}} - Written bytes\"}],\"name\":\"读写数据大小\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":0},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_disk_io_time_seconds_total{instance=\\\"$node\\\"}[1m])\",\"legend\":\"{{device}}\"}],\"name\":\"io util\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":2,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(rate(node_disk_read_time_seconds_total{instance=\\\"$node\\\"}[1m]) / rate(node_disk_reads_completed_total{instance=\\\"$node\\\"}[1m])+rate(node_disk_write_time_seconds_total{instance=\\\"$node\\\"}[1m]) / rate(node_disk_writes_completed_total{instance=\\\"$node\\\"}[1m]))*1000\",\"legend\":\"{{device}}\"}],\"name\":\"io await\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.64,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":2,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(rate(node_disk_read_bytes_total{instance=\\\"$node\\\"}[1m]) + rate(node_disk_written_bytes_total{instance=\\\"$node\\\"}[1m]))\\n/\\n(rate(node_disk_reads_completed_total{instance=\\\"$node\\\"}[1m]) + rate(node_disk_writes_completed_total{instance=\\\"$node\\\"}[1m]))\",\"legend\":\"avgrq-sz\"}],\"name\":\"avgrq-sz\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":4,\"i\":\"8\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_disk_io_time_weighted_seconds_total{instance=\\\"$node\\\"}[1m])\\n\",\"legend\":\"{{device}}\"}],\"name\":\"avgqu-sz\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":4,\"i\":\"9\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "网络详情",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_network_receive_bytes_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])*8\",\"legend\":\"{{device}} - in\"},{\"expr\":\"rate(node_network_transmit_bytes_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])*8\",\"legend\":\"{{device}} - out\"}],\"name\":\"出入流量大小\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_network_receive_packets_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - in\"},{\"expr\":\"rate(node_network_transmit_packets_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - out\"}],\"name\":\"packets\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_network_receive_errs_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - in\"},{\"expr\":\"rate(node_network_transmit_errs_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - out\"}],\"name\":\"error\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(node_network_receive_drop_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - in\"},{\"expr\":\"rate(node_network_transmit_drop_total{instance=\\\"$node\\\",device=~\\\"e.*\\\"}[1m])\",\"legend\":\"{{device}} - out\"}],\"name\":\"drop\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_nf_conntrack_entries{instance=\\\"$node\\\"}\",\"legend\":\"NF conntrack entries\"},{\"expr\":\"node_nf_conntrack_entries_limit{instance=\\\"$node\\\"}\",\"legend\":\"NF conntrack limit\"}],\"name\":\"nf_conntrack\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_sockstat_TCP_alloc{instance=\\\"$node\\\"}\",\"legend\":\"TCP_alloc\"},{\"expr\":\"node_sockstat_TCP_inuse{instance=\\\"$node\\\"}\",\"legend\":\"TCP_inuse\"},{\"expr\":\"node_sockstat_TCP_orphan{instance=\\\"$node\\\"}\",\"legend\":\"TCP_orphan\"},{\"expr\":\"node_sockstat_TCP_tw{instance=\\\"$node\\\"}\",\"legend\":\"TCP_tw\"},{\"expr\":\"node_netstat_Tcp_CurrEstab{instance=\\\"$node\\\"}\",\"legend\":\"TCP_CurrEstab\"}],\"name\":\"tcp\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.27,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"node_sockstat_sockets_used{instance=\\\"$node\\\"}\",\"legend\":\"Sockets_used\"}],\"name\":\"socket\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":2,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1523
docker/n9eetc/dashboards/linux_by_telegraf.json
Normal file
109
docker/n9eetc/dashboards/mongo_by_exporter.json
Normal file
@@ -0,0 +1,109 @@
|
||||
[
|
||||
{
|
||||
"name": "MongoDB Overview - 模板",
|
||||
"tags": "Prometheus MongoDB",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(mongodb_up,instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_up{instance=\\\"$instance\\\"}\",\"time\":{\"num\":1,\"unit\":\"hour\",\"description\":\"小时\"}}],\"name\":\"Up\",\"description\":\"实例数\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":1},\"result\":{\"color\":\"#53b503\"}},{\"type\":\"range\",\"match\":{\"special\":null,\"from\":0,\"to\":1},\"result\":{\"color\":\"#e70d0d\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_instance_uptime_seconds{instance='$instance'}\",\"time\":{\"num\":1,\"unit\":\"hour\",\"description\":\"小时\"}}],\"name\":\"Uptime\",\"description\":\"启用时长\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"title\":null}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":1800},\"result\":{\"color\":\"#ec7718\"}},{\"type\":\"range\",\"match\":{\"from\":1800},\"result\":{\"color\":\"#53b503\"}}],\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_memory{instance='$instance'} * 1024 * 1024\",\"legend\":\"{{type}}\"}],\"name\":\"Memory\",\"description\":\"内存占用(MiB)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_extra_info_page_faults_total{instance=\\\"$instance\\\"}[5m])\",\"legend\":\"{{type}}\"}],\"name\":\"Page Faults\",\"description\":\"页缺失中断次数 Page faults indicate that requests are processed from disk either because an index is missing or there is not enough memory for the data set. Consider increasing memory or sharding out.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"none\",\"decimals\":null},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_ss_network_bytesOut{instance='$instance'}[5m])\",\"legend\":\"bytesOut\"},{\"expr\":\"rate(mongodb_ss_network_bytesIn{instance='$instance'}[5m])\",\"refId\":\"B\",\"legend\":\"bytesIn\"}],\"name\":\"Network I/O\",\"description\":\"网络流量(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_connections{instance=\\\"$instance\\\", state=\\\"current\\\"}\",\"legend\":\"Connections\"}],\"name\":\"Connections\",\"description\":\"连接数 Keep in mind the hard limit on the maximum number of connections set by your distribution.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_asserts_total{instance=\\\"$instance\\\"}[5m])\",\"legend\":\"{{type}}\"}],\"name\":\"Assert Events\",\"description\":\"断言错误次数 Asserts are not important by themselves, but you can correlate spikes with other graphs.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":2,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_mongod_global_lock_current_queue{instance=\\\"$instance\\\"}\",\"legend\":\"{{type}}\"}],\"name\":\"Lock Queue\",\"description\":\"等待获取锁操作数量 Any number of queued operations for long periods of time is an indication of possible issues. Find the cause and fix it before requests get stuck in the queue.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":2,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Operation Info",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_op_counters_total{instance=\\\"$instance\\\", type!=\\\"command\\\"}[5m])\",\"legend\":\"{{type}}\"},{\"expr\":\"rate(mongodb_mongod_op_counters_repl_total{instance=\\\"$instance\\\", type!~\\\"(command|query|getmore)\\\"}[5m]) or \\nrate(mongodb_mongos_op_counters_repl_total{instance=\\\"$instance\\\", type!~\\\"(command|query|getmore)\\\"}[5m])\",\"refId\":\"B\",\"legend\":\"repl_{{type}}\"},{\"expr\":\"rate(mongodb_mongod_metrics_ttl_deleted_documents_total{instance=\\\"$instance\\\"}[5m]) or \\nrate(mongodb_mongos_metrics_ttl_deleted_documents_total{instance=\\\"$instance\\\"}[5m])\",\"refId\":\"C\",\"legend\":\"ttl_delete\"}],\"name\":\"Command Operations\",\"description\":\"接收请求数 Shows how many times a command is executed per second on average during the selected interval.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_mongod_metrics_document_total{instance=\\\"$instance\\\"}[5m])\",\"legend\":\"{{state}}\"}],\"name\":\"Document Operations\",\"description\":\"文档操作数 When used in combination with 'Command Operations', this graph can help identify write amplification. For example, when one insert or update command actually inserts or updates hundreds, thousands, or even millions of documents.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_mongod_op_latencies_latency_total{instance='$instance'}[5m]) / rate(mongodb_mongod_op_latencies_ops_total{instance='$instance'}[5m]) / 1000\",\"legend\":\"{{type}}\"}],\"name\":\"Response Time\",\"description\":\"操作详情耗时(毫秒)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"milliseconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(increase(mongodb_mongod_metrics_query_executor_total{instance=\\\"$instance\\\", state=\\\"scanned_objects\\\"}[5m])) / sum(increase(mongodb_mongod_metrics_document_total{instance=\\\"$instance\\\", state=\\\"returned\\\"}[5m]))\",\"legend\":\"Document\"},{\"expr\":\"sum(increase(mongodb_mongod_metrics_query_executor_total{instance=\\\"$instance\\\", state=\\\"scanned\\\"}[5m])) / sum(increase(mongodb_mongod_metrics_document_total{instance=\\\"$instance\\\", state=\\\"returned\\\"}[5m]))\",\"refId\":\"B\",\"legend\":\"Index\"}],\"name\":\"Query Efficiency\",\"description\":\"查询效率\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_mongod_metrics_cursor_open{instance=\\\"$instance\\\"}\",\"legend\":\"{{state}}\"}],\"name\":\"Cursors\",\"description\":\"游标数量 Helps identify why connections are increasing. Shows active cursors compared to cursors being automatically killed after 10 minutes due to an application not closing the connection.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Cache Info",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_mongod_wiredtiger_cache_bytes{instance='$instance'}\",\"legend\":\"{{type}}\"}],\"name\":\"Cache Size\",\"description\":\"缓存大小(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_mongod_wiredtiger_cache_bytes_total{instance='$instance'}[5m])\",\"legend\":\"{{type}}\"}],\"name\":\"Cache I/O\",\"description\":\"写入或读取的缓存数据大小(byte)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"100 * sum(mongodb_mongod_wiredtiger_cache_pages{instance='$instance',type=\\\"dirty\\\"}) / sum(mongodb_mongod_wiredtiger_cache_pages{instance='$instance',type=\\\"total\\\"})\",\"legend\":\"dirty rate\"}],\"name\":\"Cache Dirty Pages Rate\",\"description\":\"缓存脏页占比\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(mongodb_mongod_wiredtiger_cache_evicted_total{instance='$instance'}[5m])\",\"legend\":\"evicted pages\"}],\"name\":\"Cache Evicted Pages\",\"description\":\"缓存剔除页数量\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ReplSet Info",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"time() - mongodb_mongod_replset_member_election_date\"}],\"name\":\"Replset Election\",\"description\":\"副本集选主时间\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":1800},\"result\":{\"color\":\"#f24526\"}},{\"type\":\"range\",\"match\":{\"from\":1800},\"result\":{\"color\":\"#53b503\"}}],\"standardOptions\":{\"util\":\"seconds\",\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"mongodb_mongod_replset_member_replication_lag{instance=\\\"$instance\\\"}\",\"legend\":\"lag\"}],\"name\":\"Replset Lag Seconds\",\"description\":\"副本集成员主从同步延迟\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"seconds\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
119
docker/n9eetc/dashboards/mysql_by_categraf.json
Normal file
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"name": "MySQL Overview - 模板",
|
||||
"tags": "Prometheus MySQL",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(mysql_global_status_uptime, instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"min(mysql_global_status_uptime{instance=~\\\"$instance\\\"})\"}],\"name\":\"MySQL Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":1800},\"result\":{\"color\":\"#ec7718\"}},{\"type\":\"range\",\"match\":{\"from\":1800},\"result\":{\"color\":\"#369603\"}}],\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_queries{instance=~\\\"$instance\\\"}[5m])\"}],\"name\":\"Current QPS\",\"description\":\"mysql_global_status_queries\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":100},\"result\":{\"color\":\"#05a31f\"}},{\"type\":\"range\",\"match\":{\"from\":100},\"result\":{\"color\":\"#ea3939\"}}],\"standardOptions\":{\"decimals\":2}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"avg(mysql_global_variables_innodb_buffer_pool_size{instance=~\\\"$instance\\\"})\"}],\"name\":\"InnoDB Buffer Pool\",\"description\":\"**InnoDB Buffer Pool Size**\\n\\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"bytesIEC\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(increase(mysql_global_status_table_locks_waited{instance=~\\\"$instance\\\"}[5m]))\"}],\"name\":\"Table Locks Waited(5min)\",\"description\":\"**Table Locks**\\n\\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\\n\\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":1},\"result\":{\"color\":\"#e70d0d\"}},{\"type\":\"range\",\"match\":{\"to\":1},\"result\":{\"color\":\"#53b503\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Connections",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(mysql_global_status_threads_connected{instance=~\\\"$instance\\\"})\",\"legend\":\"Connections\"},{\"expr\":\"sum(mysql_global_status_max_used_connections{instance=~\\\"$instance\\\"})\",\"legend\":\"Max Used Connections\"},{\"expr\":\"sum(mysql_global_variables_max_connections{instance=~\\\"$instance\\\"})\",\"legend\":\"Max Connections\"},{\"expr\":\"sum(rate(mysql_global_status_aborted_connects{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Aborted Connections\"}],\"name\":\"MySQL Connections\",\"description\":\"**Max Connections** \\n\\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\\n\\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\\n\\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\\n\\nConnections is the number of connection attempts (successful or not) to the MySQL server.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(mysql_global_status_threads_connected{instance=~\\\"$instance\\\"})\",\"legend\":\"Threads Connected\"},{\"expr\":\"sum(mysql_global_status_threads_running{instance=~\\\"$instance\\\"})\",\"legend\":\"Threads Running\"}],\"name\":\"MySQL Client Thread Activity\",\"description\":\"Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Query Performance",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_created_tmp_tables{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Tables\"},{\"expr\":\"sum(rate(mysql_global_status_created_tmp_disk_tables{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Disk Tables\"},{\"expr\":\"sum(rate(mysql_global_status_created_tmp_files{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Files\"}],\"name\":\"MySQL Temporary Objects\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.64,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_select_full_join{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Full Join\"},{\"expr\":\"sum(rate(mysql_global_status_select_full_range_join{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Full Range Join\"},{\"expr\":\"sum(rate(mysql_global_status_select_range{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Range\"},{\"expr\":\"sum(rate(mysql_global_status_select_range_check{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Range Check\"},{\"expr\":\"sum(rate(mysql_global_status_select_scan{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Scan\"}],\"name\":\"MySQL Select Types\",\"description\":\"**MySQL Select Types**\\n\\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\\n\\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"stack\":\"off\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.41},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_sort_rows{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Rows\"},{\"expr\":\"sum(rate(mysql_global_status_sort_range{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Range\"},{\"expr\":\"sum(rate(mysql_global_status_sort_merge_passes{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Merge Passes\"},{\"expr\":\"sum(rate(mysql_global_status_sort_scan{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Scan\"}],\"name\":\"MySQL Sorts\",\"description\":\"**MySQL Sorts**\\n\\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\\n\\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_slow_queries{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Slow Queries\"}],\"name\":\"MySQL Slow Queries\",\"description\":\"**MySQL Slow Queries**\\n\\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"bars\",\"stack\":\"off\",\"fillOpacity\":0.81},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_bytes_received{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Inbound\"},{\"expr\":\"sum(rate(mysql_global_status_bytes_sent{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Outbound\"}],\"name\":\"MySQL Network Traffic\",\"description\":\"**MySQL Network Traffic**\\n\\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\",\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Commands, Handlers",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"topk(10, rate(mysql_global_status_commands_total{instance=~\\\"$instance\\\"}[5m])>0)\",\"legend\":\"Com_{{command}}\"}],\"name\":\"Top Command Counters\",\"description\":\"**Top Command Counters**\\n\\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.2,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_handlers_total{instance=~\\\"$instance\\\", handler!~\\\"commit|rollback|savepoint.*|prepare\\\"}[5m])\",\"legend\":\"{{handler}}\"}],\"name\":\"MySQL Handlers\",\"description\":\"**MySQL Handlers**\\n\\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\\n\\nThis is in fact the layer between the Storage Engine and MySQL.\\n\\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\\n* `read_key` is incremented when a read is done with an index.\\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":3},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_handlers_total{instance=~\\\"$instance\\\", handler=~\\\"commit|rollback|savepoint.*|prepare\\\"}[5m])\",\"legend\":\"{{handler}}\"}],\"name\":\"MySQL Transaction Handlers\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Open Files",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"mysql_global_variables_open_files_limit{instance=~\\\"$instance\\\"}\",\"legend\":\"Open Files Limit\"},{\"expr\":\"mysql_global_status_open_files{instance=~\\\"$instance\\\"}\",\"legend\":\"Open Files\"}],\"name\":\"MySQL Open Files\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Table Openings",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_table_open_cache_hits{instance=~\\\"$instance\\\"}[5m])\\n/\\n(\\nrate(mysql_global_status_table_open_cache_hits{instance=~\\\"$instance\\\"}[5m])\\n+\\nrate(mysql_global_status_table_open_cache_misses{instance=~\\\"$instance\\\"}[5m])\\n)\",\"legend\":\"Table Open Cache Hit Ratio\"}],\"name\":\"Table Open Cache Hit Ratio Mysql 5.6.6+\",\"description\":\"**MySQL Table Open Cache Status**\\n\\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\\n\\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"mysql_global_status_open_tables{instance=~\\\"$instance\\\"}\",\"legend\":\"Open Tables\"},{\"expr\":\"mysql_global_variables_table_open_cache{instance=~\\\"$instance\\\"}\",\"legend\":\"Table Open Cache\"}],\"name\":\"MySQL Open Tables\",\"description\":\"**MySQL Open Tables**\\n\\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\\n\\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
119
docker/n9eetc/dashboards/mysql_by_exporter.json
Normal file
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"name": "MySQL Overview - 模板",
|
||||
"tags": "Prometheus MySQL",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(mysql_global_status_uptime, instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"min(mysql_global_status_uptime{instance=~\\\"$instance\\\"})\"}],\"name\":\"MySQL Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":1800},\"result\":{\"color\":\"#ec7718\"}},{\"type\":\"range\",\"match\":{\"from\":1800},\"result\":{\"color\":\"#369603\"}}],\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_queries{instance=~\\\"$instance\\\"}[5m])\"}],\"name\":\"Current QPS\",\"description\":\"mysql_global_status_queries\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":100},\"result\":{\"color\":\"#05a31f\"}},{\"type\":\"range\",\"match\":{\"from\":100},\"result\":{\"color\":\"#ea3939\"}}],\"standardOptions\":{\"decimals\":2}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"avg(mysql_global_variables_innodb_buffer_pool_size{instance=~\\\"$instance\\\"})\"}],\"name\":\"InnoDB Buffer Pool\",\"description\":\"**InnoDB Buffer Pool Size**\\n\\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"bytesIEC\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(increase(mysql_global_status_table_locks_waited{instance=~\\\"$instance\\\"}[5m]))\"}],\"name\":\"Table Locks Waited(5min)\",\"description\":\"**Table Locks**\\n\\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\\n\\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":1},\"result\":{\"color\":\"#e70d0d\"}},{\"type\":\"range\",\"match\":{\"to\":1},\"result\":{\"color\":\"#53b503\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Connections",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(mysql_global_status_threads_connected{instance=~\\\"$instance\\\"})\",\"legend\":\"Connections\"},{\"expr\":\"sum(mysql_global_status_max_used_connections{instance=~\\\"$instance\\\"})\",\"legend\":\"Max Used Connections\"},{\"expr\":\"sum(mysql_global_variables_max_connections{instance=~\\\"$instance\\\"})\",\"legend\":\"Max Connections\"},{\"expr\":\"sum(rate(mysql_global_status_aborted_connects{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Aborted Connections\"}],\"name\":\"MySQL Connections\",\"description\":\"**Max Connections** \\n\\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\\n\\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\\n\\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\\n\\nConnections is the number of connection attempts (successful or not) to the MySQL server.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(mysql_global_status_threads_connected{instance=~\\\"$instance\\\"})\",\"legend\":\"Threads Connected\"},{\"expr\":\"sum(mysql_global_status_threads_running{instance=~\\\"$instance\\\"})\",\"legend\":\"Threads Running\"}],\"name\":\"MySQL Client Thread Activity\",\"description\":\"Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Query Performance",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_created_tmp_tables{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Tables\"},{\"expr\":\"sum(rate(mysql_global_status_created_tmp_disk_tables{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Disk Tables\"},{\"expr\":\"sum(rate(mysql_global_status_created_tmp_files{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Created Tmp Files\"}],\"name\":\"MySQL Temporary Objects\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.64,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_select_full_join{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Full Join\"},{\"expr\":\"sum(rate(mysql_global_status_select_full_range_join{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Full Range Join\"},{\"expr\":\"sum(rate(mysql_global_status_select_range{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Range\"},{\"expr\":\"sum(rate(mysql_global_status_select_range_check{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Range Check\"},{\"expr\":\"sum(rate(mysql_global_status_select_scan{ instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Select Scan\"}],\"name\":\"MySQL Select Types\",\"description\":\"**MySQL Select Types**\\n\\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\\n\\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"stack\":\"off\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.41},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_sort_rows{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Rows\"},{\"expr\":\"sum(rate(mysql_global_status_sort_range{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Range\"},{\"expr\":\"sum(rate(mysql_global_status_sort_merge_passes{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Merge Passes\"},{\"expr\":\"sum(rate(mysql_global_status_sort_scan{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Sort Scan\"}],\"name\":\"MySQL Sorts\",\"description\":\"**MySQL Sorts**\\n\\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\\n\\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_slow_queries{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Slow Queries\"}],\"name\":\"MySQL Slow Queries\",\"description\":\"**MySQL Slow Queries**\\n\\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"bars\",\"stack\":\"off\",\"fillOpacity\":0.81},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(mysql_global_status_bytes_received{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Inbound\"},{\"expr\":\"sum(rate(mysql_global_status_bytes_sent{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"Outbound\"}],\"name\":\"MySQL Network Traffic\",\"description\":\"**MySQL Network Traffic**\\n\\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\",\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Commands, Handlers",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"topk(10, rate(mysql_global_status_commands_total{instance=~\\\"$instance\\\"}[5m])>0)\",\"legend\":\"Com_{{command}}\"}],\"name\":\"Top Command Counters\",\"description\":\"**Top Command Counters**\\n\\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.2,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_handlers_total{instance=~\\\"$instance\\\", handler!~\\\"commit|rollback|savepoint.*|prepare\\\"}[5m])\",\"legend\":\"{{handler}}\"}],\"name\":\"MySQL Handlers\",\"description\":\"**MySQL Handlers**\\n\\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\\n\\nThis is in fact the layer between the Storage Engine and MySQL.\\n\\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\\n* `read_key` is incremented when a read is done with an index.\\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":3},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_handlers_total{instance=~\\\"$instance\\\", handler=~\\\"commit|rollback|savepoint.*|prepare\\\"}[5m])\",\"legend\":\"{{handler}}\"}],\"name\":\"MySQL Transaction Handlers\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Open Files",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"mysql_global_variables_open_files_limit{instance=~\\\"$instance\\\"}\",\"legend\":\"Open Files Limit\"},{\"expr\":\"mysql_global_status_innodb_num_open_files{instance=~\\\"$instance\\\"}\",\"legend\":\"InnoDB Open Files\"}],\"name\":\"MySQL Open Files\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Table Openings",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(mysql_global_status_table_open_cache_hits{instance=~\\\"$instance\\\"}[5m])\\n/\\n(\\nrate(mysql_global_status_table_open_cache_hits{instance=~\\\"$instance\\\"}[5m])\\n+\\nrate(mysql_global_status_table_open_cache_misses{instance=~\\\"$instance\\\"}[5m])\\n)\",\"legend\":\"Table Open Cache Hit Ratio\"}],\"name\":\"Table Open Cache Hit Ratio\",\"description\":\"**MySQL Table Open Cache Status**\\n\\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\\n\\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"mysql_global_status_open_tables{instance=~\\\"$instance\\\"}\",\"legend\":\"Open Tables\"},{\"expr\":\"mysql_global_variables_table_open_cache{instance=~\\\"$instance\\\"}\",\"legend\":\"Table Open Cache\"}],\"name\":\"MySQL Open Tables\",\"description\":\"**MySQL Open Tables**\\n\\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\\n\\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
19
docker/n9eetc/dashboards/net_response_by_categraf.json
Normal file
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"name": "TCP探测",
|
||||
"tags": "",
|
||||
"configs": "",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Default chart group",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(net_response_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(net_response_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"}],\"name\":\"Targets\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
127
docker/n9eetc/dashboards/oracle_by_categraf.json
Normal file
@@ -0,0 +1,127 @@
|
||||
[
|
||||
{
|
||||
"name": "Oracle - 模板",
|
||||
"tags": "Telegraf",
|
||||
"configs": "{\"var\":[{\"name\":\"ident\",\"definition\":\"label_values(oracle_up,ident)\",\"options\":[\"tt-fc-log00.nj\"]},{\"name\":\"instance\",\"definition\":\"label_values(oracle_up{ident=\\\"$ident\\\"},instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Activities",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(oracle_activity_execute_count_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}[2m])\"}],\"name\":\"execute count / second\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"decimals\":1}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(oracle_activity_user_commits_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}[2m])\"}],\"name\":\"user commits / second\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(oracle_activity_user_rollbacks_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}[2m])\"}],\"name\":\"user rollbacks / second\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_up{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"status\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":1},\"result\":{\"text\":\"UP\",\"color\":\"#5ea70f\"}},{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"DOWN\",\"color\":\"#f60f0f\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Waits",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_wait_time_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"legend\":\"{{wait_class}}\"}],\"name\":\"Time waited\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Tablespace",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_tablespace_bytes{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}/oracle_tablespace_max_bytes{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"legend\":\"{{tablespace}}\"}],\"name\":\"Used Percent\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_tablespace_free{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"legend\":\"{{tablespace}}\"}],\"name\":\"Free space\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "IO and TPS",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_io_requests_per_second_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"IO Requests / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_user_transaction_per_sec_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"TPS\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_io_megabytes_per_second_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}*1024*1024\"}],\"name\":\"IO Bytes / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Connections",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sessions_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\",status=\\\"ACTIVE\\\"}\",\"legend\":\"\"}],\"name\":\"Sessions\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Hit Ratio",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_buffer_cache_hit_ratio_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Buffer Cache Hit Ratio\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_redo_allocation_hit_ratio_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Redo Allocation Hit Ratio\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_row_cache_hit_ratio_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Row Cache Hit Ratio\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_library_cache_hit_ratio_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"}],\"name\":\"Library Cache Hit Ratio\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Physical Read Write",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_physical_read_bytes_per_sec_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"},{\"expr\":\"oracle_sysmetric_Physical_Write_Bytes_Per_Sec{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"refId\":\"B\"}],\"name\":\"Physical Read Write Bytes / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_physical_read_total_bytes_per_sec_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"},{\"expr\":\"oracle_sysmetric_Physical_Write_Total_Bytes_Per_Sec{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"refId\":\"B\"}],\"name\":\"Physical Read Write Total Bytes / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_physical_read_io_requests_per_sec_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"},{\"expr\":\"oracle_sysmetric_Physical_Write_IO_Requests_Per_Sec{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"refId\":\"B\"}],\"name\":\"Physical RW IO Requests / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"oracle_sysmetric_physical_read_total_io_requests_per_sec_value{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\"},{\"expr\":\"oracle_sysmetric_Physical_Write_Total_IO_Requests_Per_Sec{ident=\\\"$ident\\\", instance=\\\"$instance\\\"}\",\"refId\":\"B\"}],\"name\":\"Physical RW Total IO Requests / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
19
docker/n9eetc/dashboards/ping_by_categraf.json
Normal file
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"name": "PING探测",
|
||||
"tags": "",
|
||||
"configs": "",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Default chart group",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(ping_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(ping_percent_packet_loss) by (target)\",\"refId\":\"B\",\"legend\":\"Packet Loss %\"},{\"expr\":\"max(httpresponse_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"}],\"name\":\"Ping\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
153
docker/n9eetc/dashboards/process_by_exporter.json
Normal file
@@ -0,0 +1,153 @@
|
||||
[
|
||||
{
|
||||
"name": "Linux Process - 模板",
|
||||
"tags": "Prometheus Process",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(namedprocess_namegroup_num_procs, instance)\",\"multi\":false,\"options\":[\"tt-fc-es02.nj:12346\"]},{\"definition\":\"label_values(namedprocess_namegroup_cpu_seconds_total{instance=~\\\"$instance\\\"},groupname)\",\"name\":\"processes\",\"multi\":true,\"options\":[\"(sd-pam)\",\"NetworkManager\",\"YDLive\",\"YDPython\",\"YDService\",\"agent\",\"agetty\",\"atd\",\"auditd\",\"barad_agent\",\"bash\",\"chronyd\",\"crond\",\"dbus-daemon\",\"fc-agent\",\"fc-alert\",\"fc-checker\",\"gpg-agent\",\"less\",\"lsmd\",\"mongod\",\"mysql\",\"mysqld\",\"nginx\",\"ngo\",\"node\",\"openvpn\",\"podman pause\",\"polkitd\",\"process-agent\",\"redis-server\",\"rsyslogd\",\"sedispatch\",\"sgagent\",\"sh\",\"ssh-agent\",\"sshd\",\"sssd\",\"sssd_be\",\"sssd_nss\",\"su\",\"sudo\",\"systemd\",\"systemd-journal\",\"systemd-logind\",\"systemd-udevd\",\"tat_agent\",\"trace-agent\",\"tuned\",\"unbound-anchor\",\"vminsert-prod\",\"vmselect-prod\",\"vmstorage-prod\"],\"allOption\":true}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Cpu Usage",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(rate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"user\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) + ignoring(mode) rate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"system\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])) or (irate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"user\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) + ignoring(mode) irate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"system\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Total CPU cores used\",\"description\":\"进程占用CPU时间(用户态+内核态),倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5, rate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"system\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or ( irate(namedprocess_namegroup_cpu_seconds_total{mode=\\\"system\\\",groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by System CPU cores used\",\"description\":\"进程占用CPU时间(内核态),倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percentUnit\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Memory Usage",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( (avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"swapped\\\",instance=~\\\"$instance\\\"}[5m])+ ignoring (memtype) avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"resident\\\",instance=~\\\"$instance\\\"}[5m])) or (avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"swapped\\\",instance=~\\\"$instance\\\"}[5m])+ ignoring (memtype) avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"resident\\\",instance=~\\\"$instance\\\"}[5m])) ))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Used memory\",\"description\":\"进程常驻内存与交换空间平均占用容量之和,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5, (avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"resident\\\",instance=~\\\"$instance\\\"}[5m]) or avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"resident\\\",instance=~\\\"$instance\\\"}[5m]) ))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Resident Memory\",\"description\":\"进程常驻内存平均占用容量之和,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"swapped\\\",instance=~\\\"$instance\\\"}[5m]) or avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"swapped\\\",instance=~\\\"$instance\\\"}[5m]))) \",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Swapped Memory\",\"description\":\"进程交换内存平均占用容量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"virtual\\\",instance=~\\\"$instance\\\"}[5m]) or avg_over_time(namedprocess_namegroup_memory_bytes{groupname=~\\\"$processes\\\", memtype=\\\"virtual\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Virtual Memory\",\"description\":\"进程虚拟内存平均占用容量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Disk IO Usage",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(rate(namedprocess_namegroup_write_bytes_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or irate(namedprocess_namegroup_write_bytes_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Bytes Written\",\"description\":\"进程写数据量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(rate(namedprocess_namegroup_read_bytes_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or irate(namedprocess_namegroup_read_bytes_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Bytes Read\",\"description\":\"进程读数据量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesSI\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Process and Thread Counts",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(max_over_time(namedprocess_namegroup_num_procs{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or max_over_time(namedprocess_namegroup_num_procs{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by number of processes instances\",\"description\":\"同名进程数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(max_over_time(namedprocess_namegroup_num_threads{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or max_over_time(namedprocess_namegroup_num_threads{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by number of threads\",\"description\":\"进程内线程数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Context Switches",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( rate(namedprocess_namegroup_context_switches_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\",ctxswitchtype=\\\"voluntary\\\"}[5m]) or irate(namedprocess_namegroup_context_switches_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\",ctxswitchtype=\\\"voluntary\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top Processes by Voluntary Context Switches\",\"description\":\"进程自愿中断(如I/O完成)次数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( rate(namedprocess_namegroup_context_switches_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\",ctxswitchtype=\\\"nonvoluntary\\\"}[5m]) or irate(namedprocess_namegroup_context_switches_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\",ctxswitchtype=\\\"nonvoluntary\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top Processes by Non-Voluntary Context Switches\",\"description\":\"进程被迫中断(如CPU时间耗尽)次数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "File Descriptors",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,(max_over_time(namedprocess_namegroup_open_filedesc{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or max_over_time(namedprocess_namegroup_open_filedesc{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Open File Descriptors\",\"description\":\"打开文件数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( max_over_time(namedprocess_namegroup_worst_fd_ratio{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or max_over_time(namedprocess_namegroup_worst_fd_ratio{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) ))*100\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by File Descriptor Usage Percent\",\"description\":\"已打开文件数与允许打开文件数占比,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"percent\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Page Faults",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( rate(namedprocess_namegroup_major_page_faults_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or irate(namedprocess_namegroup_major_page_faults_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Major Page Faults\",\"description\":\"主要页缺失次数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( rate(namedprocess_namegroup_minor_page_faults_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m]) or irate(namedprocess_namegroup_minor_page_faults_total{groupname=~\\\"$processes\\\",instance=~\\\"$instance\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top processes by Minor Page Faults\",\"description\":\"次要页缺失次数,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Statuses",
|
||||
"weight": 7,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( max_over_time(namedprocess_namegroup_states{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\", state=\\\"Running\\\"}[5m]) or max_over_time(namedprocess_namegroup_states{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\", state=\\\"Running\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top running processes\",\"description\":\"运行态同名进程数量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,( max_over_time(namedprocess_namegroup_states{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\", state=\\\"Waiting\\\"}[5m]) or max_over_time(namedprocess_namegroup_states{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\", state=\\\"Waiting\\\"}[5m])))\",\"legend\":\"{{groupname}}\"}],\"name\":\"Top of processes waiting on IO\",\"description\":\"等待IO状态同名进程数量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Kernel Waits(WCHAN)",
|
||||
"weight": 8,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,sum(avg_over_time(namedprocess_namegroup_threads_wchan{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\"}[5m])) by (wchan) )\",\"legend\":\"{{wchan}}\"}],\"name\":\"Kernel waits for All\",\"description\":\"内核函数等待线程数量,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"topk(5,sum(avg_over_time(namedprocess_namegroup_threads_wchan{instance=~\\\"$instance\\\", groupname=~\\\"$processes\\\"}[5m])) by (wchan,groupname) )\",\"legend\":\"{{wchan}}\"}],\"name\":\"Kernel wait Details for All\",\"description\":\"内核函数等待线程数量按进程统计,倒排前5\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Uptime",
|
||||
"weight": 9,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"time()-(namedprocess_namegroup_oldest_start_time_seconds{instance=~\\\"$instance\\\",groupname=~\\\"$processes\\\"}>0)\",\"legend\":\"{{groupname}}\"}],\"name\":\"Processes by uptime\",\"description\":\"进程启动时长\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"seriesToRows\"},\"options\":{\"standardOptions\":{\"util\":\"seconds\"}},\"overrides\":[{\"properties\":{\"standardOptions\":{\"util\":\"seconds\"},\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":1800},\"result\":{\"color\":\"#f91010\"}},{\"type\":\"range\",\"match\":{\"from\":1800},\"result\":{\"color\":\"#21f312\"}}]}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
221
docker/n9eetc/dashboards/rabbitmq_by_categraf.json
Normal file
@@ -0,0 +1,221 @@
|
||||
[
|
||||
{
|
||||
"name": "RabbitMQ 3.8+",
|
||||
"tags": "",
|
||||
"configs": "{\"var\":[{\"definition\":\"label_values(rabbitmq_identity_info, rabbitmq_cluster)\",\"name\":\"rabbitmq_cluster\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Overview",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_queue_messages_ready * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Ready messages\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10000},\"result\":{\"color\":\"#4a90e2\"}},{\"type\":\"range\",\"match\":{\"from\":100000},\"result\":{\"color\":\"#f50a0a\"}},{\"type\":\"range\",\"match\":{\"to\":9999},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":7,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Incoming messages / s\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":50},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":5,\"x\":7,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_channels * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) - sum(rabbitmq_channel_consumers * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Publishers\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_connections * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Connections\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":16,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_queues * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Queues\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":20,\"y\":0,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_queue_messages_unacked * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Unacknowledged messages\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":99},\"result\":{\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"from\":100},\"result\":{\"color\":\"#4a90e2\"}},{\"type\":\"range\",\"match\":{\"from\":500},\"result\":{\"color\":\"#d0021b\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":7,\"x\":0,\"y\":1,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_redelivered_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) +\\nsum(rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) +\\nsum(rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) +\\nsum(rate(rabbitmq_channel_get_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) +\\nsum(rate(rabbitmq_channel_get_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Outgoing messages / s\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":50},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":5,\"x\":7,\"y\":1,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_channel_consumers * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Consumers\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":12,\"y\":1,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_channels * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Channels\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"from\":10},\"result\":{\"color\":\"#417505\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":16,\"y\":1,\"i\":\"8\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_build_info * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Nodes\",\"custom\":{\"textMode\":\"valueAndName\",\"colorMode\":\"background\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":null,\"from\":3},\"result\":{\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"from\":8},\"result\":{\"color\":\"#e70909\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":4,\"x\":20,\"y\":1,\"i\":\"9\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Nodes",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rabbitmq_build_info * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}\"}],\"name\":\"nodes\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelsOfSeriesToRows\",\"columns\":[\"rabbitmq_cluster\",\"rabbitmq_node\",\"rabbitmq_version\",\"erlang_version\"]},\"options\":{\"standardOptions\":{}},\"overrides\":[{}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":1,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"(rabbitmq_resident_memory_limit_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) -\\n(rabbitmq_process_resident_memory_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"Memory available before publishers blocked\",\"description\":\"If the value is zero or less, the memory alarm will be triggered and all publishing connections across all cluster nodes will be blocked.\\n\\nThis value can temporarily go negative because the memory alarm is triggered with a slight delay.\\n\\nThe kernel's view of the amount of memory used by the node can differ from what the node itself can observe. This means that this value can be negative for a sustained period of time.\\n\\nBy default nodes use resident set size (RSS) to compute how much memory they use. This strategy can be changed (see the guides below).\\n\\n* [Alarms](https://www.rabbitmq.com/alarms.html)\\n* [Memory Alarms](https://www.rabbitmq.com/memory.html)\\n* [Reasoning About Memory Use](https://www.rabbitmq.com/memory-use.html)\\n* [Blocked Connection Notifications](https://www.rabbitmq.com/connection-blocked.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":1,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rabbitmq_disk_space_available_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}\"}],\"name\":\"Disk space available before publishers blocked\",\"description\":\"This metric is reported for the partition where the RabbitMQ data directory is stored.\\n\\nIf the value is zero or less, the disk alarm will be triggered and all publishing connections across all cluster nodes will be blocked.\\n\\nThis value can temporarily go negative because the free disk space alarm is triggered with a slight delay.\\n\\n* [Alarms](https://www.rabbitmq.com/alarms.html)\\n* [Disk Space Alarms](https://www.rabbitmq.com/disk-alarms.html)\\n* [Disk Space](https://www.rabbitmq.com/production-checklist.html#resource-limits-disk-space)\\n* [Persistence Configuration](https://www.rabbitmq.com/persistence-conf.html)\\n* [Blocked Connection Notifications](https://www.rabbitmq.com/connection-blocked.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":1,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"(rabbitmq_process_max_fds * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) -\\n(rabbitmq_process_open_fds * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"File descriptors available\",\"description\":\"When this value reaches zero, new connections will not be accepted and disk write operations may fail.\\n\\nClient libraries, peer nodes and CLI tools will not be able to connect when the node runs out of available file descriptors.\\n\\n* [Open File Handles Limit](https://www.rabbitmq.com/production-checklist.html#resource-limits-file-handle-limit)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":8,\"x\":16,\"y\":1,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"(rabbitmq_process_max_tcp_sockets * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) -\\n(rabbitmq_process_open_tcp_sockets * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\"}],\"name\":\"TCP sockets available\",\"description\":\"When this value reaches zero, new connections will not be accepted.\\n\\nClient libraries, peer nodes and CLI tools will not be able to connect when the node runs out of available file descriptors.\\n\\n* [Networking and RabbitMQ](https://www.rabbitmq.com/networking.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":8,\"x\":16,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "QUEUED MESSAGES",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_queue_messages_ready * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages ready to be delivered to consumers\",\"description\":\"Total number of ready messages ready to be delivered to consumers.\\n\\nAim to keep this value as low as possible. RabbitMQ behaves best when messages are flowing through it. It's OK for publishers to occasionally outpace consumers, but the expectation is that consumers will eventually process all ready messages.\\n\\nIf this metric keeps increasing, your system will eventually run out of memory and/or disk space. Consider using TTL or Queue Length Limit to prevent unbounded message growth.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\\n* [Queue Length Limit](https://www.rabbitmq.com/maxlength.html)\\n* [Time-To-Live and Expiration](https://www.rabbitmq.com/ttl.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rabbitmq_queue_messages_unacked * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages pending consumer acknowledgement\",\"description\":\"The total number of messages that are either in-flight to consumers, currently being processed by consumers or simply waiting for the consumer acknowledgements to be processed by the queue. Until the queue processes the message acknowledgement, the message will remain unacknowledged.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\\n* [Confirms and Acknowledgements](https://www.rabbitmq.com/confirms.html)\\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "INCOMING MESSAGES",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages published / s\",\"description\":\"The incoming message rate before any routing rules are applied.\\n\\nIf this value is lower than the number of messages published to queues, it may indicate that some messages are delivered to more than one queue.\\n\\nIf this value is higher than the number of messages published to queues, messages cannot be routed and will either be dropped or returned to publishers.\\n\\n* [Publishers](https://www.rabbitmq.com/publishers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_confirmed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages confirmed to publishers / s\",\"description\":\"The rate of messages confirmed by the broker to publishers. Publishers must opt-in to receive message confirmations.\\n\\nIf this metric is consistently at zero it may suggest that publisher confirms are not used by clients. The safety of published messages is likely to be at risk.\\n\\n* [Publisher Confirms](https://www.rabbitmq.com/confirms.html#publisher-confirms)\\n* [Publisher Confirms and Data Safety](https://www.rabbitmq.com/publishers.html#data-safety)\\n* [When Will Published Messages Be Confirmed by the Broker?](https://www.rabbitmq.com/confirms.html#when-publishes-are-confirmed)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_queue_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages routed to queues / s\",\"description\":\"The rate of messages received from publishers and successfully routed to the master queue replicas.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\\n* [Publishers](https://www.rabbitmq.com/publishers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":1,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_unconfirmed[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages unconfirmed to publishers / s\",\"description\":\"The rate of messages received from publishers that have publisher confirms enabled and the broker has not confirmed yet.\\n\\n* [Publishers](https://www.rabbitmq.com/publishers.html)\\n* [Confirms and Acknowledgements](https://www.rabbitmq.com/confirms.html)\\n* [When Will Published Messages Be Confirmed by the Broker?](https://www.rabbitmq.com/confirms.html#when-publishes-are-confirmed)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":1,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_unroutable_dropped_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Unroutable messages dropped / s\",\"description\":\"The rate of messages that cannot be routed and are dropped. \\n\\nAny value above zero means message loss and likely suggests a routing problem on the publisher end.\\n\\n* [Unroutable Message Handling](https://www.rabbitmq.com/publishers.html#unroutable)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_unroutable_returned_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Unroutable messages returned to publishers / s\",\"description\":\"The rate of messages that cannot be routed and are returned back to publishers.\\n\\nSustained values above zero may indicate a routing problem on the publisher end.\\n\\n* [Unroutable Message Handling](https://www.rabbitmq.com/publishers.html#unroutable)\\n* [When Will Published Messages Be Confirmed by the Broker?](https://www.rabbitmq.com/confirms.html#when-publishes-are-confirmed)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OUTGOING MESSAGES",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(\\n (rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) +\\n (rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"})\\n) by(rabbitmq_node)\"}],\"name\":\"Messages delivered / s\",\"description\":\"The rate of messages delivered to consumers. It includes messages that have been redelivered.\\n\\nThis metric does not include messages that have been fetched by consumers using `basic.get` (consumed by polling).\\n\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_redelivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages redelivered / s\",\"description\":\"The rate of messages that have been redelivered to consumers. It includes messages that have been requeued automatically and redelivered due to channel exceptions or connection closures.\\n\\nHaving some redeliveries is expected, but if this metric is consistently non-zero, it is worth investigating why.\\n\\n* [Negative Acknowledgement and Requeuing of Deliveries](https://www.rabbitmq.com/confirms.html#consumer-nacks-requeue)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages delivered with manual ack / s\",\"description\":\"The rate of message deliveries to consumers that use manual acknowledgement mode.\\n\\nWhen this mode is used, RabbitMQ waits for consumers to acknowledge messages before more messages can be delivered.\\n\\nThis is the safest way of consuming messages.\\n\\n* [Consumer Acknowledgements](https://www.rabbitmq.com/confirms.html)\\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)\\n* [Consumer Acknowledgement Modes, Prefetch and Throughput](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":1,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages delivered auto ack / s\",\"description\":\"The rate of message deliveries to consumers that use automatic acknowledgement mode.\\n\\nWhen this mode is used, RabbitMQ does not wait for consumers to acknowledge message deliveries.\\n\\nThis mode is fire-and-forget and does not offer any delivery safety guarantees. It tends to provide higher throughput and it may lead to consumer overload and higher consumer memory usage.\\n\\n* [Consumer Acknowledgement Modes, Prefetch and Throughput](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":1,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_messages_acked_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Messages acknowledged / s\",\"description\":\"The rate of message acknowledgements coming from consumers that use manual acknowledgement mode.\\n\\n* [Consumer Acknowledgements](https://www.rabbitmq.com/confirms.html)\\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)\\n* [Consumer Acknowledgement Modes, Prefetch and Throughput](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":2,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_get_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Polling operations with auto ack / s\",\"description\":\"The rate of messages delivered to polling consumers that use automatic acknowledgement mode.\\n\\nThe use of polling consumers is highly inefficient and therefore strongly discouraged.\\n\\n* [Fetching individual messages](https://www.rabbitmq.com/consumers.html#fetching)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":2,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_get_empty_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Polling operations that yield no result / s\",\"description\":\"The rate of polling consumer operations that yield no result.\\n\\nAny value above zero means that RabbitMQ resources are wasted by polling consumers.\\n\\nCompare this metric to the other polling consumer metrics to see the inefficiency rate.\\n\\nThe use of polling consumers is highly inefficient and therefore strongly discouraged.\\n\\n* [Fetching individual messages](https://www.rabbitmq.com/consumers.html#fetching)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":3,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channel_get_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Polling operations with manual ack / s\",\"description\":\"The rate of messages delivered to polling consumers that use manual acknowledgement mode.\\n\\nThe use of polling consumers is highly inefficient and therefore strongly discouraged.\\n\\n* [Fetching individual messages](https://www.rabbitmq.com/consumers.html#fetching)\\n* [Consumers](https://www.rabbitmq.com/consumers.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":12,\"y\":3,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "QUEUES",
|
||||
"weight": 5,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rabbitmq_queues * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}\"}],\"name\":\"Total queues\",\"description\":\"Total number of queue masters per node. \\n\\nThis metric makes it easy to see sub-optimal queue distribution in a cluster.\\n\\n* [Queue Masters, Data Locality](https://www.rabbitmq.com/ha.html#master-migration-data-locality)\\n* [Queues](https://www.rabbitmq.com/queues.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_queues_declared_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Queues declared / s\",\"description\":\"The rate of queue declarations performed by clients.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of queue churn or high rates of connection recovery. Confirm connection recovery rates by using the _Connections opened_ metric.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":4,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_queues_created_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Queues created / s\",\"description\":\"The rate of new queues created (as opposed to redeclarations).\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of queue churn or high rates of connection recovery. Confirm connection recovery rates by using the _Connections opened_ metric.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":4,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_queues_deleted_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Queues deleted / s\",\"description\":\"The rate of queues deleted.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of queue churn or high rates of connection recovery. Confirm connection recovery rates by using the _Connections opened_ metric.\\n\\n* [Queues](https://www.rabbitmq.com/queues.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":4,\"x\":20,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CHANNELS",
|
||||
"weight": 6,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rabbitmq_channels * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}\"}],\"name\":\"Total channels\",\"description\":\"Total number of channels on all currently opened connections.\\n\\nIf this metric grows monotonically it is highly likely a channel leak in one of the applications. Confirm channel leaks by using the _Channels opened_ and _Channels closed_ metrics.\\n\\n* [Channel Leak](https://www.rabbitmq.com/channels.html#channel-leaks)\\n* [Channels](https://www.rabbitmq.com/channels.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channels_opened_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Channels opened / s\",\"description\":\"The rate of new channels opened by applications across all connections. Channels are expected to be long-lived.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of channel churn or mass connection recovery. Confirm connection recovery rates by using the _Connections opened_ metric.\\n\\n* [High Channel Churn](https://www.rabbitmq.com/channels.html#high-channel-churn)\\n* [Channels](https://www.rabbitmq.com/channels.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_channels_closed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Channels closed / s\",\"description\":\"The rate of channels closed by applications across all connections. Channels are expected to be long-lived.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of channel churn or mass connection recovery. Confirm connection recovery rates by using the _Connections opened_ metric.\\n\\n* [High Channel Churn](https://www.rabbitmq.com/channels.html#high-channel-churn)\\n* [Channels](https://www.rabbitmq.com/channels.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CONNECTIONS",
|
||||
"weight": 7,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_connections_closed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Connections closed / s\",\"description\":\"The rate of connections closed. Connections are expected to be long-lived.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of connection churn or mass connection recovery.\\n\\n* [Connections](https://www.rabbitmq.com/connections.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rabbitmq_connections * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}\"}],\"name\":\"Total connections\",\"description\":\"Total number of client connections.\\n\\nIf this metric grows monotonically it is highly likely a connection leak in one of the applications. Confirm connection leaks by using the _Connections opened_ and _Connections closed_ metrics.\\n\\n* [Connection Leak](https://www.rabbitmq.com/connections.html#monitoring)\\n* [Connections](https://www.rabbitmq.com/connections.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(rabbitmq_connections_opened_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\\\"$rabbitmq_cluster\\\"}) by(rabbitmq_node)\"}],\"name\":\"Connections opened / s\",\"description\":\"The rate of new connections opened by clients. Connections are expected to be long-lived.\\n\\nLow sustained values above zero are to be expected. High rates may be indicative of connection churn or mass connection recovery.\\n\\n* [Connection Leak](https://www.rabbitmq.com/connections.html#monitoring)\\n* [Connections](https://www.rabbitmq.com/connections.html)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
77
docker/n9eetc/dashboards/redis_by_categraf.json
Normal file
@@ -0,0 +1,77 @@
|
||||
[
|
||||
{
|
||||
"name": "Redis Overview - 模板",
|
||||
"tags": "Redis Prometheus",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(redis_uptime_in_seconds,instance)\",\"selected\":\"10.206.0.16:6379\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"min(redis_uptime_in_seconds{instance=~\\\"$instance\\\"})\"}],\"name\":\"Redis Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(redis_connected_clients{instance=~\\\"$instance\\\"})\"}],\"name\":\"Connected Clients\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"redis_used_memory{instance=~\\\"$instance\\\"}\"}],\"name\":\"Memory Used\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":128000000},\"result\":{\"color\":\"#079e05\"}},{\"type\":\"range\",\"match\":{\"from\":128000000},\"result\":{\"color\":\"#f10909\"}}],\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":0}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"redis_maxmemory{instance=~\\\"$instance\\\"}\"}],\"name\":\"Max Memory Limit\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"bytesIEC\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Commands",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(redis_total_commands_processed{instance=~\\\"$instance\\\"}[5m])\"}],\"name\":\"Commands Executed / sec\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(redis_keyspace_hits{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"hits\"},{\"expr\":\"irate(redis_keyspace_misses{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"misses\"}],\"name\":\"Hits / Misses per Sec\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"noraml\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"topk(5, irate(redis_cmdstat_calls{instance=~\\\"$instance\\\"} [1m]))\",\"legend\":\"{{command}}\"}],\"name\":\"Top Commands\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Keys",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum (redis_keyspace_keys{instance=~\\\"$instance\\\"}) by (db)\",\"legend\":\"{{db}}\"}],\"name\":\"Total Items per DB\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(redis_expired_keys{instance=~\\\"$instance\\\"}[5m])) by (instance)\",\"legend\":\"expired\"},{\"expr\":\"sum(rate(redis_evicted_keys{instance=~\\\"$instance\\\"}[5m])) by (instance)\",\"legend\":\"evicted\"}],\"name\":\"Expired / Evicted\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(redis_keyspace_keys{instance=~\\\"$instance\\\"}) - sum(redis_keyspace_expires{instance=~\\\"$instance\\\"}) \",\"legend\":\"not expiring\"},{\"expr\":\"sum(redis_keyspace_expires{instance=~\\\"$instance\\\"}) \",\"legend\":\"expiring\"}],\"name\":\"Expiring vs Not-Expiring Keys\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"noraml\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(redis_total_net_input_bytes{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"input\"},{\"expr\":\"sum(rate(redis_total_net_output_bytes{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"output\"}],\"name\":\"Network I/O\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
77
docker/n9eetc/dashboards/redis_by_exporter.json
Normal file
@@ -0,0 +1,77 @@
|
||||
[
|
||||
{
|
||||
"name": "Redis Overview - 模板",
|
||||
"tags": "Redis Prometheus",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(redis_uptime_in_seconds,instance)\",\"selected\":\"10.206.0.16:6379\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"min(redis_uptime_in_seconds{instance=~\\\"$instance\\\"})\"}],\"name\":\"Redis Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(redis_connected_clients{instance=~\\\"$instance\\\"})\"}],\"name\":\"Connected Clients\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"redis_memory_used_bytes{instance=~\\\"$instance\\\"}\"}],\"name\":\"Memory Used\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":128000000},\"result\":{\"color\":\"#079e05\"}},{\"type\":\"range\",\"match\":{\"from\":128000000},\"result\":{\"color\":\"#f10909\"}}],\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":0}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"redis_memory_max_bytes{instance=~\\\"$instance\\\"}\"}],\"name\":\"Max Memory Limit\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"bytesIEC\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Commands",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"rate(redis_commands_processed_total{instance=~\\\"$instance\\\"}[5m])\"}],\"name\":\"Commands Executed / sec\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(redis_keyspace_hits_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"hits\"},{\"expr\":\"irate(redis_keyspace_misses_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"misses\"}],\"name\":\"Hits / Misses per Sec\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"noraml\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"topk(5, irate(redis_commands_total{instance=~\\\"$instance\\\"} [1m]))\",\"legend\":\"{{cmd}}\"}],\"name\":\"Top Commands\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Keys",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum (redis_db_keys{instance=~\\\"$instance\\\"}) by (db)\",\"legend\":\"{{db}}\"}],\"name\":\"Total Items per DB\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(redis_expired_keys_total{instance=~\\\"$instance\\\"}[5m])) by (instance)\",\"legend\":\"expired\"},{\"expr\":\"sum(rate(redis_evicted_keys_total{instance=~\\\"$instance\\\"}[5m])) by (instance)\",\"legend\":\"evicted\"}],\"name\":\"Expired / Evicted\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(redis_db_keys{instance=~\\\"$instance\\\"}) - sum(redis_db_keys_expiring{instance=~\\\"$instance\\\"}) \",\"legend\":\"not expiring\"},{\"expr\":\"sum(redis_db_keys_expiring{instance=~\\\"$instance\\\"}) \",\"legend\":\"expiring\"}],\"name\":\"Expiring vs Not-Expiring Keys\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"noraml\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"sum(rate(redis_net_input_bytes_total{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"input\"},{\"expr\":\"sum(rate(redis_net_output_bytes_total{instance=~\\\"$instance\\\"}[5m]))\",\"legend\":\"output\"}],\"name\":\"Network I/O\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
63
docker/n9eetc/dashboards/tomcat_by_categraf.json
Normal file
@@ -0,0 +1,63 @@
|
||||
[
|
||||
{
|
||||
"name": "Tomcat - 模板",
|
||||
"tags": "Categraf",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(tomcat_up, instance)\"}],\"links\":[{\"title\":\"n9e\",\"url\":\"https://n9e.gitee.io/\",\"targetBlank\":true}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "connector",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(tomcat_connector_bytes_sent{instance=\\\"$instance\\\"}[1m])\",\"legend\":\"sent\"},{\"expr\":\"rate(tomcat_connector_bytes_received{instance=\\\"$instance\\\"}[1m])\",\"refId\":\"B\",\"legend\":\"received\"}],\"name\":\"Traffic Bytes / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\"},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(tomcat_connector_request_count{instance=\\\"$instance\\\"}[1m])\",\"legend\":\"tomcat_connector_request_count\"},{\"expr\":\"rate(tomcat_connector_error_count{instance=\\\"$instance\\\"}[1m])\",\"refId\":\"B\",\"legend\":\"tomcat_connector_error_count\"}],\"name\":\"Request count / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_connector_max_threads{instance=\\\"$instance\\\"}\",\"legend\":\"max_threads\"},{\"expr\":\"tomcat_connector_current_thread_count{instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"current_thread_count\"},{\"expr\":\"tomcat_connector_current_threads_busy{instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"current_threads_busy\"}],\"name\":\"Tread\",\"description\":\"max_threads: The maximum number of allowed worker threads.\\ncurrent_thread_count: The number of threads managed by the thread pool\\ncurrent_threads_busy: The number of threads that are in use\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":2,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(tomcat_connector_processing_time{instance=\\\"$instance\\\"}[1m])\",\"legend\":\"{{name}}-processing_time\"}],\"name\":\"Processing time\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":2,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mem used",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_jvm_memory_max{instance=\\\"$instance\\\"}\",\"legend\":\"max\"},{\"expr\":\"tomcat_jvm_memory_total{instance=\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"used\"},{\"expr\":\"tomcat_jvm_memory_free{instance=\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"free\"}],\"name\":\"Mem Used\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "memorypool",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_jvm_memorypool_used{instance=\\\"$instance\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Used\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_jvm_memorypool_max{instance=\\\"$instance\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Max\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_jvm_memorypool_committed{instance=\\\"$instance\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Committed\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"tomcat_jvm_memorypool_init{instance=\\\"$instance\\\"}\",\"legend\":\"{{name}}\"}],\"name\":\"Init\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
99
docker/n9eetc/dashboards/windows_by_exporter.json
Normal file
@@ -0,0 +1,99 @@
|
||||
[
|
||||
{
|
||||
"name": "Windows - 模板",
|
||||
"tags": "Windows Prometheus",
|
||||
"configs": "{\"var\":[{\"name\":\"instance\",\"definition\":\"label_values(windows_system_system_up_time, instance)\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "Basic Info",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"time() - windows_system_system_up_time{instance=~\\\"$instance\\\"}\",\"legend\":\"\"}],\"name\":\"Uptime\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"windows_cs_logical_processors{instance=~\\\"$instance\\\"}\",\"legend\":\"\"}],\"name\":\"CPU Core Total\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"windows_cs_physical_memory_bytes{instance=~\\\"$instance\\\"}\"}],\"name\":\"Memory Total\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":0}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"windows_os_processes{instance=~\\\"$instance\\\"}\"}],\"name\":\"Process Total\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{}},\"options\":{\"valueMappings\":[{\"type\":\"range\",\"match\":{\"to\":100},\"result\":{\"color\":\"#109d06\"}},{\"type\":\"range\",\"match\":{\"from\":100},\"result\":{\"color\":\"#d11010\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CPU Memory Disk",
|
||||
"weight": 1,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"100 * sum by (instance) (rate(windows_cpu_time_total{mode != 'idle'}[5m])) / count by (instance) (windows_cpu_core_frequency_mhz) \",\"legend\":\"CPU Util\"}],\"name\":\"Cpu Util\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"100 - (windows_os_physical_memory_free_bytes{instance=~\\\"$instance\\\"} / windows_cs_physical_memory_bytes{instance=~\\\"$instance\\\"})*100\"}],\"name\":\"Memory Util\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{\"steps\":[{\"value\":70,\"color\":\"#e71313\"}]}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"100 - (windows_logical_disk_free_bytes{instance=~\\\"$instance\\\"} / windows_logical_disk_size_bytes{instance=~\\\"$instance\\\"})*100\",\"legend\":\"{{volume}}\"}],\"name\":\"Disk Util\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"windows_logical_disk_free_bytes{instance=~\\\"$instance\\\"}\",\"legend\":\"{{volume}} Free\"},{\"expr\":\"windows_logical_disk_size_bytes{instance=~\\\"$instance\\\"}\",\"legend\":\"{{volume}} Total\"}],\"name\":\"Disk Free\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":0},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Disk IO",
|
||||
"weight": 2,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(windows_logical_disk_read_bytes_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"{{volume}} Read\"},{\"expr\":\"irate(windows_logical_disk_write_bytes_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"{{volume}} Write\"}],\"name\":\"Read/Write Bytes / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bytesIEC\",\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(windows_logical_disk_reads_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"{{volume}} Read\"},{\"expr\":\"irate(windows_logical_disk_writes_total{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"{{volume}} Write\"}],\"name\":\"Read/Write / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":2},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Network",
|
||||
"weight": 3,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(windows_net_bytes_sent_total{instance=~\\\"$instance\\\",nic!~'isatap.*|VPN.*'}[5m])*8\",\"legend\":\"{{nic}} Sent\"},{\"expr\":\"irate(windows_net_bytes_received_total{instance=~\\\"$instance\\\",nic!~'isatap.*|VPN.*'}[5m])*8\",\"legend\":\"{{nic}} Received\"}],\"name\":\"Sent/Received bits / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"util\":\"bitsIEC\",\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"(irate(windows_net_bytes_total{instance=~\\\"$instance\\\",nic!~'isatap.*|VPN.*'}[5m]) * 8 / windows_net_current_bandwidth{instance=~\\\"$instance\\\",nic!~'isatap.*|VPN.*'}) * 100\"}],\"name\":\"Network Util\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{\"decimals\":1},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":8,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(windows_net_packets_outbound_discarded{instance=~\\\"$instance\\\", nic!~'isatap.*|VPN.*'}[5m]) + irate(windows_net_packets_outbound_errors{instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"outbound\"},{\"expr\":\"irate(windows_net_packets_received_discarded{job=~\\\"$job\\\",instance=~\\\"$instance\\\", nic!~'isatap.*|VPN.*'}[5m]) + irate(windows_net_packets_received_errors{job=~\\\"$job\\\",instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"received\"}],\"name\":\"Packets / Second\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":8,\"x\":16,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "System",
|
||||
"weight": 4,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"windows_system_threads{instance=~\\\"$instance\\\"}\"}],\"name\":\"System Threads\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"expr\":\"irate(windows_system_exception_dispatches_total{instance=~\\\"$instance\\\"}[5m])\"}],\"name\":\"System exception dispatches\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"desc\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
55
docker/n9eetc/dashboards/zookeeper_by_exporter.json
Normal file
@@ -0,0 +1,55 @@
|
||||
[
|
||||
{
|
||||
"name": "Zookeeper - 模板",
|
||||
"tags": "",
|
||||
"configs": "{\"var\":[{\"name\":\"job\",\"definition\":\"label_values(zk_up,job)\"},{\"definition\":\"label_values(zk_up,instance)\",\"name\":\"instance\"}]}",
|
||||
"chart_groups": [
|
||||
{
|
||||
"name": "overview",
|
||||
"weight": 0,
|
||||
"charts": [
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_up{job=\\\"$job\\\", instance=\\\"$instance\\\"}\",\"legend\":\"up\"}],\"name\":\"up\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":40}},\"options\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":1},\"result\":{\"color\":\"#3d950e\",\"text\":\"UP\"}},{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"color\":\"#f01414\",\"text\":\"DOWN\"}}],\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":0,\"y\":0,\"i\":\"0\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_znode_count{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}\"}],\"name\":\"zk_znode_count\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":6,\"y\":0,\"i\":\"1\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_watch_count{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}\"}],\"name\":\"zk_watch_count\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":12,\"y\":0,\"i\":\"2\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_ephemerals_count{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"zk_ephemerals_count\"}],\"name\":\"zk_ephemerals_count\",\"custom\":{\"textMode\":\"value\",\"colorMode\":\"value\",\"calc\":\"lastNotNull\",\"colSpan\":1,\"textSize\":{\"value\":50}},\"options\":{\"standardOptions\":{}},\"version\":\"2.0.0\",\"type\":\"stat\",\"layout\":{\"h\":1,\"w\":6,\"x\":18,\"y\":0,\"i\":\"3\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"rate(zk_packets_sent{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}[5m])\",\"legend\":\"{{instance}}-sent\"},{\"expr\":\"rate(zk_packets_received{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}[5m])\",\"refId\":\"B\",\"legend\":\"{{instance}}-received\"}],\"name\":\"Pakages\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":0,\"y\":1,\"i\":\"4\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_num_alive_connections{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}\"}],\"name\":\"alive_connections\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":6,\"y\":3,\"i\":\"5\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_open_file_descriptor_count{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}-open\"},{\"expr\":\"zk_max_file_descriptor_count{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"{{instance}}-max\"}],\"name\":\"file_descriptor\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":12,\"y\":3,\"i\":\"6\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_avg_latency{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}-avg\"},{\"expr\":\"zk_min_latency{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"refId\":\"B\",\"legend\":\"{{instance}}-min\"},{\"expr\":\"zk_max_latency{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"refId\":\"C\",\"legend\":\"{{instance}}-max\"}],\"name\":\"latency(ms)\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":18,\"y\":3,\"i\":\"7\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_outstanding_requests{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}\"}],\"name\":\"outstanding_requests\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":6,\"x\":0,\"y\":3,\"i\":\"8\"}}",
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"zk_approximate_data_size{job=~\\\"$job\\\", instance=~\\\"$instance\\\"}\",\"legend\":\"{{instance}}\"}],\"name\":\"approximate_data_size\",\"options\":{\"tooltip\":{\"mode\":\"all\",\"sort\":\"none\"},\"legend\":{\"displayMode\":\"hidden\"},\"standardOptions\":{},\"thresholds\":{}},\"custom\":{\"drawStyle\":\"lines\",\"lineInterpolation\":\"smooth\",\"fillOpacity\":0.5,\"stack\":\"off\"},\"version\":\"2.0.0\",\"type\":\"timeseries\",\"layout\":{\"h\":2,\"w\":12,\"x\":12,\"y\":1,\"i\":\"9\"}}",
|
||||
"weight": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
494
docker/n9eetc/metrics.yaml
Normal file
@@ -0,0 +1,494 @@
|
||||
cpu_usage_idle: CPU空闲率(单位:%)
|
||||
cpu_usage_active: CPU使用率(单位:%)
|
||||
cpu_usage_system: CPU内核态时间占比(单位:%)
|
||||
cpu_usage_user: CPU用户态时间占比(单位:%)
|
||||
cpu_usage_nice: 低优先级用户态CPU时间占比,也就是进程nice值被调整为1-19之间的CPU时间。这里注意,nice可取值范围是-20到19,数值越大,优先级反而越低(单位:%)
|
||||
cpu_usage_iowait: CPU等待I/O的时间占比(单位:%)
|
||||
cpu_usage_irq: CPU处理硬中断的时间占比(单位:%)
|
||||
cpu_usage_softirq: CPU处理软中断的时间占比(单位:%)
|
||||
cpu_usage_steal: 在虚拟机环境下有该指标,表示CPU被其他虚拟机争用的时间占比,超过20就表示争抢严重(单位:%)
|
||||
cpu_usage_guest: 通过虚拟化运行其他操作系统的时间,也就是运行虚拟机的CPU时间占比(单位:%)
|
||||
cpu_usage_guest_nice: 以低优先级运行虚拟机的时间占比(单位:%)
|
||||
|
||||
disk_free: 硬盘分区剩余量(单位:byte)
|
||||
disk_used: 硬盘分区使用量(单位:byte)
|
||||
disk_used_percent: 硬盘分区使用率(单位:%)
|
||||
disk_total: 硬盘分区总量(单位:byte)
|
||||
disk_inodes_free: 硬盘分区inode剩余量
|
||||
disk_inodes_used: 硬盘分区inode使用量
|
||||
disk_inodes_total: 硬盘分区inode总量
|
||||
|
||||
diskio_io_time: 从设备视角来看I/O请求总时间,队列中有I/O请求就计数(单位:毫秒),counter类型,需要用函数求rate才有使用价值
|
||||
diskio_iops_in_progress: 已经分配给设备驱动且尚未完成的IO请求,不包含在队列中但尚未分配给设备驱动的IO请求,gauge类型
|
||||
diskio_merged_reads: 相邻读请求merge读的次数,counter类型
|
||||
diskio_merged_writes: 相邻写请求merge写的次数,counter类型
|
||||
diskio_read_bytes: 读取的byte数量,counter类型,需要用函数求rate才有使用价值
|
||||
diskio_read_time: 读请求总时间(单位:毫秒),counter类型,需要用函数求rate才有使用价值
|
||||
diskio_reads: 读请求次数,counter类型,需要用函数求rate才有使用价值
|
||||
diskio_weighted_io_time: 从I/O请求视角来看I/O等待总时间,如果同时有多个I/O请求,时间会叠加(单位:毫秒)
|
||||
diskio_write_bytes: 写入的byte数量,counter类型,需要用函数求rate才有使用价值
|
||||
diskio_write_time: 写请求总时间(单位:毫秒),counter类型,需要用函数求rate才有使用价值
|
||||
diskio_writes: 写请求次数,counter类型,需要用函数求rate才有使用价值
|
||||
|
||||
kernel_boot_time: 内核启动时间
|
||||
kernel_context_switches: 内核上下文切换次数
|
||||
kernel_entropy_avail: linux系统内部的熵池
|
||||
kernel_interrupts: 内核中断次数
|
||||
kernel_processes_forked: fork的进程数
|
||||
|
||||
mem_active: 活跃使用的内存总数(包括cache和buffer内存)
|
||||
mem_available: 应用程序可用内存数
|
||||
mem_available_percent: 内存剩余百分比(0~100)
|
||||
mem_buffered: 用来给文件做缓冲大小
|
||||
mem_cached: 被高速缓冲存储器(cache memory)用的内存的大小(等于 diskcache minus SwapCache )
|
||||
mem_commit_limit: 根据超额分配比率('vm.overcommit_ratio'),这是当前在系统上分配可用的内存总量,这个限制只是在模式2('vm.overcommit_memory')时启用
|
||||
mem_committed_as: 目前在系统上分配的内存量。是所有进程申请的内存的总和
|
||||
mem_dirty: 等待被写回到磁盘的内存大小
|
||||
mem_free: 空闲内存数
|
||||
mem_high_free: 未被使用的高位内存大小
|
||||
mem_high_total: 高位内存总大小(Highmem是指所有内存高于860MB的物理内存,Highmem区域供用户程序使用,或用于页面缓存。该区域不是直接映射到内核空间。内核必须使用不同的手法使用该段内存)
|
||||
mem_huge_page_size: 每个大页的大小
|
||||
mem_huge_pages_free: 池中尚未分配的 HugePages 数量
|
||||
mem_huge_pages_total: 预留HugePages的总个数
|
||||
mem_inactive: 空闲的内存数(包括free和avalible的内存)
|
||||
mem_low_free: 未被使用的低位大小
|
||||
mem_low_total: 低位内存总大小,低位可以达到高位内存一样的作用,而且它还能够被内核用来记录一些自己的数据结构
|
||||
mem_mapped: 设备和文件等映射的大小
|
||||
mem_page_tables: 管理内存分页页面的索引表的大小
|
||||
mem_shared: 多个进程共享的内存总额
|
||||
mem_slab: 内核数据结构缓存的大小,可以减少申请和释放内存带来的消耗
|
||||
mem_sreclaimable: 可收回Slab的大小
|
||||
mem_sunreclaim: 不可收回Slab的大小(SUnreclaim+SReclaimable=Slab)
|
||||
mem_swap_cached: 被高速缓冲存储器(cache memory)用的交换空间的大小,已经被交换出来的内存,但仍然被存放在swapfile中。用来在需要的时候很快的被替换而不需要再次打开I/O端口
|
||||
mem_swap_free: 未被使用交换空间的大小
|
||||
mem_swap_total: 交换空间的总大小
|
||||
mem_total: 内存总数
|
||||
mem_used: 已用内存数
|
||||
mem_used_percent: 已用内存数百分比(0~100)
|
||||
mem_vmalloc_chunk: 最大的连续未被使用的vmalloc区域
|
||||
mem_vmalloc_totalL: 可以vmalloc虚拟内存大小
|
||||
mem_vmalloc_used: vmalloc已使用的虚拟内存大小
|
||||
mem_write_back: 正在被写回到磁盘的内存大小
|
||||
mem_write_back_tmp: FUSE用于临时写回缓冲区的内存
|
||||
|
||||
net_bytes_recv: 网卡收包总数(bytes)
|
||||
net_bytes_sent: 网卡发包总数(bytes)
|
||||
net_drop_in: 网卡收丢包数量
|
||||
net_drop_out: 网卡发丢包数量
|
||||
net_err_in: 网卡收包错误数量
|
||||
net_err_out: 网卡发包错误数量
|
||||
net_packets_recv: 网卡收包数量
|
||||
net_packets_sent: 网卡发包数量
|
||||
|
||||
netstat_tcp_established: ESTABLISHED状态的网络链接数
|
||||
netstat_tcp_fin_wait1: FIN_WAIT1状态的网络链接数
|
||||
netstat_tcp_fin_wait2: FIN_WAIT2状态的网络链接数
|
||||
netstat_tcp_last_ack: LAST_ACK状态的网络链接数
|
||||
netstat_tcp_listen: LISTEN状态的网络链接数
|
||||
netstat_tcp_syn_recv: SYN_RECV状态的网络链接数
|
||||
netstat_tcp_syn_sent: SYN_SENT状态的网络链接数
|
||||
netstat_tcp_time_wait: TIME_WAIT状态的网络链接数
|
||||
netstat_udp_socket: UDP状态的网络链接数
|
||||
|
||||
processes_blocked: 不可中断的睡眠状态下的进程数('U','D','L')
|
||||
processes_dead: 回收中的进程数('X')
|
||||
processes_idle: 挂起的空闲进程数('I')
|
||||
processes_paging: 分页进程数('P')
|
||||
processes_running: 运行中的进程数('R')
|
||||
processes_sleeping: 可中断进程数('S')
|
||||
processes_stopped: 暂停状态进程数('T')
|
||||
processes_total: 总进程数
|
||||
processes_total_threads: 总线程数
|
||||
processes_unknown: 未知状态进程数
|
||||
processes_zombies: 僵尸态进程数('Z')
|
||||
|
||||
swap_used_percent: Swap空间换出数据量
|
||||
|
||||
system_load1: 1分钟平均load值
|
||||
system_load5: 5分钟平均load值
|
||||
system_load15: 15分钟平均load值
|
||||
system_n_users: 用户数
|
||||
system_n_cpus: CPU核数
|
||||
system_uptime: 系统启动时间
|
||||
|
||||
nginx_accepts: 自nginx启动起,与客户端建立过得连接总数
|
||||
nginx_active: 当前nginx正在处理的活动连接数,等于Reading/Writing/Waiting总和
|
||||
nginx_handled: 自nginx启动起,处理过的客户端连接总数
|
||||
nginx_reading: 正在读取HTTP请求头部的连接总数
|
||||
nginx_requests: 自nginx启动起,处理过的客户端请求总数,由于存在HTTP Krrp-Alive请求,该值会大于handled值
|
||||
nginx_upstream_check_fall: upstream_check模块检测到后端失败的次数
|
||||
nginx_upstream_check_rise: upstream_check模块对后端的检测次数
|
||||
nginx_upstream_check_status_code: 后端upstream的状态,up为1,down为0
|
||||
nginx_waiting: 开启 keep-alive 的情况下,这个值等于 active – (reading+writing), 意思就是 Nginx 已经处理完正在等候下一次请求指令的驻留连接
|
||||
nginx_writing: 正在向客户端发送响应的连接总数
|
||||
|
||||
http_response_content_length: HTTP消息实体的传输长度
|
||||
http_response_http_response_code: http响应状态码
|
||||
http_response_response_time: http响应用时
|
||||
http_response_result_code: url探测结果0为正常否则url无法访问
|
||||
|
||||
# [mysqld_exporter]
|
||||
mysql_global_status_uptime: The number of seconds that the server has been up.(Gauge)
|
||||
mysql_global_status_uptime_since_flush_status: The number of seconds since the most recent FLUSH STATUS statement.(Gauge)
|
||||
mysql_global_status_queries: The number of statements executed by the server. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count COM_PING or COM_STATISTICS commands.(Counter)
|
||||
mysql_global_status_threads_connected: The number of currently open connections.(Counter)
|
||||
mysql_global_status_connections: The number of connection attempts (successful or not) to the MySQL server.(Gauge)
|
||||
mysql_global_status_max_used_connections: The maximum number of connections that have been in use simultaneously since the server started.(Gauge)
|
||||
mysql_global_status_threads_running: The number of threads that are not sleeping.(Gauge)
|
||||
mysql_global_status_questions: The number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries variable. This variable does not count COM_PING, COM_STATISTICS, COM_STMT_PREPARE, COM_STMT_CLOSE, or COM_STMT_RESET commands.(Counter)
|
||||
mysql_global_status_threads_cached: The number of threads in the thread cache.(Counter)
|
||||
mysql_global_status_threads_created: The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections.(Counter)
|
||||
mysql_global_status_created_tmp_tables: The number of internal temporary tables created by the server while executing statements.(Counter)
|
||||
mysql_global_status_created_tmp_disk_tables: The number of internal on-disk temporary tables created by the server while executing statements. You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparing Created_tmp_disk_tables and Created_tmp_tables values.(Counter)
|
||||
mysql_global_status_created_tmp_files: How many temporary files mysqld has created.(Counter)
|
||||
mysql_global_status_select_full_join: The number of joins that perform table scans because they do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.(Counter)
|
||||
mysql_global_status_select_full_range_join: The number of joins that used a range search on a reference table.(Counter)
|
||||
mysql_global_status_select_range: The number of joins that used ranges on the first table. This is normally not a critical issue even if the value is quite large.(Counter)
|
||||
mysql_global_status_select_range_check: The number of joins without keys that check for key usage after each row. If this is not 0, you should carefully check the indexes of your tables.(Counter)
|
||||
mysql_global_status_select_scan: The number of joins that did a full scan of the first table.(Counter)
|
||||
mysql_global_status_sort_rows: The number of sorted rows.(Counter)
|
||||
mysql_global_status_sort_range: The number of sorts that were done using ranges.(Counter)
|
||||
mysql_global_status_sort_merge_passes: The number of merge passes that the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.(Counter)
|
||||
mysql_global_status_sort_scan: The number of sorts that were done by scanning the table.(Counter)
|
||||
mysql_global_status_slow_queries: The number of queries that have taken more than long_query_time seconds. This counter increments regardless of whether the slow query log is enabled.(Counter)
|
||||
mysql_global_status_aborted_connects: The number of failed attempts to connect to the MySQL server.(Counter)
|
||||
mysql_global_status_aborted_clients: The number of connections that were aborted because the client died without closing the connection properly.(Counter)
|
||||
mysql_global_status_table_locks_immediate: The number of times that a request for a table lock could be granted immediately. Locks Immediate rising and falling is normal activity.(Counter)
|
||||
mysql_global_status_table_locks_waited: The number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.(Counter)
|
||||
mysql_global_status_bytes_received: The number of bytes received from all clients.(Counter)
|
||||
mysql_global_status_bytes_sent: The number of bytes sent to all clients.(Counter)
|
||||
mysql_global_status_innodb_page_size: InnoDB page size (default 16KB). Many values are counted in pages; the page size enables them to be easily converted to bytes.(Gauge)
|
||||
mysql_global_status_buffer_pool_pages: The number of pages in the InnoDB buffer pool.(Gauge)
|
||||
mysql_global_status_commands_total: The number of times each xxx statement has been executed.(Counter)
|
||||
mysql_global_status_handlers_total: Handler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes. This is in fact the layer between the Storage Engine and MySQL.(Counter)
|
||||
mysql_global_status_opened_files: The number of files that have been opened with my_open() (a mysys library function). Parts of the server that open files without using this function do not increment the count.(Counter)
|
||||
mysql_global_status_open_tables: The number of tables that are open.(Gauge)
|
||||
mysql_global_status_opened_tables: The number of tables that have been opened. If Opened_tables is big, your table_open_cache value is probably too small.(Counter)
|
||||
mysql_global_status_table_open_cache_hits: The number of hits for open tables cache lookups.(Counter)
|
||||
mysql_global_status_table_open_cache_misses: The number of misses for open tables cache lookups.(Counter)
|
||||
mysql_global_status_table_open_cache_overflows: The number of overflows for the open tables cache.(Counter)
|
||||
mysql_global_status_innodb_num_open_files: The number of files InnoDB currently holds open.(Gauge)
|
||||
mysql_global_status_connection_errors_total: These variables provide information about errors that occur during the client connection process.(Counter)
|
||||
mysql_global_status_innodb_buffer_pool_read_requests: The number of logical read requests.(Counter)
|
||||
mysql_global_status_innodb_buffer_pool_reads: The number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from disk.(Counter)
|
||||
|
||||
mysql_global_variables_thread_cache_size: How many threads the server should cache for reuse.(Gauge)
|
||||
mysql_global_variables_max_connections: The maximum permitted number of simultaneous client connections.(Gauge)
|
||||
mysql_global_variables_innodb_buffer_pool_size: The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 134217728 bytes (128MB).(Gauge)
|
||||
mysql_global_variables_innodb_log_buffer_size: The size in bytes of the buffer that InnoDB uses to write to the log files on disk.(Gauge)
|
||||
mysql_global_variables_key_buffer_size: Index blocks for MyISAM tables are buffered and are shared by all threads.(Gauge)
|
||||
mysql_global_variables_query_cache_size: The amount of memory allocated for caching query results.(Gauge)
|
||||
mysql_global_variables_table_open_cache: The number of open tables for all threads.(Gauge)
|
||||
mysql_global_variables_open_files_limit: The number of file descriptors available to mysqld from the operating system.(Gauge)
|
||||
|
||||
# [redis_exporter]
|
||||
redis_active_defrag_running: When activedefrag is enabled, this indicates whether defragmentation is currently active, and the CPU percentage it intends to utilize.
|
||||
redis_allocator_active_bytes: Total bytes in the allocator active pages, this includes external-fragmentation.
|
||||
redis_allocator_allocated_bytes: Total bytes allocated form the allocator, including internal-fragmentation. Normally the same as used_memory.
|
||||
redis_allocator_frag_bytes: Delta between allocator_active and allocator_allocated. See note about mem_fragmentation_bytes.
|
||||
redis_allocator_frag_ratio: Ratio between allocator_active and allocator_allocated. This is the true (external) fragmentation metric (not mem_fragmentation_ratio).
|
||||
redis_allocator_resident_bytes: Total bytes resident (RSS) in the allocator, this includes pages that can be released to the OS (by MEMORY PURGE, or just waiting).
|
||||
redis_allocator_rss_bytes: Delta between allocator_resident and allocator_active.
|
||||
redis_allocator_rss_ratio: Ratio between allocator_resident and allocator_active. This usually indicates pages that the allocator can and probably will soon release back to the OS.
|
||||
redis_aof_current_rewrite_duration_sec: Duration of the on-going AOF rewrite operation if any.
|
||||
redis_aof_enabled: Flag indicating AOF logging is activated.
|
||||
redis_aof_last_bgrewrite_status: Status of the last AOF rewrite operation.
|
||||
redis_aof_last_cow_size_bytes: The size in bytes of copy-on-write memory during the last AOF rewrite operation.
|
||||
redis_aof_last_rewrite_duration_sec: Duration of the last AOF rewrite operation in seconds.
|
||||
redis_aof_last_write_status: Status of the last write operation to the AOF.
|
||||
redis_aof_rewrite_in_progress: Flag indicating a AOF rewrite operation is on-going.
|
||||
redis_aof_rewrite_scheduled: Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete.
|
||||
redis_blocked_clients: Number of clients pending on a blocking call (BLPOP, BRPOP, BRPOPLPUSH, BLMOVE, BZPOPMIN, BZPOPMAX).
|
||||
redis_client_recent_max_input_buffer_bytes: Biggest input buffer among current client connections.
|
||||
redis_client_recent_max_output_buffer_bytes: Biggest output buffer among current client connections.
|
||||
redis_cluster_enabled: Indicate Redis cluster is enabled.
|
||||
redis_commands_duration_seconds_total: The total CPU time consumed by these commands.(Counter)
|
||||
redis_commands_processed_total: Total number of commands processed by the server.(Counter)
|
||||
redis_commands_total: The number of calls that reached command execution (not rejected).(Counter)
|
||||
redis_config_maxclients: The value of the maxclients configuration directive. This is the upper limit for the sum of connected_clients, connected_slaves and cluster_connections.
|
||||
redis_config_maxmemory: The value of the maxmemory configuration directive.
|
||||
redis_connected_clients: Number of client connections (excluding connections from replicas).
|
||||
redis_connected_slaves: Number of connected replicas.
|
||||
redis_connections_received_total: Total number of connections accepted by the server.(Counter)
|
||||
redis_cpu_sys_children_seconds_total: System CPU consumed by the background processes.(Counter)
|
||||
redis_cpu_sys_seconds_total: System CPU consumed by the Redis server, which is the sum of system CPU consumed by all threads of the server process (main thread and background threads).(Counter)
|
||||
redis_cpu_user_children_seconds_total: User CPU consumed by the background processes.(Counter)
|
||||
redis_cpu_user_seconds_total: User CPU consumed by the Redis server, which is the sum of user CPU consumed by all threads of the server process (main thread and background threads).(Counter)
|
||||
redis_db_keys: Total number of keys by DB.
|
||||
redis_db_keys_expiring: Total number of expiring keys by DB
|
||||
redis_defrag_hits: Number of value reallocations performed by active the defragmentation process.
|
||||
redis_defrag_misses: Number of aborted value reallocations started by the active defragmentation process.
|
||||
redis_defrag_key_hits: Number of keys that were actively defragmented.
|
||||
redis_defrag_key_misses: Number of keys that were skipped by the active defragmentation process.
|
||||
redis_evicted_keys_total: Number of evicted keys due to maxmemory limit.(Counter)
|
||||
redis_expired_keys_total: Total number of key expiration events.(Counter)
|
||||
redis_expired_stale_percentage: The percentage of keys probably expired.
|
||||
redis_expired_time_cap_reached_total: The count of times that active expiry cycles have stopped early.
|
||||
redis_exporter_last_scrape_connect_time_seconds: The duration(in seconds) to connect when scrape.
|
||||
redis_exporter_last_scrape_duration_seconds: The last scrape duration.
|
||||
redis_exporter_last_scrape_error: The last scrape error status.
|
||||
redis_exporter_scrape_duration_seconds_count: Durations of scrapes by the exporter
|
||||
redis_exporter_scrape_duration_seconds_sum: Durations of scrapes by the exporter
|
||||
redis_exporter_scrapes_total: Current total redis scrapes.(Counter)
|
||||
redis_instance_info: Information about the Redis instance.
|
||||
redis_keyspace_hits_total: Hits total.(Counter)
|
||||
redis_keyspace_misses_total: Misses total.(Counter)
|
||||
redis_last_key_groups_scrape_duration_milliseconds: Duration of the last key group metrics scrape in milliseconds.
|
||||
redis_last_slow_execution_duration_seconds: The amount of time needed for last slow execution, in seconds.
|
||||
redis_latest_fork_seconds: The amount of time needed for last fork, in seconds.
|
||||
redis_lazyfree_pending_objects: The number of objects waiting to be freed (as a result of calling UNLINK, or FLUSHDB and FLUSHALL with the ASYNC option).
|
||||
redis_master_repl_offset: The server's current replication offset.
|
||||
redis_mem_clients_normal: Memory used by normal clients.(Gauge)
|
||||
redis_mem_clients_slaves: Memory used by replica clients - Starting Redis 7.0, replica buffers share memory with the replication backlog, so this field can show 0 when replicas don't trigger an increase of memory usage.
|
||||
redis_mem_fragmentation_bytes: Delta between used_memory_rss and used_memory. Note that when the total fragmentation bytes is low (few megabytes), a high ratio (e.g. 1.5 and above) is not an indication of an issue.
|
||||
redis_mem_fragmentation_ratio: Ratio between used_memory_rss and used_memory. Note that this doesn't only includes fragmentation, but also other process overheads (see the allocator_* metrics), and also overheads like code, shared libraries, stack, etc.
|
||||
redis_mem_not_counted_for_eviction_bytes: (Gauge)
|
||||
redis_memory_max_bytes: Max memory limit in bytes.
|
||||
redis_memory_used_bytes: Total number of bytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc)
|
||||
redis_memory_used_dataset_bytes: The size in bytes of the dataset (used_memory_overhead subtracted from used_memory)
|
||||
redis_memory_used_lua_bytes: Number of bytes used by the Lua engine.
|
||||
redis_memory_used_overhead_bytes: The sum in bytes of all overheads that the server allocated for managing its internal data structures.
|
||||
redis_memory_used_peak_bytes: Peak memory consumed by Redis (in bytes)
|
||||
redis_memory_used_rss_bytes: Number of bytes that Redis allocated as seen by the operating system (a.k.a resident set size). This is the number reported by tools such as top(1) and ps(1)
|
||||
redis_memory_used_scripts_bytes: Number of bytes used by cached Lua scripts
|
||||
redis_memory_used_startup_bytes: Initial amount of memory consumed by Redis at startup in bytes
|
||||
redis_migrate_cached_sockets_total: The number of sockets open for MIGRATE purposes
|
||||
redis_net_input_bytes_total: Total input bytes(Counter)
|
||||
redis_net_output_bytes_total: Total output bytes(Counter)
|
||||
redis_process_id: Process ID
|
||||
redis_pubsub_channels: Global number of pub/sub channels with client subscriptions
|
||||
redis_pubsub_patterns: Global number of pub/sub pattern with client subscriptions
|
||||
redis_rdb_bgsave_in_progress: Flag indicating a RDB save is on-going
|
||||
redis_rdb_changes_since_last_save: Number of changes since the last dump
|
||||
redis_rdb_current_bgsave_duration_sec: Duration of the on-going RDB save operation if any
|
||||
redis_rdb_last_bgsave_duration_sec: Duration of the last RDB save operation in seconds
|
||||
redis_rdb_last_bgsave_status: Status of the last RDB save operation
|
||||
redis_rdb_last_cow_size_bytes: The size in bytes of copy-on-write memory during the last RDB save operation
|
||||
redis_rdb_last_save_timestamp_seconds: Epoch-based timestamp of last successful RDB save
|
||||
redis_rejected_connections_total: Number of connections rejected because of maxclients limit(Counter)
|
||||
redis_repl_backlog_first_byte_offset: The master offset of the replication backlog buffer
|
||||
redis_repl_backlog_history_bytes: Size in bytes of the data in the replication backlog buffer
|
||||
redis_repl_backlog_is_active: Flag indicating replication backlog is active
|
||||
redis_replica_partial_resync_accepted: The number of accepted partial resync requests(Gauge)
|
||||
redis_replica_partial_resync_denied: The number of denied partial resync requests(Gauge)
|
||||
redis_replica_resyncs_full: The number of full resyncs with replicas
|
||||
redis_replication_backlog_bytes: Memory used by replication backlog
|
||||
redis_second_repl_offset: The offset up to which replication IDs are accepted.
|
||||
redis_slave_expires_tracked_keys: The number of keys tracked for expiry purposes (applicable only to writable replicas)(Gauge)
|
||||
redis_slowlog_last_id: Last id of slowlog
|
||||
redis_slowlog_length: Total slowlog
|
||||
redis_start_time_seconds: Start time of the Redis instance since unix epoch in seconds.
|
||||
redis_target_scrape_request_errors_total: Errors in requests to the exporter
|
||||
redis_up: Flag indicating redis instance is up
|
||||
redis_uptime_in_seconds: Number of seconds since Redis server start
|
||||
|
||||
# [windows_exporter]
|
||||
windows_cpu_clock_interrupts_total: Total number of received and serviced clock tick interrupts(counter)
|
||||
windows_cpu_core_frequency_mhz: Core frequency in megahertz(gauge)
|
||||
windows_cpu_cstate_seconds_total: Time spent in low-power idle state(counter)
|
||||
windows_cpu_dpcs_total: Total number of received and serviced deferred procedure calls (DPCs)(counter)
|
||||
windows_cpu_idle_break_events_total: Total number of time processor was woken from idle(counter)
|
||||
windows_cpu_interrupts_total: Total number of received and serviced hardware interrupts(counter)
|
||||
windows_cpu_parking_status: Parking Status represents whether a processor is parked or not(gauge)
|
||||
windows_cpu_processor_performance: Processor Performance is the average performance of the processor while it is executing instructions, as a percentage of the nominal performance of the processor. On some processors, Processor Performance may exceed 100%(gauge)
|
||||
windows_cpu_time_total: Time that processor spent in different modes (idle, user, system, ...)(counter)
|
||||
windows_cs_hostname: Labeled system hostname information as provided by ComputerSystem.DNSHostName and ComputerSystem.Domain(gauge)
|
||||
windows_cs_logical_processors: ComputerSystem.NumberOfLogicalProcessors(gauge)
|
||||
windows_cs_physical_memory_bytes: ComputerSystem.TotalPhysicalMemory(gauge)
|
||||
windows_exporter_build_info: A metric with a constant '1' value labeled by version, revision, branch, and goversion from which windows_exporter was built.(gauge)
|
||||
windows_exporter_collector_duration_seconds: Duration of a collection.(gauge)
|
||||
windows_exporter_collector_success: Whether the collector was successful.(gauge)
|
||||
windows_exporter_collector_timeout: Whether the collector timed out.(gauge)
|
||||
windows_exporter_perflib_snapshot_duration_seconds: Duration of perflib snapshot capture(gauge)
|
||||
windows_logical_disk_free_bytes: Free space in bytes (LogicalDisk.PercentFreeSpace)(gauge)
|
||||
windows_logical_disk_idle_seconds_total: Seconds that the disk was idle (LogicalDisk.PercentIdleTime)(counter)
|
||||
windows_logical_disk_read_bytes_total: The number of bytes transferred from the disk during read operations (LogicalDisk.DiskReadBytesPerSec)(counter)
|
||||
windows_logical_disk_read_latency_seconds_total: Shows the average time, in seconds, of a read operation from the disk (LogicalDisk.AvgDiskSecPerRead)(counter)
|
||||
windows_logical_disk_read_seconds_total: Seconds that the disk was busy servicing read requests (LogicalDisk.PercentDiskReadTime)(counter)
|
||||
windows_logical_disk_read_write_latency_seconds_total: Shows the time, in seconds, of the average disk transfer (LogicalDisk.AvgDiskSecPerTransfer)(counter)
|
||||
windows_logical_disk_reads_total: The number of read operations on the disk (LogicalDisk.DiskReadsPerSec)(counter)
|
||||
windows_logical_disk_requests_queued: The number of requests queued to the disk (LogicalDisk.CurrentDiskQueueLength)(gauge)
|
||||
windows_logical_disk_size_bytes: Total space in bytes (LogicalDisk.PercentFreeSpace_Base)(gauge)
|
||||
windows_logical_disk_split_ios_total: The number of I/Os to the disk were split into multiple I/Os (LogicalDisk.SplitIOPerSec)(counter)
|
||||
windows_logical_disk_write_bytes_total: The number of bytes transferred to the disk during write operations (LogicalDisk.DiskWriteBytesPerSec)(counter)
|
||||
windows_logical_disk_write_latency_seconds_total: Shows the average time, in seconds, of a write operation to the disk (LogicalDisk.AvgDiskSecPerWrite)(counter)
|
||||
windows_logical_disk_write_seconds_total: Seconds that the disk was busy servicing write requests (LogicalDisk.PercentDiskWriteTime)(counter)
|
||||
windows_logical_disk_writes_total: The number of write operations on the disk (LogicalDisk.DiskWritesPerSec)(counter)
|
||||
windows_net_bytes_received_total: (Network.BytesReceivedPerSec)(counter)
|
||||
windows_net_bytes_sent_total: (Network.BytesSentPerSec)(counter)
|
||||
windows_net_bytes_total: (Network.BytesTotalPerSec)(counter)
|
||||
windows_net_current_bandwidth: (Network.CurrentBandwidth)(gauge)
|
||||
windows_net_packets_outbound_discarded_total: (Network.PacketsOutboundDiscarded)(counter)
|
||||
windows_net_packets_outbound_errors_total: (Network.PacketsOutboundErrors)(counter)
|
||||
windows_net_packets_received_discarded_total: (Network.PacketsReceivedDiscarded)(counter)
|
||||
windows_net_packets_received_errors_total: (Network.PacketsReceivedErrors)(counter)
|
||||
windows_net_packets_received_total: (Network.PacketsReceivedPerSec)(counter)
|
||||
windows_net_packets_received_unknown_total: (Network.PacketsReceivedUnknown)(counter)
|
||||
windows_net_packets_sent_total: (Network.PacketsSentPerSec)(counter)
|
||||
windows_net_packets_total: (Network.PacketsPerSec)(counter)
|
||||
windows_os_info: OperatingSystem.Caption, OperatingSystem.Version(gauge)
|
||||
windows_os_paging_free_bytes: OperatingSystem.FreeSpaceInPagingFiles(gauge)
|
||||
windows_os_paging_limit_bytes: OperatingSystem.SizeStoredInPagingFiles(gauge)
|
||||
windows_os_physical_memory_free_bytes: OperatingSystem.FreePhysicalMemory(gauge)
|
||||
windows_os_process_memory_limix_bytes: OperatingSystem.MaxProcessMemorySize(gauge)
|
||||
windows_os_processes: OperatingSystem.NumberOfProcesses(gauge)
|
||||
windows_os_processes_limit: OperatingSystem.MaxNumberOfProcesses(gauge)
|
||||
windows_os_time: OperatingSystem.LocalDateTime(gauge)
|
||||
windows_os_timezone: OperatingSystem.LocalDateTime(gauge)
|
||||
windows_os_users: OperatingSystem.NumberOfUsers(gauge)
|
||||
windows_os_virtual_memory_bytes: OperatingSystem.TotalVirtualMemorySize(gauge)
|
||||
windows_os_virtual_memory_free_bytes: OperatingSystem.FreeVirtualMemory(gauge)
|
||||
windows_os_visible_memory_bytes: OperatingSystem.TotalVisibleMemorySize(gauge)
|
||||
windows_service_info: A metric with a constant '1' value labeled with service information(gauge)
|
||||
windows_service_start_mode: The start mode of the service (StartMode)(gauge)
|
||||
windows_service_state: The state of the service (State)(gauge)
|
||||
windows_service_status: The status of the service (Status)(gauge)
|
||||
windows_system_context_switches_total: Total number of context switches (WMI source is PerfOS_System.ContextSwitchesPersec)(counter)
|
||||
windows_system_exception_dispatches_total: Total number of exceptions dispatched (WMI source is PerfOS_System.ExceptionDispatchesPersec)(counter)
|
||||
windows_system_processor_queue_length: Length of processor queue (WMI source is PerfOS_System.ProcessorQueueLength)(gauge)
|
||||
windows_system_system_calls_total: Total number of system calls (WMI source is PerfOS_System.SystemCallsPersec)(counter)
|
||||
windows_system_system_up_time: System boot time (WMI source is PerfOS_System.SystemUpTime)(gauge)
|
||||
windows_system_threads: Current number of threads (WMI source is PerfOS_System.Threads)(gauge)
|
||||
|
||||
# [node_exporter]
|
||||
# SYSTEM
|
||||
# CPU context switch 次数
|
||||
node_context_switches_total: context_switches
|
||||
# Interrupts 次数
|
||||
node_intr_total: Interrupts
|
||||
# 运行的进程数
|
||||
node_procs_running: Processes in runnable state
|
||||
# 熵池大小
|
||||
node_entropy_available_bits: Entropy available to random number generators
|
||||
node_time_seconds: System time in seconds since epoch (1970)
|
||||
node_boot_time_seconds: Node boot time, in unixtime
|
||||
# CPU
|
||||
node_cpu_seconds_total: Seconds the CPUs spent in each mode
|
||||
node_load1: cpu load 1m
|
||||
node_load5: cpu load 5m
|
||||
node_load15: cpu load 15m
|
||||
|
||||
# MEM
|
||||
# 内核态
|
||||
# 用户追踪已从交换区获取但尚未修改的页面的内存
|
||||
node_memory_SwapCached_bytes: Memory that keeps track of pages that have been fetched from swap but not yet been modified
|
||||
# 内核用于缓存数据结构供自己使用的内存
|
||||
node_memory_Slab_bytes: Memory used by the kernel to cache data structures for its own use
|
||||
# slab中可回收的部分
|
||||
node_memory_SReclaimable_bytes: SReclaimable - Part of Slab, that might be reclaimed, such as caches
|
||||
# slab中不可回收的部分
|
||||
node_memory_SUnreclaim_bytes: Part of Slab, that cannot be reclaimed on memory pressure
|
||||
# Vmalloc内存区的大小
|
||||
node_memory_VmallocTotal_bytes: Total size of vmalloc memory area
|
||||
# vmalloc已分配的内存,虚拟地址空间上的连续的内存
|
||||
node_memory_VmallocUsed_bytes: Amount of vmalloc area which is used
|
||||
# vmalloc区可用的连续最大快的大小,通过此指标可以知道vmalloc可分配连续内存的最大值
|
||||
node_memory_VmallocChunk_bytes: Largest contigious block of vmalloc area which is free
|
||||
# 内存的硬件故障删除掉的内存页的总大小
|
||||
node_memory_HardwareCorrupted_bytes: Amount of RAM that the kernel identified as corrupted / not working
|
||||
# 用于在虚拟和物理内存地址之间映射的内存
|
||||
node_memory_PageTables_bytes: Memory used to map between virtual and physical memory addresses (gauge)
|
||||
# 内核栈内存,常驻内存,不可回收
|
||||
node_memory_KernelStack_bytes: Kernel memory stack. This is not reclaimable
|
||||
# 用来访问高端内存,复制高端内存的临时buffer,称为“bounce buffering”,会降低I/O 性能
|
||||
node_memory_Bounce_bytes: Memory used for block device bounce buffers
|
||||
#用户态
|
||||
# 单个巨页大小
|
||||
node_memory_Hugepagesize_bytes: Huge Page size
|
||||
# 系统分配的常驻巨页数
|
||||
node_memory_HugePages_Total: Total size of the pool of huge pages
|
||||
# 系统空闲的巨页数
|
||||
node_memory_HugePages_Free: Huge pages in the pool that are not yet allocated
|
||||
# 进程已申请但未使用的巨页数
|
||||
node_memory_HugePages_Rsvd: Huge pages for which a commitment to allocate from the pool has been made, but no allocation
|
||||
# 超过系统设定的常驻HugePages数量的个数
|
||||
node_memory_HugePages_Surp: Huge pages in the pool above the value in /proc/sys/vm/nr_hugepages
|
||||
# 透明巨页 Transparent HugePages (THP)
|
||||
node_memory_AnonHugePages_bytes: Memory in anonymous huge pages
|
||||
# inactivelist中的File-backed内存
|
||||
node_memory_Inactive_file_bytes: File-backed memory on inactive LRU list
|
||||
# inactivelist中的Anonymous内存
|
||||
node_memory_Inactive_anon_bytes: Anonymous and swap cache on inactive LRU list, including tmpfs (shmem)
|
||||
# activelist中的File-backed内存
|
||||
node_memory_Active_file_bytes: File-backed memory on active LRU list
|
||||
# activelist中的Anonymous内存
|
||||
node_memory_Active_anon_bytes: Anonymous and swap cache on active least-recently-used (LRU) list, including tmpfs
|
||||
# 禁止换出的页,对应 Unevictable 链表
|
||||
node_memory_Unevictable_bytes: Amount of unevictable memory that can't be swapped out for a variety of reasons
|
||||
# 共享内存
|
||||
node_memory_Shmem_bytes: Used shared memory (shared between several processes, thus including RAM disks)
|
||||
# 匿名页内存大小
|
||||
node_memory_AnonPages_bytes: Memory in user pages not backed by files
|
||||
# 被关联的内存页大小
|
||||
node_memory_Mapped_bytes: Used memory in mapped pages files which have been mmaped, such as libraries
|
||||
# file-backed内存页缓存大小
|
||||
node_memory_Cached_bytes: Parked file data (file content) cache
|
||||
# 系统中有多少匿名页曾经被swap-out、现在又被swap-in并且swap-in之后页面中的内容一直没发生变化
|
||||
node_memory_SwapCached_bytes: Memory that keeps track of pages that have been fetched from swap but not yet been modified
|
||||
# 被mlock()系统调用锁定的内存大小
|
||||
node_memory_Mlocked_bytes: Size of pages locked to memory using the mlock() system call
|
||||
# 块设备(block device)所占用的缓存页
|
||||
node_memory_Buffers_bytes: Block device (e.g. harddisk) cache
|
||||
node_memory_SwapTotal_bytes: Memory information field SwapTotal_bytes
|
||||
node_memory_SwapFree_bytes: Memory information field SwapFree_bytes
|
||||
|
||||
# DISK
|
||||
node_filesystem_files_free: Filesystem space available to non-root users in byte
|
||||
node_filesystem_free_bytes: Filesystem free space in bytes
|
||||
node_filesystem_size_bytes: Filesystem size in bytes
|
||||
node_filesystem_files_free: Filesystem total free file nodes
|
||||
node_filesystem_files: Filesystem total free file nodes
|
||||
node_filefd_maximum: Max open files
|
||||
node_filefd_allocated: Open files
|
||||
node_filesystem_readonly: Filesystem read-only status
|
||||
node_filesystem_device_error: Whether an error occurred while getting statistics for the given device
|
||||
node_disk_reads_completed_total: The total number of reads completed successfully
|
||||
node_disk_writes_completed_total: The total number of writes completed successfully
|
||||
node_disk_reads_merged_total: The number of reads merged
|
||||
node_disk_writes_merged_total: The number of writes merged
|
||||
node_disk_read_bytes_total: The total number of bytes read successfully
|
||||
node_disk_written_bytes_total: The total number of bytes written successfully
|
||||
node_disk_io_time_seconds_total: Total seconds spent doing I/Os
|
||||
node_disk_read_time_seconds_total: The total number of seconds spent by all reads
|
||||
node_disk_write_time_seconds_total: The total number of seconds spent by all writes
|
||||
node_disk_io_time_weighted_seconds_total: The weighted of seconds spent doing I/Os
|
||||
|
||||
# NET
|
||||
node_network_receive_bytes_total: Network device statistic receive_bytes (counter)
|
||||
node_network_transmit_bytes_total: Network device statistic transmit_bytes (counter)
|
||||
node_network_receive_packets_total: Network device statistic receive_bytes
|
||||
node_network_transmit_packets_total: Network device statistic transmit_bytes
|
||||
node_network_receive_errs_total: Network device statistic receive_errs
|
||||
node_network_transmit_errs_total: Network device statistic transmit_errs
|
||||
node_network_receive_drop_total: Network device statistic receive_drop
|
||||
node_network_transmit_drop_total: Network device statistic transmit_drop
|
||||
node_nf_conntrack_entries: Number of currently allocated flow entries for connection tracking
|
||||
node_sockstat_TCP_alloc: Number of TCP sockets in state alloc
|
||||
node_sockstat_TCP_inuse: Number of TCP sockets in state inuse
|
||||
node_sockstat_TCP_orphan: Number of TCP sockets in state orphan
|
||||
node_sockstat_TCP_tw: Number of TCP sockets in state tw
|
||||
node_netstat_Tcp_CurrEstab: Statistic TcpCurrEstab
|
||||
node_sockstat_sockets_used: Number of IPv4 sockets in use
|
||||
|
||||
# [kafka_exporter]
|
||||
kafka_brokers: count of kafka_brokers (gauge)
|
||||
kafka_topic_partitions: Number of partitions for this Topic (gauge)
|
||||
kafka_topic_partition_current_offset: Current Offset of a Broker at Topic/Partition (gauge)
|
||||
kafka_consumergroup_current_offset: Current Offset of a ConsumerGroup at Topic/Partition (gauge)
|
||||
kafka_consumer_lag_millis: Current approximation of consumer lag for a ConsumerGroup at Topic/Partition (gauge)
|
||||
kafka_topic_partition_under_replicated_partition: 1 if Topic/Partition is under Replicated
|
||||
|
||||
# [zookeeper_exporter]
|
||||
zk_znode_count: The total count of znodes stored
|
||||
zk_ephemerals_count: The number of Ephemerals nodes
|
||||
zk_watch_count: The number of watchers setup over Zookeeper nodes.
|
||||
zk_approximate_data_size: Size of data in bytes that a zookeeper server has in its data tree
|
||||
zk_outstanding_requests: Number of currently executing requests
|
||||
zk_packets_sent: Count of the number of zookeeper packets sent from a server
|
||||
zk_packets_received: Count of the number of zookeeper packets received by a server
|
||||
zk_num_alive_connections: Number of active clients connected to a zookeeper server
|
||||
zk_open_file_descriptor_count: Number of file descriptors that a zookeeper server has open
|
||||
zk_max_file_descriptor_count: Maximum number of file descriptors that a zookeeper server can open
|
||||
zk_avg_latency: Average time in milliseconds for requests to be processed
|
||||
zk_min_latency: Maximum time in milliseconds for a request to be processed
|
||||
zk_max_latency: Minimum time in milliseconds for a request to be processed
|
||||
216
docker/n9eetc/script/notify.bak.py
Normal file
@@ -0,0 +1,216 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
import sys
|
||||
import json
|
||||
import urllib2
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf8')
|
||||
|
||||
notify_channel_funcs = {
|
||||
"email":"email",
|
||||
"sms":"sms",
|
||||
"voice":"voice",
|
||||
"dingtalk":"dingtalk",
|
||||
"wecom":"wecom",
|
||||
"feishu":"feishu"
|
||||
}
|
||||
|
||||
mail_host = "smtp.163.com"
|
||||
mail_port = 994
|
||||
mail_user = "ulricqin"
|
||||
mail_pass = "password"
|
||||
mail_from = "ulricqin@163.com"
|
||||
|
||||
class Sender(object):
|
||||
@classmethod
|
||||
def send_email(cls, payload):
|
||||
if mail_user == "ulricqin" and mail_pass == "password":
|
||||
print("invalid smtp configuration")
|
||||
return
|
||||
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
|
||||
emails = {}
|
||||
for u in users:
|
||||
if u.get("email"):
|
||||
emails[u.get("email")] = 1
|
||||
|
||||
if not emails:
|
||||
return
|
||||
|
||||
recipients = emails.keys()
|
||||
mail_body = payload.get('tpls').get("mailbody.tpl", "mailbody.tpl not found")
|
||||
message = MIMEText(mail_body, 'html', 'utf-8')
|
||||
message['From'] = mail_from
|
||||
message['To'] = ", ".join(recipients)
|
||||
message["Subject"] = payload.get('tpls').get("subject.tpl", "subject.tpl not found")
|
||||
|
||||
try:
|
||||
smtp = smtplib.SMTP_SSL(mail_host, mail_port)
|
||||
smtp.login(mail_user, mail_pass)
|
||||
smtp.sendmail(mail_from, recipients, message.as_string())
|
||||
smtp.close()
|
||||
except smtplib.SMTPException, error:
|
||||
print(error)
|
||||
|
||||
@classmethod
|
||||
def send_wecom(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
|
||||
tokens = {}
|
||||
|
||||
for u in users:
|
||||
contacts = u.get("contacts")
|
||||
if contacts.get("wecom_robot_token", ""):
|
||||
tokens[contacts.get("wecom_robot_token", "")] = 1
|
||||
|
||||
opener = urllib2.build_opener(urllib2.HTTPHandler())
|
||||
method = "POST"
|
||||
|
||||
for t in tokens:
|
||||
url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={}".format(t)
|
||||
body = {
|
||||
"msgtype": "markdown",
|
||||
"markdown": {
|
||||
"content": payload.get('tpls').get("wecom.tpl", "wecom.tpl not found")
|
||||
}
|
||||
}
|
||||
request = urllib2.Request(url, data=json.dumps(body))
|
||||
request.add_header("Content-Type",'application/json;charset=utf-8')
|
||||
request.get_method = lambda: method
|
||||
try:
|
||||
connection = opener.open(request)
|
||||
print(connection.read())
|
||||
except urllib2.HTTPError, error:
|
||||
print(error)
|
||||
|
||||
@classmethod
|
||||
def send_dingtalk(cls, payload):
|
||||
event = payload.get('event')
|
||||
users = event.get("notify_users_obj")
|
||||
|
||||
rule_name = event.get("rule_name")
|
||||
event_state = "Triggered"
|
||||
if event.get("is_recovered"):
|
||||
event_state = "Recovered"
|
||||
|
||||
tokens = {}
|
||||
phones = {}
|
||||
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
|
||||
contacts = u.get("contacts")
|
||||
if contacts.get("dingtalk_robot_token", ""):
|
||||
tokens[contacts.get("dingtalk_robot_token", "")] = 1
|
||||
|
||||
opener = urllib2.build_opener(urllib2.HTTPHandler())
|
||||
method = "POST"
|
||||
|
||||
for t in tokens:
|
||||
url = "https://oapi.dingtalk.com/robot/send?access_token={}".format(t)
|
||||
body = {
|
||||
"msgtype": "markdown",
|
||||
"markdown": {
|
||||
"title": "{} - {}".format(event_state, rule_name),
|
||||
"text": payload.get('tpls').get("dingtalk.tpl", "dingtalk.tpl not found") + ' '.join(["@"+i for i in phones.keys()])
|
||||
},
|
||||
"at": {
|
||||
"atMobiles": phones.keys(),
|
||||
"isAtAll": False
|
||||
}
|
||||
}
|
||||
request = urllib2.Request(url, data=json.dumps(body))
|
||||
request.add_header("Content-Type",'application/json;charset=utf-8')
|
||||
request.get_method = lambda: method
|
||||
try:
|
||||
connection = opener.open(request)
|
||||
print(connection.read())
|
||||
except urllib2.HTTPError, error:
|
||||
print(error)
|
||||
|
||||
@classmethod
|
||||
def send_feishu(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
|
||||
tokens = {}
|
||||
phones = {}
|
||||
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
|
||||
contacts = u.get("contacts")
|
||||
if contacts.get("feishu_robot_token", ""):
|
||||
tokens[contacts.get("feishu_robot_token", "")] = 1
|
||||
|
||||
opener = urllib2.build_opener(urllib2.HTTPHandler())
|
||||
method = "POST"
|
||||
|
||||
for t in tokens:
|
||||
url = "https://open.feishu.cn/open-apis/bot/v2/hook/{}".format(t)
|
||||
body = {
|
||||
"msg_type": "text",
|
||||
"content": {
|
||||
"text": payload.get('tpls').get("feishu.tpl", "feishu.tpl not found")
|
||||
},
|
||||
"at": {
|
||||
"atMobiles": phones.keys(),
|
||||
"isAtAll": False
|
||||
}
|
||||
}
|
||||
request = urllib2.Request(url, data=json.dumps(body))
|
||||
request.add_header("Content-Type",'application/json;charset=utf-8')
|
||||
request.get_method = lambda: method
|
||||
try:
|
||||
connection = opener.open(request)
|
||||
print(connection.read())
|
||||
except urllib2.HTTPError, error:
|
||||
print(error)
|
||||
|
||||
@classmethod
|
||||
def send_sms(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
phones = {}
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
if phones:
|
||||
print("send_sms not implemented, phones: {}".format(phones.keys()))
|
||||
|
||||
@classmethod
|
||||
def send_voice(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
phones = {}
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
if phones:
|
||||
print("send_voice not implemented, phones: {}".format(phones.keys()))
|
||||
|
||||
def main():
|
||||
payload = json.load(sys.stdin)
|
||||
with open(".payload", 'w') as f:
|
||||
f.write(json.dumps(payload, indent=4))
|
||||
for ch in payload.get('event').get('notify_channels'):
|
||||
send_func_name = "send_{}".format(notify_channel_funcs.get(ch.strip()))
|
||||
if not hasattr(Sender, send_func_name):
|
||||
print("function: {} not found", send_func_name)
|
||||
continue
|
||||
send_func = getattr(Sender, send_func_name)
|
||||
send_func(payload)
|
||||
|
||||
def hello():
|
||||
print("hello nightingale")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) == 1:
|
||||
main()
|
||||
elif sys.argv[1] == "hello":
|
||||
hello()
|
||||
else:
|
||||
print("I am confused")
|
||||
68
docker/n9eetc/script/notify.py
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
import sys
|
||||
import json
|
||||
|
||||
class Sender(object):
|
||||
@classmethod
|
||||
def send_email(cls, payload):
|
||||
# already done in go code
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def send_wecom(cls, payload):
|
||||
# already done in go code
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def send_dingtalk(cls, payload):
|
||||
# already done in go code
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def send_feishu(cls, payload):
|
||||
# already done in go code
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def send_sms(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
phones = {}
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
if phones:
|
||||
print("send_sms not implemented, phones: {}".format(phones.keys()))
|
||||
|
||||
@classmethod
|
||||
def send_voice(cls, payload):
|
||||
users = payload.get('event').get("notify_users_obj")
|
||||
phones = {}
|
||||
for u in users:
|
||||
if u.get("phone"):
|
||||
phones[u.get("phone")] = 1
|
||||
if phones:
|
||||
print("send_voice not implemented, phones: {}".format(phones.keys()))
|
||||
|
||||
def main():
|
||||
payload = json.load(sys.stdin)
|
||||
with open(".payload", 'w') as f:
|
||||
f.write(json.dumps(payload, indent=4))
|
||||
for ch in payload.get('event').get('notify_channels'):
|
||||
send_func_name = "send_{}".format(ch.strip())
|
||||
if not hasattr(Sender, send_func_name):
|
||||
print("function: {} not found", send_func_name)
|
||||
continue
|
||||
send_func = getattr(Sender, send_func_name)
|
||||
send_func(payload)
|
||||
|
||||
def hello():
|
||||
print("hello nightingale")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) == 1:
|
||||
main()
|
||||
elif sys.argv[1] == "hello":
|
||||
hello()
|
||||
else:
|
||||
print("I am confused")
|
||||
9
docker/n9eetc/script/notify/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
.phony: all
|
||||
all: plugin
|
||||
|
||||
.phony: plugin
|
||||
plugin:
|
||||
export GOPROXY=http://goproxy.cn,direct
|
||||
go build -buildmode=plugin -o notify.so notify.go
|
||||
|
||||
35
docker/n9eetc/script/notify/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
通过go plugin模式处理告警通知
|
||||
---
|
||||
|
||||
相比于调用py脚本方式,该方式一般无需考虑依赖问题
|
||||
|
||||
### (1) 编写动态链接库逻辑
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
type inter interface {
|
||||
Descript() string
|
||||
Notify([]byte)
|
||||
}
|
||||
|
||||
// 0、Descript 可用于该插件在 server 中的描述
|
||||
// 1、在 Notify 方法中实现要处理的自定义逻辑
|
||||
```
|
||||
|
||||
实现以上接口的 `struct` 实例即为合法 `plugin`
|
||||
|
||||
### (2) 构建链接库
|
||||
|
||||
参考 `notify.go` 实现方式,执行 `make` 后可以看到生成一个 `notify.so` 链接文件,放到 n9e 对应项目位置即可
|
||||
|
||||
### (3) 更新 n9e 配置
|
||||
|
||||
```text
|
||||
[Alerting.CallPlugin]
|
||||
Enable = false
|
||||
PluginPath = "./etc/script/notify.so"
|
||||
# 注意此处caller必须在notify.so中作为变量暴露,首字母必须大写才能暴露
|
||||
Caller = "N9eCaller"
|
||||
```
|
||||
|
||||
45
docker/n9eetc/script/notify/notify.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
// the caller can be called for alerting notify by complete this interface
|
||||
type inter interface {
|
||||
Descript() string
|
||||
Notify([]byte)
|
||||
}
|
||||
|
||||
// N9E complete
|
||||
type N9EPlugin struct {
|
||||
Name string
|
||||
Description string
|
||||
BuildAt string
|
||||
}
|
||||
|
||||
func (n *N9EPlugin) Descript() string {
|
||||
return fmt.Sprintf("%s: %s", n.Name, n.Description)
|
||||
}
|
||||
|
||||
func (n *N9EPlugin) Notify(bs []byte) {
|
||||
var channels = []string{
|
||||
"dingtalk_robot_token",
|
||||
"wecom_robot_token",
|
||||
"feishu_robot_token",
|
||||
}
|
||||
for _, ch := range channels {
|
||||
if ret := gjson.GetBytes(bs, ch); ret.Exists() {
|
||||
fmt.Printf("do something...")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// will be loaded for alertingCall , The first letter must be capitalized to be exported
|
||||
var N9eCaller = N9EPlugin{
|
||||
Name: "n9e",
|
||||
Description: "演示告警通过动态链接库方式通知",
|
||||
BuildAt: time.Now().Local().Format("2006/01/02 15:04:05"),
|
||||
}
|
||||