Compare commits
1833 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b651d0e546 | ||
|
|
78ce5093c7 | ||
|
|
20b7c3f566 | ||
|
|
ea2a43e692 | ||
|
|
7f122c4fa1 | ||
|
|
1cfc72ebad | ||
|
|
8820908b86 | ||
|
|
5823311888 | ||
|
|
339cc8bdb0 | ||
|
|
3a5abe4617 | ||
|
|
7e1a96eb00 | ||
|
|
44c1992be6 | ||
|
|
d5e70bbc31 | ||
|
|
863b1628bb | ||
|
|
186d29fc77 | ||
|
|
8d75f9d356 | ||
|
|
801a741d50 | ||
|
|
89cb6bdc66 | ||
|
|
005be07c63 | ||
|
|
eafb5340ff | ||
|
|
8d14b04c58 | ||
|
|
4c52d38506 | ||
|
|
a75b0c69d7 | ||
|
|
1a584b5a23 | ||
|
|
50b027269f | ||
|
|
2d0e60d57f | ||
|
|
2989ded3c1 | ||
|
|
53886b1e56 | ||
|
|
ef94106497 | ||
|
|
b3d5beabaa | ||
|
|
750c9d982e | ||
|
|
e7d4568afb | ||
|
|
a333b4c03a | ||
|
|
13dd4cf567 | ||
|
|
739f83c427 | ||
|
|
6b11be7b10 | ||
|
|
866aa4e53c | ||
|
|
1ab0f7910a | ||
|
|
70ebd63b52 | ||
|
|
47c3305a6c | ||
|
|
dcf2cda1a1 | ||
|
|
540346db0a | ||
|
|
f0af7685c7 | ||
|
|
c2dee31637 | ||
|
|
2043ea4f18 | ||
|
|
5d90a063b8 | ||
|
|
9890c36327 | ||
|
|
c826638d38 | ||
|
|
9a7ba6dbbe | ||
|
|
bb9c218771 | ||
|
|
f76b8d285a | ||
|
|
3551587082 | ||
|
|
ad100c80ee | ||
|
|
4e182dedf1 | ||
|
|
17d5ed8d33 | ||
|
|
846cd21c3d | ||
|
|
15e9afc872 | ||
|
|
407291fa27 | ||
|
|
69342d9c63 | ||
|
|
b5cd390fec | ||
|
|
b9037d85d7 | ||
|
|
b318f3d27b | ||
|
|
15922fd093 | ||
|
|
f9d4a03f85 | ||
|
|
e46c0832e1 | ||
|
|
caafd5c50c | ||
|
|
5630d98490 | ||
|
|
f5eefca0da | ||
|
|
422e32f250 | ||
|
|
30b3b669fb | ||
|
|
808c6da0e6 | ||
|
|
724a95d843 | ||
|
|
e670510045 | ||
|
|
f8ab63edab | ||
|
|
c82b6e59f9 | ||
|
|
3d2a0dd9aa | ||
|
|
f04527e490 | ||
|
|
b8688e438c | ||
|
|
54b5482cb1 | ||
|
|
0940058fd6 | ||
|
|
3ef7c9131c | ||
|
|
f50ab224a5 | ||
|
|
906ed94ad5 | ||
|
|
bf92828c2c | ||
|
|
b0a9e8ee00 | ||
|
|
d57938e075 | ||
|
|
744c5eed89 | ||
|
|
d857a30bb1 | ||
|
|
80ae6c771f | ||
|
|
33b0cee1db | ||
|
|
7ed23e456c | ||
|
|
6aec0d215d | ||
|
|
cacd04bcb1 | ||
|
|
fc09a76aff | ||
|
|
70953564f1 | ||
|
|
51b5f1a0f8 | ||
|
|
136d09f45e | ||
|
|
79d60209cd | ||
|
|
3bc102be60 | ||
|
|
609866c700 | ||
|
|
e983d96d30 | ||
|
|
20d11ee6d6 | ||
|
|
d6f0ef5997 | ||
|
|
24eec860fd | ||
|
|
c5681e8a90 | ||
|
|
9dfc28bf0d | ||
|
|
ea607c9ddd | ||
|
|
8534e1b944 | ||
|
|
a84e942ce1 | ||
|
|
eff34d0b87 | ||
|
|
230669ac0a | ||
|
|
39b04c8215 | ||
|
|
dc7086ede0 | ||
|
|
4376467951 | ||
|
|
0b40e2f006 | ||
|
|
c9c390b30e | ||
|
|
3e20237bdc | ||
|
|
d0323bf85d | ||
|
|
4a023d0937 | ||
|
|
5d12e86b76 | ||
|
|
6ae4e8adf5 | ||
|
|
98aa0453a7 | ||
|
|
4fb46b2122 | ||
|
|
9a0f5773e3 | ||
|
|
0101fb79b4 | ||
|
|
136ba9a5ed | ||
|
|
150a7c7d27 | ||
|
|
fb585c71ac | ||
|
|
a0d7e57993 | ||
|
|
f57b511186 | ||
|
|
5602f6b383 | ||
|
|
ceb54c94a4 | ||
|
|
212f9019ba | ||
|
|
200d49489d | ||
|
|
13301349ae | ||
|
|
750cce1334 | ||
|
|
a0bac3925d | ||
|
|
6a58b8d00f | ||
|
|
9f12cc6022 | ||
|
|
de36c79a2c | ||
|
|
0b8f537d6d | ||
|
|
75bf967279 | ||
|
|
a5dfac866c | ||
|
|
742882ee0b | ||
|
|
c29a5dd8c7 | ||
|
|
b192250023 | ||
|
|
fcd7fb44ce | ||
|
|
c75787321d | ||
|
|
9303c172c5 | ||
|
|
1f0170cbd0 | ||
|
|
495eda0bff | ||
|
|
c8820abfe4 | ||
|
|
cd6a1d92ad | ||
|
|
c61c8c91e5 | ||
|
|
1185c4f0a3 | ||
|
|
8e26e7250b | ||
|
|
afdac43d7b | ||
|
|
e678ca156f | ||
|
|
f0feafafc1 | ||
|
|
cb1e3a1240 | ||
|
|
2bd88d7f55 | ||
|
|
565c5e0ea7 | ||
|
|
8000c6b5e3 | ||
|
|
75b7bd8108 | ||
|
|
d2b828e8e1 | ||
|
|
e14e23dbe5 | ||
|
|
5d918e5d59 | ||
|
|
5f1b6289cf | ||
|
|
3976b96c74 | ||
|
|
a3107c7031 | ||
|
|
590deee1a8 | ||
|
|
e4e72484a5 | ||
|
|
aaa83a5873 | ||
|
|
ca0d629f17 | ||
|
|
dfe97fa079 | ||
|
|
429f5e7568 | ||
|
|
9f8aef76a8 | ||
|
|
a1bcd2aece | ||
|
|
04c3ea7a10 | ||
|
|
69cdfa9ffd | ||
|
|
980260d273 | ||
|
|
4f08636f83 | ||
|
|
c12909f78f | ||
|
|
11996bb529 | ||
|
|
fb2f54d2e2 | ||
|
|
b10947d72a | ||
|
|
9b2975fddf | ||
|
|
1ec60a3b3f | ||
|
|
f239aec83f | ||
|
|
1be587fab9 | ||
|
|
675d34c612 | ||
|
|
99bf0c8a3a | ||
|
|
a33d9ae106 | ||
|
|
b0add345eb | ||
|
|
ac9cb5cdaa | ||
|
|
9b0b16dab6 | ||
|
|
5c60bb650e | ||
|
|
fef0b3545f | ||
|
|
3a16fe140e | ||
|
|
e13c2068ad | ||
|
|
aae532547e | ||
|
|
d9b5a9b5e0 | ||
|
|
3efae28ffd | ||
|
|
daa1d4226b | ||
|
|
4a412e608a | ||
|
|
7a07971338 | ||
|
|
3be164b37b | ||
|
|
31131f0b5e | ||
|
|
b799faec22 | ||
|
|
0bd0867baf | ||
|
|
44dcf6cfe6 | ||
|
|
811ca70689 | ||
|
|
e62d67cacf | ||
|
|
ab18a9f39f | ||
|
|
6b6efc6f8a | ||
|
|
fb151f8cd6 | ||
|
|
f0366df138 | ||
|
|
91150fde9a | ||
|
|
342916d3fc | ||
|
|
3295f2808b | ||
|
|
ec8a681966 | ||
|
|
785274df6d | ||
|
|
f83936f69d | ||
|
|
9fc396072b | ||
|
|
7b8beabbf7 | ||
|
|
3b2243cf15 | ||
|
|
df1ebe9768 | ||
|
|
5ff0e209b5 | ||
|
|
82e7ce4688 | ||
|
|
001f94fac4 | ||
|
|
b428022ff0 | ||
|
|
24e2138762 | ||
|
|
a872962d36 | ||
|
|
79af13df25 | ||
|
|
5aa63e8a4a | ||
|
|
d9dacc64c8 | ||
|
|
de410ddf2d | ||
|
|
829441dd0c | ||
|
|
e23918cf57 | ||
|
|
fa58f24f6e | ||
|
|
2a62353498 | ||
|
|
b7cb725fb3 | ||
|
|
397aeefb97 | ||
|
|
91825e34a4 | ||
|
|
11fbb299b5 | ||
|
|
8257994171 | ||
|
|
5730d6c0d2 | ||
|
|
4a9c6eb3c6 | ||
|
|
4840ebfe80 | ||
|
|
9ef4ed15bb | ||
|
|
a75ba3c057 | ||
|
|
d0bcd5d03e | ||
|
|
33847a329d | ||
|
|
a556024d4c | ||
|
|
b859cdcd98 | ||
|
|
63b3efb1c1 | ||
|
|
340ddbdd9f | ||
|
|
5c7ed677d2 | ||
|
|
7470fef082 | ||
|
|
a01af62dff | ||
|
|
c952d4ef69 | ||
|
|
850cde0309 | ||
|
|
0cad94f31e | ||
|
|
527e146761 | ||
|
|
0887b1094e | ||
|
|
78705b4ab1 | ||
|
|
123d286845 | ||
|
|
6bb4ef2339 | ||
|
|
6cdeb7bc47 | ||
|
|
d5ef98f9f1 | ||
|
|
0d46ce028c | ||
|
|
991a9b38df | ||
|
|
da22cf7a78 | ||
|
|
1fd73dce18 | ||
|
|
cd3ab1a941 | ||
|
|
90fe04900b | ||
|
|
380f7e94ea | ||
|
|
2a116c3ce1 | ||
|
|
0d52aec96d | ||
|
|
3de0455110 | ||
|
|
2592041985 | ||
|
|
60c4e210fe | ||
|
|
4aced036f8 | ||
|
|
2c8b85c3e0 | ||
|
|
8a62be2ac3 | ||
|
|
46d482071a | ||
|
|
a29fe86268 | ||
|
|
18117848d9 | ||
|
|
b8a6510b88 | ||
|
|
eb8bc59778 | ||
|
|
987fcdda07 | ||
|
|
113fad9e82 | ||
|
|
0015128e15 | ||
|
|
e316e552ac | ||
|
|
2fceec51e8 | ||
|
|
c378cdbc2e | ||
|
|
6708993fb2 | ||
|
|
9ff5350de3 | ||
|
|
2f0b2c44f3 | ||
|
|
af3b2aba73 | ||
|
|
f169159b53 | ||
|
|
09fc37682b | ||
|
|
00c3ad8c3e | ||
|
|
07fbd9e7d5 | ||
|
|
b06ec9b209 | ||
|
|
95fefe1bc4 | ||
|
|
b6266b4060 | ||
|
|
b3781bc08f | ||
|
|
7d352bcfbc | ||
|
|
7819ec2df4 | ||
|
|
39e9e5a42c | ||
|
|
b0f30485a1 | ||
|
|
434531ef13 | ||
|
|
622f09af12 | ||
|
|
a09458cecd | ||
|
|
d1961d355b | ||
|
|
7957d40981 | ||
|
|
11c33b8007 | ||
|
|
50ebc1abbc | ||
|
|
7a9e42a895 | ||
|
|
6b1d6cfd96 | ||
|
|
3debbfd114 | ||
|
|
a8136afac4 | ||
|
|
1648ad9543 | ||
|
|
2476dd7c17 | ||
|
|
51dfece057 | ||
|
|
31790a1a21 | ||
|
|
e7c6db4031 | ||
|
|
dccd98d982 | ||
|
|
b4998a9d5d | ||
|
|
6550ed32a3 | ||
|
|
9fbb426465 | ||
|
|
189c4efb7d | ||
|
|
824c95a32e | ||
|
|
d658a420f7 | ||
|
|
9ae4d3d846 | ||
|
|
e97ebf18d6 | ||
|
|
bc32214571 | ||
|
|
cb9e13c9a5 | ||
|
|
cd08af6629 | ||
|
|
bb88423f5f | ||
|
|
965c374bae | ||
|
|
1c3e198e18 | ||
|
|
4077cf034c | ||
|
|
4218042772 | ||
|
|
aafaf9763b | ||
|
|
8d654cc4c9 | ||
|
|
9ef9ef633c | ||
|
|
10397671d4 | ||
|
|
44a36fa845 | ||
|
|
4541352fbb | ||
|
|
3c596d8e92 | ||
|
|
5b7ea0ba21 | ||
|
|
2d751cc079 | ||
|
|
5eb35aeadc | ||
|
|
9bd9d598ab | ||
|
|
ebf72efd9e | ||
|
|
78e808c20b | ||
|
|
2868e7c030 | ||
|
|
5ab55ffa66 | ||
|
|
612575150c | ||
|
|
31f62e2c61 | ||
|
|
4762f84020 | ||
|
|
7dfb676296 | ||
|
|
b023aedca6 | ||
|
|
445ec3286a | ||
|
|
873a4e3569 | ||
|
|
e2f6793ee4 | ||
|
|
f3f7b526d3 | ||
|
|
19dea3a581 | ||
|
|
1ea8715c1e | ||
|
|
a8754ffc24 | ||
|
|
4ee11fb41d | ||
|
|
1e40c34058 | ||
|
|
633fa47b46 | ||
|
|
1fba05dcc9 | ||
|
|
0741fb6238 | ||
|
|
d63a7732ba | ||
|
|
1aac8bba21 | ||
|
|
e5e9d4b18b | ||
|
|
15dc9767c6 | ||
|
|
d53ff2fabe | ||
|
|
150ecc6f16 | ||
|
|
3d25ce0123 | ||
|
|
c1c08352e7 | ||
|
|
d50d5e01b6 | ||
|
|
663fdc1a04 | ||
|
|
7e4dea7229 | ||
|
|
6e6e67e26b | ||
|
|
a6e79d56e8 | ||
|
|
86350abd5c | ||
|
|
aa8fefb67b | ||
|
|
bb972404fb | ||
|
|
3694c74812 | ||
|
|
db3d19c6f1 | ||
|
|
8e4f073438 | ||
|
|
44e4fd905e | ||
|
|
42761a30bf | ||
|
|
501cffa10a | ||
|
|
e293fd03ad | ||
|
|
f4279e1a41 | ||
|
|
af0bab5bac | ||
|
|
06cdbd2788 | ||
|
|
7c4877fa9b | ||
|
|
4a5e5b285d | ||
|
|
6cd97fc2c4 | ||
|
|
d9fbeff23c | ||
|
|
ba1985f8d9 | ||
|
|
d36ffb2b12 | ||
|
|
f397aad663 | ||
|
|
158c9d4c20 | ||
|
|
a5e1c55d30 | ||
|
|
9263fba4d9 | ||
|
|
d8533ca9dc | ||
|
|
d39c422a25 | ||
|
|
a207ef54c2 | ||
|
|
5a776c3350 | ||
|
|
3ba733b607 | ||
|
|
0ecfcb841b | ||
|
|
00b02522a2 | ||
|
|
5049cb97d7 | ||
|
|
f546633dfc | ||
|
|
b5646426e9 | ||
|
|
c82168931c | ||
|
|
ad95a1f1c7 | ||
|
|
fcfabb0e3e | ||
|
|
6163ec73b0 | ||
|
|
47f4f62147 | ||
|
|
8faaae8b36 | ||
|
|
8fb143b4fb | ||
|
|
0e1a34b93a | ||
|
|
f1fa58b5f6 | ||
|
|
fc11e72647 | ||
|
|
85b0370d8b | ||
|
|
0ff1d7b794 | ||
|
|
ea59fd64d5 | ||
|
|
314ea3f842 | ||
|
|
f81b067643 | ||
|
|
2f10a6c719 | ||
|
|
b6da3d7569 | ||
|
|
967b97a602 | ||
|
|
9d6d6d20bf | ||
|
|
7753139d71 | ||
|
|
60ba0fa42b | ||
|
|
5b8a2c5c82 | ||
|
|
6d942a8554 | ||
|
|
c008da801f | ||
|
|
3d4488074b | ||
|
|
641571f959 | ||
|
|
4422dbd39d | ||
|
|
74979f153d | ||
|
|
70a70235d1 | ||
|
|
51f62659d7 | ||
|
|
2bf4c3834e | ||
|
|
d55a124b1c | ||
|
|
db92aeb20d | ||
|
|
485a8a3318 | ||
|
|
0de5776830 | ||
|
|
e95939f508 | ||
|
|
3511de6332 | ||
|
|
12db020655 | ||
|
|
2d8f41c08b | ||
|
|
931413fd1b | ||
|
|
3916d7a617 | ||
|
|
39dad999ae | ||
|
|
431bd5a623 | ||
|
|
395d5ff1ee | ||
|
|
3510e8d5bf | ||
|
|
e24668c977 | ||
|
|
9481ebd41d | ||
|
|
b8d04f7b80 | ||
|
|
b35ca70fcc | ||
|
|
72f60d44dc | ||
|
|
cd52a48021 | ||
|
|
25d7215712 | ||
|
|
d7b9a197c6 | ||
|
|
8f4159432a | ||
|
|
83b0bf637f | ||
|
|
599e7ab4b9 | ||
|
|
fac9a4398f | ||
|
|
658b6f811c | ||
|
|
892764dfa0 | ||
|
|
3d8c04992f | ||
|
|
b6a46be4b2 | ||
|
|
b109b78974 | ||
|
|
54404a560d | ||
|
|
eb8702215d | ||
|
|
09b4ea0c28 | ||
|
|
29f71b2433 | ||
|
|
a060613570 | ||
|
|
63f3a5d81f | ||
|
|
ba0e04a597 | ||
|
|
9241d313c9 | ||
|
|
914e99087b | ||
|
|
59ed67c745 | ||
|
|
38aa306e5a | ||
|
|
280d0fa1d0 | ||
|
|
bdecd14e03 | ||
|
|
e6de8fcbe3 | ||
|
|
b6e27108a8 | ||
|
|
61245ed728 | ||
|
|
5366671115 | ||
|
|
99b66b9f41 | ||
|
|
606b54b4ef | ||
|
|
8987d2e267 | ||
|
|
55e9a68f3a | ||
|
|
6bbdc2d2c3 | ||
|
|
b686e63fad | ||
|
|
7ede049f63 | ||
|
|
207941eb7d | ||
|
|
273604729a | ||
|
|
0a55b13431 | ||
|
|
1f6a7fe315 | ||
|
|
0e36d1578f | ||
|
|
5529aa85a3 | ||
|
|
11938006ab | ||
|
|
79605b667f | ||
|
|
cc4948b617 | ||
|
|
541d3c69a9 | ||
|
|
d86cec1f66 | ||
|
|
54e2b7ef84 | ||
|
|
56d6294594 | ||
|
|
5b7ff7c4eb | ||
|
|
a33351fa34 | ||
|
|
e6e040904f | ||
|
|
d08161d184 | ||
|
|
24f344b596 | ||
|
|
c12f13f6f4 | ||
|
|
6bb889ccf5 | ||
|
|
833baae46d | ||
|
|
7f57f52b74 | ||
|
|
386720bff3 | ||
|
|
69c17e3075 | ||
|
|
f45015f6de | ||
|
|
b9bd1f9f28 | ||
|
|
cdd4904a18 | ||
|
|
a8397414f4 | ||
|
|
5f53fffcaf | ||
|
|
b95cb07f9b | ||
|
|
d3d07ceb7c | ||
|
|
6d8320203d | ||
|
|
bf6472036e | ||
|
|
d77ef59f9d | ||
|
|
970aaa2e57 | ||
|
|
03da059ae2 | ||
|
|
594adfc889 | ||
|
|
cc796dbe39 | ||
|
|
c823a7a3c1 | ||
|
|
b2d05d99a3 | ||
|
|
79e2dbac25 | ||
|
|
3a2cdbe44d | ||
|
|
5f2bd52309 | ||
|
|
f7b248bf5a | ||
|
|
d49452e337 | ||
|
|
8a84b83c69 | ||
|
|
db8bc6b51a | ||
|
|
787f76d118 | ||
|
|
be99dddfef | ||
|
|
677a48f9c7 | ||
|
|
b29bfaef34 | ||
|
|
1e2435cd6c | ||
|
|
4d90c39243 | ||
|
|
50b0adbcb0 | ||
|
|
8b342243ff | ||
|
|
cc572d67fa | ||
|
|
2ca0e27b65 | ||
|
|
17854452e3 | ||
|
|
5794f784ad | ||
|
|
23cde80e68 | ||
|
|
621cf8e8a2 | ||
|
|
70ce39b472 | ||
|
|
a102daae05 | ||
|
|
7ee755f4e9 | ||
|
|
2e0215b30c | ||
|
|
e42110fb84 | ||
|
|
994c693c11 | ||
|
|
4b9dc7259d | ||
|
|
c9c276c436 | ||
|
|
180aa32e7e | ||
|
|
7b1ba1fe42 | ||
|
|
018d19062e | ||
|
|
cbb8b77fc6 | ||
|
|
8ff6949ef4 | ||
|
|
5183dc930e | ||
|
|
ac4460b1b2 | ||
|
|
108e43dc27 | ||
|
|
37305c1b3c | ||
|
|
c2e6df02f4 | ||
|
|
6d1b07ef54 | ||
|
|
0fbb448376 | ||
|
|
b42231c45d | ||
|
|
3a4bfbcd12 | ||
|
|
8848114a26 | ||
|
|
c896ebbf3a | ||
|
|
3f0d35cc2a | ||
|
|
858aeb1947 | ||
|
|
549a09aee8 | ||
|
|
1303e11230 | ||
|
|
5f096cab2d | ||
|
|
605cfa59e7 | ||
|
|
edcb787809 | ||
|
|
b9d664e1b3 | ||
|
|
13bbcc1cd8 | ||
|
|
ce516ad8d9 | ||
|
|
220eb7f54e | ||
|
|
cf4ba59e59 | ||
|
|
25d35cf870 | ||
|
|
e4a4796908 | ||
|
|
414fd663e2 | ||
|
|
96e8a4755a | ||
|
|
1eb6f1f06b | ||
|
|
b179c54947 | ||
|
|
7b5f770873 | ||
|
|
3e7353e939 | ||
|
|
098c680d2a | ||
|
|
3d850f0210 | ||
|
|
c907e9933d | ||
|
|
d7aaa9ac39 | ||
|
|
ae98106761 | ||
|
|
21db91c397 | ||
|
|
9c8473c587 | ||
|
|
5dcb3b676a | ||
|
|
79ebe242b4 | ||
|
|
57b1a39baf | ||
|
|
520607bdb2 | ||
|
|
3b7d531b54 | ||
|
|
5fe496b9b0 | ||
|
|
973083cfc5 | ||
|
|
42f0b6a7ba | ||
|
|
c0b16a83b3 | ||
|
|
5884fce40c | ||
|
|
c5efef6f25 | ||
|
|
d016d951fa | ||
|
|
c604e197d8 | ||
|
|
2de2679f03 | ||
|
|
6b1997f92b | ||
|
|
2491b30741 | ||
|
|
290d5740c7 | ||
|
|
a970d2e93f | ||
|
|
301dc0f845 | ||
|
|
7ced09ebe4 | ||
|
|
779b2b2518 | ||
|
|
a96d6ac977 | ||
|
|
3aaaae72fa | ||
|
|
010787a578 | ||
|
|
750ef22a76 | ||
|
|
6d7347beed | ||
|
|
bbd39880b7 | ||
|
|
dfc6a4a61d | ||
|
|
a8898895ec | ||
|
|
1658727342 | ||
|
|
672a543919 | ||
|
|
1905bea214 | ||
|
|
cb3700fe76 | ||
|
|
7339406406 | ||
|
|
332c1d4e71 | ||
|
|
1aff19e4d6 | ||
|
|
35e8638b0f | ||
|
|
776680ee44 | ||
|
|
c32d8183b8 | ||
|
|
d0de64aaaa | ||
|
|
6de5aa8621 | ||
|
|
c07752372d | ||
|
|
22ad4512c2 | ||
|
|
efe0a47126 | ||
|
|
6d9ee886f4 | ||
|
|
87000e1002 | ||
|
|
adce1285f8 | ||
|
|
907baa60e2 | ||
|
|
dd93275836 | ||
|
|
b7d7d8e728 | ||
|
|
8377fe5aa5 | ||
|
|
31562d2472 | ||
|
|
56768bb2ae | ||
|
|
5c1333e95b | ||
|
|
ddb879447a | ||
|
|
7105ee5edc | ||
|
|
ba68da80f5 | ||
|
|
6239b52376 | ||
|
|
da1e4d55cb | ||
|
|
2362404144 | ||
|
|
ffff416244 | ||
|
|
8c1911dd4e | ||
|
|
3c6c264cfe | ||
|
|
a6946dc55e | ||
|
|
67a69dbd4a | ||
|
|
6798df27fb | ||
|
|
a6c9533168 | ||
|
|
dccaf5e781 | ||
|
|
bd832a90dc | ||
|
|
83c2f6930e | ||
|
|
a042b5572d | ||
|
|
d39a088280 | ||
|
|
4f43d829b5 | ||
|
|
33108b0e88 | ||
|
|
6ffd6b348a | ||
|
|
49a51e988a | ||
|
|
2e32644b20 | ||
|
|
71d6e31e48 | ||
|
|
8a65ef82f6 | ||
|
|
28d105ffbc | ||
|
|
888e9eb9e5 | ||
|
|
a02f1c7534 | ||
|
|
42f73b8e46 | ||
|
|
b2f49153f5 | ||
|
|
4cf29b76a2 | ||
|
|
df0f6345ab | ||
|
|
e7366fb0a5 | ||
|
|
67ae10ebf6 | ||
|
|
a6900b9f5f | ||
|
|
58e1c365c0 | ||
|
|
c7e200a9ff | ||
|
|
69e6306ddc | ||
|
|
b018df4502 | ||
|
|
bbbb81d61e | ||
|
|
70db1d079d | ||
|
|
9bd9330c52 | ||
|
|
ab1cb4269b | ||
|
|
fa647a4e36 | ||
|
|
1738cd448f | ||
|
|
f7e7ec4070 | ||
|
|
a871670c76 | ||
|
|
3c846d2c9d | ||
|
|
5ced8d392c | ||
|
|
ffcff7fe6b | ||
|
|
4a19042dc8 | ||
|
|
1fe35722ac | ||
|
|
19082aad50 | ||
|
|
46064586c0 | ||
|
|
7f12722c2d | ||
|
|
0177353712 | ||
|
|
eb7d1dc940 | ||
|
|
fbf583ec2a | ||
|
|
c402b3720b | ||
|
|
4ac5097786 | ||
|
|
7f101e6c78 | ||
|
|
ea14d4866c | ||
|
|
37271539bf | ||
|
|
757e8d9d10 | ||
|
|
fe8433aba3 | ||
|
|
3be3d5f3fb | ||
|
|
85bb6be131 | ||
|
|
0911433644 | ||
|
|
64fe8a0e05 | ||
|
|
722cd46715 | ||
|
|
97d91e0a02 | ||
|
|
883770bec3 | ||
|
|
6ba4240033 | ||
|
|
15ebe6a697 | ||
|
|
f9fe5c9a07 | ||
|
|
769cef7c28 | ||
|
|
1819193a11 | ||
|
|
001d591b85 | ||
|
|
9a3ff60ba5 | ||
|
|
0f90023382 | ||
|
|
304f84d754 | ||
|
|
9517f415e1 | ||
|
|
4717a0784f | ||
|
|
9dd2039818 | ||
|
|
5ae78b8226 | ||
|
|
81795c6b67 | ||
|
|
9a5c9826e6 | ||
|
|
ffe8e1fd9f | ||
|
|
524dc39215 | ||
|
|
7563ef8f61 | ||
|
|
9b8d20caee | ||
|
|
952d135bd2 | ||
|
|
105708dff3 | ||
|
|
06249ed306 | ||
|
|
9c6161c020 | ||
|
|
f8d96d0795 | ||
|
|
cf42d62578 | ||
|
|
b9ac53f9e6 | ||
|
|
a66c7fa770 | ||
|
|
f9df998a75 | ||
|
|
9bd79a4d8a | ||
|
|
1214579619 | ||
|
|
7be09cc5b0 | ||
|
|
3d36e9f063 | ||
|
|
10de0a45e0 | ||
|
|
94440de089 | ||
|
|
923b477066 | ||
|
|
bd30bbc219 | ||
|
|
5a75b73ec9 | ||
|
|
0afb135813 | ||
|
|
13012d1bc1 | ||
|
|
15ed500b3e | ||
|
|
9eca5f3236 | ||
|
|
993171538e | ||
|
|
e6c8162ecb | ||
|
|
b3595fe39d | ||
|
|
cf724a3d49 | ||
|
|
ba746e340e | ||
|
|
6240393eb4 | ||
|
|
ce62b9b66f | ||
|
|
ceddc1aca4 | ||
|
|
ff26c3a539 | ||
|
|
a94fcbc8d8 | ||
|
|
0ec3addd5e | ||
|
|
c0f7ed4d7c | ||
|
|
3c7334f11d | ||
|
|
dc95036bfa | ||
|
|
4b2e55c1eb | ||
|
|
a7cc51547b | ||
|
|
f338c6f884 | ||
|
|
c3c5716c26 | ||
|
|
8442a8fb38 | ||
|
|
9d98c71dfb | ||
|
|
8ecd1aafb9 | ||
|
|
8dc8d284c6 | ||
|
|
58f68d6494 | ||
|
|
da6314b7fe | ||
|
|
56e2f10c3b | ||
|
|
5c6a17cb13 | ||
|
|
bce08b7d64 | ||
|
|
c9a94d3161 | ||
|
|
f4697af90a | ||
|
|
28f330907f | ||
|
|
5713a77f31 | ||
|
|
915314340f | ||
|
|
274a5ac196 | ||
|
|
c1469fda35 | ||
|
|
acacdfbfb7 | ||
|
|
42eabe9279 | ||
|
|
1f57367409 | ||
|
|
62cdca974e | ||
|
|
518292df9f | ||
|
|
3c8a2671e8 | ||
|
|
cd3464b511 | ||
|
|
4c1b88b379 | ||
|
|
fbb0f0fad9 | ||
|
|
bb5de25caa | ||
|
|
b771cb15d1 | ||
|
|
075e2f3142 | ||
|
|
876699b347 | ||
|
|
76559f6767 | ||
|
|
232aec3d1b | ||
|
|
ed66996b02 | ||
|
|
7dcdf4e1dc | ||
|
|
3a3e9f68af | ||
|
|
68a37857a1 | ||
|
|
871b5c49d4 | ||
|
|
a4e0d6a278 | ||
|
|
e4bac090ff | ||
|
|
e0f02f3e56 | ||
|
|
4c547adf37 | ||
|
|
5a19bd31e2 | ||
|
|
bcf0b165f2 | ||
|
|
7aee917872 | ||
|
|
11c92093cd | ||
|
|
e5cba7d84d | ||
|
|
a4eb4f2a1d | ||
|
|
6866cc7469 | ||
|
|
8f2a070815 | ||
|
|
123f4bc55e | ||
|
|
1b2b0f5cf6 | ||
|
|
468a6f9637 | ||
|
|
9b843e3054 | ||
|
|
63ba2e3b19 | ||
|
|
bd05205fb5 | ||
|
|
c8849540ae | ||
|
|
d4f6f49465 | ||
|
|
18047ca74d | ||
|
|
fcc8bb96a0 | ||
|
|
6c23e379fa | ||
|
|
143993fe83 | ||
|
|
0384443774 | ||
|
|
2c8617c105 | ||
|
|
cfeb8cade7 | ||
|
|
077bcd45d1 | ||
|
|
74e194a034 | ||
|
|
507be05fb4 | ||
|
|
88fae24525 | ||
|
|
775907f542 | ||
|
|
c037afa409 | ||
|
|
461fe237c8 | ||
|
|
93582e53a8 | ||
|
|
b90e1d427f | ||
|
|
405a3aa086 | ||
|
|
12e3d414f2 | ||
|
|
9ef1ae68b7 | ||
|
|
dc66c50d66 | ||
|
|
ede9f6a7e6 | ||
|
|
795f71a8c3 | ||
|
|
51708075ff | ||
|
|
b1b85d030f | ||
|
|
21d7f8085d | ||
|
|
a3b78fc6c0 | ||
|
|
b84110a871 | ||
|
|
a0d2de1c80 | ||
|
|
f0b4233e4c | ||
|
|
f87a52efea | ||
|
|
7b33e91f07 | ||
|
|
8e1e5c633e | ||
|
|
72b25292d2 | ||
|
|
71f02eb511 | ||
|
|
a7ba05ce0c | ||
|
|
e83b11e907 | ||
|
|
1cc4ba6f73 | ||
|
|
aca77d7aea | ||
|
|
8dd6140056 | ||
|
|
37b0a24dc5 | ||
|
|
afb491ab67 | ||
|
|
81700c17b5 | ||
|
|
945bddcd39 | ||
|
|
949ff0ea1c | ||
|
|
9d1218115c | ||
|
|
b40f47f7f7 | ||
|
|
59b52adb86 | ||
|
|
9871581d86 | ||
|
|
77b9579de7 | ||
|
|
700558ecd7 | ||
|
|
2d2ef681c2 | ||
|
|
52c904eb0b | ||
|
|
ebc45dbc0a | ||
|
|
ee16635787 | ||
|
|
a706601495 | ||
|
|
eac4a90f46 | ||
|
|
0733f6464b | ||
|
|
9c7058176b | ||
|
|
ee5cd982c0 | ||
|
|
7616584e2b | ||
|
|
b515a9b697 | ||
|
|
769368bf28 | ||
|
|
5e0fb5d0bb | ||
|
|
d83d9b3b41 | ||
|
|
7dd6612411 | ||
|
|
9cded2a83c | ||
|
|
b35dcf8e68 | ||
|
|
72e6065036 | ||
|
|
adc78ca04a | ||
|
|
13644b4a69 | ||
|
|
47a1e593b2 | ||
|
|
6db3338725 | ||
|
|
9e3f4427c0 | ||
|
|
2aff00cb59 | ||
|
|
bbb297cb31 | ||
|
|
d9555a81d3 | ||
|
|
728e9eca0a | ||
|
|
ccc754ec69 | ||
|
|
afb2857d03 | ||
|
|
6803f0a8bd | ||
|
|
8b52ff7f44 | ||
|
|
d0311c4387 | ||
|
|
9acf660f21 | ||
|
|
da2f2f073a | ||
|
|
b0e477fd13 | ||
|
|
35b4f93c46 | ||
|
|
8d75c4bc0a | ||
|
|
9ca1cdda01 | ||
|
|
12e20b7110 | ||
|
|
27ae669014 | ||
|
|
ea74f7bb72 | ||
|
|
060021fe06 | ||
|
|
59a8c993ac | ||
|
|
f890972aaa | ||
|
|
c5664c504f | ||
|
|
e409564b05 | ||
|
|
735742faaf | ||
|
|
386a14e974 | ||
|
|
1c740ad322 | ||
|
|
ea75039b8c | ||
|
|
438f30e62c | ||
|
|
f2d61c731a | ||
|
|
5f35f580e1 | ||
|
|
341eee1fd0 | ||
|
|
3de2a40b49 | ||
|
|
e9dc21eb40 | ||
|
|
68d62bc30b | ||
|
|
e2f4516697 | ||
|
|
859920ff9e | ||
|
|
b3daf4585c | ||
|
|
6b13b3a897 | ||
|
|
de11a16eb0 | ||
|
|
a0930b9733 | ||
|
|
ab9c6a1720 | ||
|
|
7cfc492ba1 | ||
|
|
8af4d22658 | ||
|
|
5e0caae42c | ||
|
|
bbc394363d | ||
|
|
adf6f8e87c | ||
|
|
48a031f15e | ||
|
|
66b81a35f7 | ||
|
|
44b880eb75 | ||
|
|
b2ba56547d | ||
|
|
fe6ea1794f | ||
|
|
78e322a405 | ||
|
|
e1f459a248 | ||
|
|
d104a9f9ac | ||
|
|
37991418c0 | ||
|
|
8ed57cc330 | ||
|
|
8dc0c4a33b | ||
|
|
ebe2f99525 | ||
|
|
c439d5f595 | ||
|
|
eb88dcece6 | ||
|
|
af40aed66e | ||
|
|
597f18b26d | ||
|
|
1085a07c7a | ||
|
|
e3a90b1da4 | ||
|
|
db4affeec7 | ||
|
|
14b9ed502b | ||
|
|
b32fe7a6d0 | ||
|
|
ed0f3fd04e | ||
|
|
52cd3fdab7 | ||
|
|
9dc4c5f4ed | ||
|
|
585593e8a8 | ||
|
|
7e626287a9 | ||
|
|
6830aab7ff | ||
|
|
e47ae41164 | ||
|
|
acba8cc7c5 | ||
|
|
65f1fd4fc9 | ||
|
|
7d8b42149c | ||
|
|
1b4a8dafe3 | ||
|
|
9b3826910e | ||
|
|
edd6d8fd46 | ||
|
|
f6340c05b5 | ||
|
|
3b6368f7c9 | ||
|
|
a3097fa708 | ||
|
|
907b0d29f3 | ||
|
|
aee978c650 | ||
|
|
8bed89afce | ||
|
|
c75d58aeda | ||
|
|
42718d0e2c | ||
|
|
5a5bf88bc2 | ||
|
|
1ca8cb2a9e | ||
|
|
96b02e7c5f | ||
|
|
0702033093 | ||
|
|
bf72796bdd | ||
|
|
4943610f0b | ||
|
|
3b33880cb0 | ||
|
|
4aa30899d4 | ||
|
|
eb042481ef | ||
|
|
5b839ca2bd | ||
|
|
7310cb02c3 | ||
|
|
b625d8c7eb | ||
|
|
ba660eeefe | ||
|
|
609b0ce86c | ||
|
|
f63ebbdef8 | ||
|
|
1fa91212a2 | ||
|
|
f215087bd5 | ||
|
|
52c2f424e2 | ||
|
|
7cd186e10e | ||
|
|
c762d9a3a1 | ||
|
|
a6b6c1a7e8 | ||
|
|
6aedc739a0 | ||
|
|
b7ec6f24d2 | ||
|
|
79a0b16fb8 | ||
|
|
fda3ea30e8 | ||
|
|
789b0e5103 | ||
|
|
ba21728b5e | ||
|
|
2b95ec607c | ||
|
|
221a078cbb | ||
|
|
66022716b3 | ||
|
|
4ce42a7d6b | ||
|
|
4d13676760 | ||
|
|
5f443844fd | ||
|
|
93cbd3d826 | ||
|
|
f263d49f01 | ||
|
|
213cbcba2e | ||
|
|
36c1c0d51a | ||
|
|
c179b43f53 | ||
|
|
9f684786a2 | ||
|
|
cc8d44639d | ||
|
|
40a13b98a1 | ||
|
|
c9f95fda05 | ||
|
|
5a7219b854 | ||
|
|
c08e3e5427 | ||
|
|
651b3c72f6 | ||
|
|
dec1806df0 | ||
|
|
6df01f148a | ||
|
|
09dbb306ef | ||
|
|
452ab0b4eb | ||
|
|
131728aa06 | ||
|
|
5eaeac8b9b | ||
|
|
f1375b0d1e | ||
|
|
16dfc08103 | ||
|
|
200f739366 | ||
|
|
c263edeb79 | ||
|
|
5781665dd1 | ||
|
|
4e00f429a3 | ||
|
|
e208124b28 | ||
|
|
46f528ee08 | ||
|
|
59c4acf189 | ||
|
|
9534df088a | ||
|
|
f2eaf0fb26 | ||
|
|
1e598415e0 | ||
|
|
103ea5e099 | ||
|
|
dcc36e745e | ||
|
|
5434f4371c | ||
|
|
576c31306f | ||
|
|
f6714f00d9 | ||
|
|
470f06072b | ||
|
|
a4de106c91 | ||
|
|
c07d2b55e5 | ||
|
|
bc5d2d5089 | ||
|
|
3a6fecf3bc | ||
|
|
d49dc149d5 | ||
|
|
68b4cdf5e4 | ||
|
|
c402ce0ca3 | ||
|
|
f5490e2be5 | ||
|
|
d384bbb935 | ||
|
|
cbc35af605 | ||
|
|
5d84a982db | ||
|
|
2d0414f5cb | ||
|
|
21742c7d73 | ||
|
|
291aaf7bf6 | ||
|
|
07bc4333c7 | ||
|
|
ea0698786f | ||
|
|
c5cc9be0ba | ||
|
|
64c484ab3d | ||
|
|
4b4e488737 | ||
|
|
ab21113d69 | ||
|
|
8ff4032b2f | ||
|
|
d8f7b20b4a | ||
|
|
13fb0de4a3 | ||
|
|
724269eafb | ||
|
|
07d18b8dd9 | ||
|
|
521bf35c9e | ||
|
|
7324b217bf | ||
|
|
bf59a55cd5 | ||
|
|
dd1e4dd5d8 | ||
|
|
44b4bc16de | ||
|
|
0d2a096061 | ||
|
|
5d339f2f6e | ||
|
|
3ea8fb7c42 | ||
|
|
1f8d491215 | ||
|
|
ee3a0537d1 | ||
|
|
f87562ca69 | ||
|
|
922ea12f6c | ||
|
|
7919b0886f | ||
|
|
4c274f0d66 | ||
|
|
e20026a8ae | ||
|
|
549a36c631 | ||
|
|
7fb4f629c3 | ||
|
|
18e1207070 | ||
|
|
891e70aa43 | ||
|
|
3e2becb70d | ||
|
|
a388663b9f | ||
|
|
c2acaa0049 | ||
|
|
1f68d44d7b | ||
|
|
b634276b44 | ||
|
|
3e0864f704 | ||
|
|
a285e26e08 | ||
|
|
b746d9cf31 | ||
|
|
29cf8e4078 | ||
|
|
317a3d36a8 | ||
|
|
9eac8ecc77 | ||
|
|
706a021f5e | ||
|
|
0904331e8a | ||
|
|
52f179fd46 | ||
|
|
cb2d65a8b2 | ||
|
|
f7f3f5ded4 | ||
|
|
76ea396d29 | ||
|
|
ab60fdaabd | ||
|
|
675b3ee1e0 | ||
|
|
98ab8d4d69 | ||
|
|
24d47aab16 | ||
|
|
e64f758109 | ||
|
|
2c6d639255 | ||
|
|
25ebe1883f | ||
|
|
626acdb323 | ||
|
|
80af5cb76b | ||
|
|
b6f869575f | ||
|
|
630d9cb5ac | ||
|
|
e41876db2d | ||
|
|
b00da1c4f9 | ||
|
|
8aaf6590a4 | ||
|
|
de84862c74 | ||
|
|
632daf9386 | ||
|
|
fd2da0a361 | ||
|
|
da71721516 | ||
|
|
98c7b39287 | ||
|
|
8a39fcf7b4 | ||
|
|
e43c79dffd | ||
|
|
2d47b2c52e | ||
|
|
8d2e46895d | ||
|
|
ddadbdf822 | ||
|
|
18b2858b97 | ||
|
|
33830b7983 | ||
|
|
d5673842d7 | ||
|
|
d0683d44f0 | ||
|
|
830c084048 | ||
|
|
fe97fa79bf | ||
|
|
4acb3dd810 | ||
|
|
968e70e576 | ||
|
|
1d64aceb30 | ||
|
|
aeca02b9ab | ||
|
|
1d74db337f | ||
|
|
244158f375 | ||
|
|
9a2b6b3c8e | ||
|
|
239115bbba | ||
|
|
0d6b1823fb | ||
|
|
2f6ea9a0dc | ||
|
|
3298678099 | ||
|
|
0e1f2a11fd | ||
|
|
c00e9dbfb0 | ||
|
|
551e805f50 | ||
|
|
43f519778e | ||
|
|
dec682ea45 | ||
|
|
94d064dac7 | ||
|
|
78c1ccacec | ||
|
|
5c1977ea86 | ||
|
|
8c900d49f8 | ||
|
|
98f7636c6f | ||
|
|
dfca6ccb96 | ||
|
|
6bdbd2f704 | ||
|
|
7f4617b2b7 | ||
|
|
476a34acad | ||
|
|
fb845599d4 | ||
|
|
eb293c1ebf | ||
|
|
1de5bcf429 | ||
|
|
43628f0e2f | ||
|
|
59097eb7dc | ||
|
|
3497c2d7d6 | ||
|
|
6e9b89982a | ||
|
|
97108f2e28 | ||
|
|
72ddd79a58 | ||
|
|
e7971dcf4a | ||
|
|
963745363d | ||
|
|
1b3bdda93a | ||
|
|
fbc3710beb | ||
|
|
2b7d26b4ca | ||
|
|
9b847d6ff6 | ||
|
|
18184f650e | ||
|
|
9734874434 | ||
|
|
069b6631a0 | ||
|
|
f043ef99e8 | ||
|
|
8d96c39083 | ||
|
|
2e0ee131fc | ||
|
|
9a2e0c9a0d | ||
|
|
498f3d02ee | ||
|
|
f58ff1d69e | ||
|
|
db3b3ecf04 | ||
|
|
8f1283523e | ||
|
|
f6af8350ae | ||
|
|
8241dc034c | ||
|
|
31fc0008e5 | ||
|
|
0dc7a1c327 | ||
|
|
ad72c2f334 | ||
|
|
ba1197a9df | ||
|
|
f9d45a586c | ||
|
|
5b17d2c0d3 | ||
|
|
230c326a1a | ||
|
|
b69d746993 | ||
|
|
930e66b9f7 | ||
|
|
c1b7ee2ac9 | ||
|
|
419072041c | ||
|
|
5f79463fcf | ||
|
|
821bfec19e | ||
|
|
6e1cadf424 | ||
|
|
7bf89628db | ||
|
|
76edafeb24 | ||
|
|
ea6fe8fbab | ||
|
|
d72fd9ecbe | ||
|
|
ddc58091eb | ||
|
|
73c0e3ce07 | ||
|
|
4fcbe2a817 | ||
|
|
cf78fb842e | ||
|
|
600c69975b | ||
|
|
82dc4598ab | ||
|
|
29d5009bbc | ||
|
|
71a1311be5 | ||
|
|
8d6e473b9c | ||
|
|
2b4d250ebd | ||
|
|
432436c7f1 | ||
|
|
d8eef085c7 | ||
|
|
ec9e888ea2 | ||
|
|
fe0fbaeda6 | ||
|
|
245da10a26 | ||
|
|
957029b5b5 | ||
|
|
792bad9015 | ||
|
|
508dc26fa2 | ||
|
|
a36ff2f2e0 | ||
|
|
6dcae158f5 | ||
|
|
5a3d4e950f | ||
|
|
335d575c70 | ||
|
|
ce2857a0a9 | ||
|
|
fbc9aa336c | ||
|
|
0465d2befc | ||
|
|
84a0cc3227 | ||
|
|
cbf06bb6de | ||
|
|
5c74f7c99a | ||
|
|
bd169b9ec9 | ||
|
|
1beb35eb96 | ||
|
|
461c6113dc | ||
|
|
f19681cd5f | ||
|
|
f2ef2c3c1e | ||
|
|
867202beb4 | ||
|
|
78719d212f | ||
|
|
629d107e91 | ||
|
|
2aa8589ea4 | ||
|
|
4836dd7b6f | ||
|
|
6c33275e83 | ||
|
|
1bbe37282f | ||
|
|
d6e4e6d576 | ||
|
|
dadf0fbb01 | ||
|
|
30f833b8c3 | ||
|
|
4f5b47d35c | ||
|
|
e00b78e4f8 | ||
|
|
d67206ebc3 | ||
|
|
f2cfce5801 | ||
|
|
02b57f851d | ||
|
|
5655cff50a | ||
|
|
da87d10b4e | ||
|
|
091a95a485 | ||
|
|
7636492524 | ||
|
|
8c84de20ea | ||
|
|
e793bcfa2d | ||
|
|
e9efde3ee5 | ||
|
|
c5b795ad09 | ||
|
|
bbf7a03137 | ||
|
|
04264fdf5b | ||
|
|
94e26abcce | ||
|
|
401a8d208d | ||
|
|
f6f9ea625c | ||
|
|
de926905d2 | ||
|
|
44540aa31a | ||
|
|
d2db348009 | ||
|
|
0d524b9c29 | ||
|
|
c603bce188 | ||
|
|
39f2bc347a | ||
|
|
8160056240 | ||
|
|
d4bae351e8 | ||
|
|
fe57f5c5e0 | ||
|
|
d316c8f6d8 | ||
|
|
0176c8b573 | ||
|
|
aa83b38894 | ||
|
|
d5ca467297 | ||
|
|
e35176c476 | ||
|
|
50a9acc00e | ||
|
|
2ff2ddc628 | ||
|
|
e52a5083a7 | ||
|
|
b3a50fe081 | ||
|
|
bef77c521b | ||
|
|
eccdda07a9 | ||
|
|
8ea9e1a724 | ||
|
|
3337cbdf9f | ||
|
|
108b975632 | ||
|
|
788be933e1 | ||
|
|
9f9c193e45 | ||
|
|
07418f614f | ||
|
|
f70f2a1e44 | ||
|
|
b0ac73dc56 | ||
|
|
7369af8e67 | ||
|
|
de576d4055 | ||
|
|
16f7726e41 | ||
|
|
2f553c9a2e | ||
|
|
a8b10ab069 | ||
|
|
bcdf7aee41 | ||
|
|
b48b9cbdaa | ||
|
|
30858245af | ||
|
|
233666281c | ||
|
|
e83a865166 | ||
|
|
4bdbe4c9be | ||
|
|
a549c5037c | ||
|
|
64ec173cae | ||
|
|
e157425aa3 | ||
|
|
4a415790d0 | ||
|
|
9d5c28525a | ||
|
|
e9dfd43784 | ||
|
|
c1a435b6c7 | ||
|
|
528876cc8c | ||
|
|
3a099e7b9b | ||
|
|
fe91d5d3fb | ||
|
|
f1c3e71e91 | ||
|
|
d1ce7b21a6 | ||
|
|
e260796f29 | ||
|
|
2e7616866b | ||
|
|
2f252a67ad | ||
|
|
faf7ec641d | ||
|
|
bd5257315a | ||
|
|
740b6294dc | ||
|
|
45fadc852a | ||
|
|
fe7c1440fd | ||
|
|
62aa810a87 | ||
|
|
5349b862dc | ||
|
|
8f2bcc4518 | ||
|
|
872a5a75c4 | ||
|
|
4e13e98344 | ||
|
|
4545f8720c | ||
|
|
44c6d1dc46 | ||
|
|
71f833b2d7 | ||
|
|
e082e564e2 | ||
|
|
26a2b53f57 | ||
|
|
c7f6555a78 | ||
|
|
5e0f939e51 | ||
|
|
2bb18ef072 | ||
|
|
06bd90aaec | ||
|
|
6bcac0f348 | ||
|
|
0cfcd347c6 | ||
|
|
31e063ebc7 | ||
|
|
44df33fb8f | ||
|
|
92e9489dce | ||
|
|
d0035f417a | ||
|
|
a1f2dd8390 | ||
|
|
c1980de853 | ||
|
|
bd1a223379 | ||
|
|
1064e9bac1 | ||
|
|
cc060568db | ||
|
|
b0daef4f5a | ||
|
|
3d7aa54a61 | ||
|
|
4f52bab33e | ||
|
|
629747b954 | ||
|
|
8953ac2f7c | ||
|
|
819f97b06c | ||
|
|
4273d28352 | ||
|
|
b931f68574 | ||
|
|
784739070c | ||
|
|
c190f324cc | ||
|
|
e232cad1de | ||
|
|
5d7570ad4c | ||
|
|
ca012425a4 | ||
|
|
688cd4e8d6 | ||
|
|
36290aa92c | ||
|
|
c26d84348f | ||
|
|
8f3092b493 | ||
|
|
448c247ae3 | ||
|
|
434dcc7866 | ||
|
|
91d14226b8 | ||
|
|
f926119e0a | ||
|
|
92553eb838 | ||
|
|
ef0532587c | ||
|
|
6179e2c825 | ||
|
|
2a80090f37 | ||
|
|
0d9c30f10c | ||
|
|
9af188f2f6 | ||
|
|
a61356ea43 | ||
|
|
8cb5cb6d8e | ||
|
|
c3ecd898b1 | ||
|
|
d5e3ef6974 | ||
|
|
21b6355e87 | ||
|
|
31f8d10a56 | ||
|
|
af24546723 | ||
|
|
295c9c2fbf | ||
|
|
b35e963c39 | ||
|
|
3120ba0d98 | ||
|
|
c6e5835f88 | ||
|
|
1fdd3c98d9 | ||
|
|
0d972361c2 | ||
|
|
055fed9352 | ||
|
|
ee48ff08eb | ||
|
|
5ebca7a176 | ||
|
|
2fabe6078d | ||
|
|
92a53fdef0 | ||
|
|
a7adff05b8 | ||
|
|
8225704027 | ||
|
|
f1db34b744 | ||
|
|
026b7a7779 | ||
|
|
5ffd08f665 | ||
|
|
f7bd28e47f | ||
|
|
4ae75eb8f1 | ||
|
|
eeb1677c9b | ||
|
|
ee4d55eca4 | ||
|
|
133cb556ab | ||
|
|
5c48e39085 | ||
|
|
1773a1ae1b | ||
|
|
d630970f02 | ||
|
|
c0ecb52340 | ||
|
|
110dd1a267 | ||
|
|
a5615f74f9 | ||
|
|
99bb977661 | ||
|
|
f6a70ac9d6 | ||
|
|
add779496a | ||
|
|
d5ed6498dd | ||
|
|
4cb8a75def | ||
|
|
853ac73c05 | ||
|
|
85c4458f75 | ||
|
|
59749e683c | ||
|
|
a02ebfc680 | ||
|
|
bb5cee87f0 | ||
|
|
a23386310f | ||
|
|
e59d2aabee | ||
|
|
009c55d34f | ||
|
|
a349fc645a | ||
|
|
2c9656a679 | ||
|
|
461d07fa5a | ||
|
|
743b4512c7 | ||
|
|
e3269b15b7 | ||
|
|
adfa89f670 | ||
|
|
9dd7ffe335 | ||
|
|
ba21f87b10 | ||
|
|
2900350602 | ||
|
|
36a5b68e5d | ||
|
|
ada968b67a | ||
|
|
84924fa93e | ||
|
|
c1a7395c8a | ||
|
|
17451c107f | ||
|
|
bc51597b66 | ||
|
|
7da2e16ff2 | ||
|
|
7436513ee1 | ||
|
|
ff23a484ae | ||
|
|
cdfac6414b | ||
|
|
b47cf1fa90 | ||
|
|
aa51ecd73d | ||
|
|
3846f40090 | ||
|
|
d511a1003a | ||
|
|
d569092bb5 | ||
|
|
c5234558bf | ||
|
|
925ed5b5bc | ||
|
|
ea8832cf3a | ||
|
|
f924c9be21 | ||
|
|
d4f776b41d | ||
|
|
265bd08f0e | ||
|
|
7015de498b | ||
|
|
f3f8ffcdda | ||
|
|
48046c6253 | ||
|
|
c6d63a2863 | ||
|
|
97bd863323 | ||
|
|
00b193ea1e | ||
|
|
293d2192ef | ||
|
|
c1fd2e544a | ||
|
|
99d09363f8 | ||
|
|
6e4dc64be8 | ||
|
|
8226d6ab29 | ||
|
|
4dc844ab91 | ||
|
|
d104df203b | ||
|
|
94872ffa07 | ||
|
|
e99ce25b46 | ||
|
|
1ff52ba030 | ||
|
|
f9f9953103 | ||
|
|
a9505cf3bd | ||
|
|
e1abf0b307 | ||
|
|
489e3e10e5 | ||
|
|
7a866eef96 | ||
|
|
8bff463034 | ||
|
|
e7395f4fa1 | ||
|
|
06e0def526 | ||
|
|
0084323b7e | ||
|
|
3aa23d47a2 | ||
|
|
e901367ac2 | ||
|
|
4b0b504bbc | ||
|
|
6bf717a4fa | ||
|
|
1bccee4563 | ||
|
|
8d8d987f59 | ||
|
|
fc84075c92 | ||
|
|
b0d25cffc2 | ||
|
|
4989b854ac | ||
|
|
f872bdee5f | ||
|
|
3935406665 | ||
|
|
7b2c0fc98f | ||
|
|
750941c70e | ||
|
|
a533d0a3e7 | ||
|
|
65fcf10f2d | ||
|
|
e944dde8de | ||
|
|
3c612e46d2 | ||
|
|
9fff3ed893 | ||
|
|
a160c5c364 | ||
|
|
8408cef289 | ||
|
|
96110f0531 | ||
|
|
b3e11ebd38 | ||
|
|
69b3d72f3c | ||
|
|
e0e20286ae | ||
|
|
b822f9ba49 | ||
|
|
10ab9dba2d | ||
|
|
9a5a4f289c | ||
|
|
8f2cbd3948 | ||
|
|
81be9d6ae5 | ||
|
|
48921eb897 | ||
|
|
3df12e8961 | ||
|
|
2d5fcdc98f | ||
|
|
3f1cd26716 | ||
|
|
1d0ece6d4e | ||
|
|
acbd134c44 | ||
|
|
e3c8d6c3fa | ||
|
|
f2bffb12b3 | ||
|
|
44e15bf042 | ||
|
|
8522b0b926 | ||
|
|
220c8610ff | ||
|
|
dfd0c44c6b | ||
|
|
8664b78375 | ||
|
|
b0fbbe56fa | ||
|
|
a0307d1af9 | ||
|
|
6890f74ae3 | ||
|
|
aae41ac7b7 | ||
|
|
f75da019c1 | ||
|
|
e8c5ecf335 | ||
|
|
6a5a00d1ea | ||
|
|
24a6ffd1a2 | ||
|
|
1a7b80c462 | ||
|
|
c5ad75791a | ||
|
|
b9a560ad40 | ||
|
|
096f71f4d7 | ||
|
|
cd0773fba3 | ||
|
|
04c4ae6606 | ||
|
|
52106b9d5d | ||
|
|
24cec21273 | ||
|
|
819956b44e | ||
|
|
61a831cacf | ||
|
|
0c6b2f0d48 | ||
|
|
d152b047b6 | ||
|
|
9896a43ae5 | ||
|
|
ab2a7ab304 | ||
|
|
c4b8ddfbe2 | ||
|
|
f2644247bd | ||
|
|
4c277961c7 | ||
|
|
132a33a760 | ||
|
|
4391ef7e9e | ||
|
|
6de4274716 | ||
|
|
0c71768402 | ||
|
|
5d7afb8013 | ||
|
|
f69e7f54ec | ||
|
|
5e100f5034 | ||
|
|
527e9e61d3 | ||
|
|
183aeb08f0 | ||
|
|
c1ea672145 | ||
|
|
ede27ff164 | ||
|
|
d8bdab1404 | ||
|
|
96f84ddba4 | ||
|
|
1b72023799 | ||
|
|
8c7668cee6 | ||
|
|
b3b29f4238 | ||
|
|
e12f729b96 | ||
|
|
b212ce5351 | ||
|
|
8e4e3c6b8d | ||
|
|
b38b77454e | ||
|
|
b9b17484f8 | ||
|
|
d11cfb8bd7 | ||
|
|
a41a95a1d2 | ||
|
|
e55c0974e8 | ||
|
|
840b51d25c | ||
|
|
50be975e4a | ||
|
|
0d03e921e4 | ||
|
|
7d0e45382b | ||
|
|
5d626820f8 | ||
|
|
0b4646c29a | ||
|
|
e899d61d28 | ||
|
|
942bc9a2ab | ||
|
|
697c3b1915 | ||
|
|
9a973f6986 | ||
|
|
1b86155696 | ||
|
|
45f9fa03d8 | ||
|
|
406f32db80 | ||
|
|
b31cd586a8 | ||
|
|
fa68313fb4 | ||
|
|
e243864c9f | ||
|
|
3261fee3f7 | ||
|
|
eddb926fbe | ||
|
|
e4f4798fb6 | ||
|
|
cce0e59c89 | ||
|
|
24dc245515 | ||
|
|
44d0bed0d6 | ||
|
|
1a6bcf1193 | ||
|
|
6a05eba50b | ||
|
|
7b5b22da8f | ||
|
|
7fb5abe44f | ||
|
|
df44f84b89 | ||
|
|
d4246a2708 | ||
|
|
c593d36151 | ||
|
|
5e9a363267 | ||
|
|
08be351164 | ||
|
|
c42510941a | ||
|
|
ce302a1322 | ||
|
|
e45dbaa026 | ||
|
|
66bfaabe51 | ||
|
|
bf349ff085 | ||
|
|
79cfd3cbed | ||
|
|
846e0abe8f | ||
|
|
20cfe04184 | ||
|
|
26c3a5c79b | ||
|
|
be195c5861 | ||
|
|
3a17397ee2 | ||
|
|
7c9a3e4b81 | ||
|
|
0a3b83743c | ||
|
|
0231258f53 | ||
|
|
1852d8f2b7 | ||
|
|
8428599845 | ||
|
|
8ef14e6cdd | ||
|
|
891565ee0f | ||
|
|
78b5e251cf | ||
|
|
c7c771e541 | ||
|
|
baa58c8d49 | ||
|
|
33a4e5c4d3 | ||
|
|
9ad19841cb | ||
|
|
55f384bf59 | ||
|
|
5dbed74bae | ||
|
|
9cdf315f66 | ||
|
|
c67fb1152e | ||
|
|
a6fe60b47a | ||
|
|
1b75131e9e | ||
|
|
e2fb98e070 | ||
|
|
4dd638b37f | ||
|
|
0b34ed3fa7 | ||
|
|
3985f7f073 | ||
|
|
044fb85c2a | ||
|
|
3d64a13d87 | ||
|
|
2116d3c2f3 | ||
|
|
6cef547817 | ||
|
|
cf651a2e5d | ||
|
|
c88a184a0d | ||
|
|
bc9b88be63 | ||
|
|
0a9acf2f95 | ||
|
|
66a0cac464 | ||
|
|
83f7f1f988 | ||
|
|
bf65f07135 | ||
|
|
4d1f9b850b | ||
|
|
524c7ea6cd | ||
|
|
f7cf25bb62 | ||
|
|
b11dfd6b14 | ||
|
|
1697eff619 | ||
|
|
a224bb5b2b | ||
|
|
92470364ab | ||
|
|
cd9745fa8f | ||
|
|
3f03e7abbf | ||
|
|
2bbec00f2a | ||
|
|
d609f64f5b | ||
|
|
eaa51ad166 | ||
|
|
24c49074b0 | ||
|
|
3dde5de638 | ||
|
|
c747a44303 | ||
|
|
8681a5e08b | ||
|
|
3e8d001b93 | ||
|
|
205c0ee3c9 | ||
|
|
6e61391684 | ||
|
|
d4f0b7c352 | ||
|
|
fb123b4a89 | ||
|
|
15b06e644b | ||
|
|
5acf383ef6 | ||
|
|
991baeb54e | ||
|
|
53ed0193b5 | ||
|
|
43949b1272 | ||
|
|
618bedf26f | ||
|
|
6e189303f7 | ||
|
|
ec52185af3 | ||
|
|
73c8b2222c | ||
|
|
c844b5c09d | ||
|
|
3b127057fb | ||
|
|
5138f7519e | ||
|
|
0bbfe0add5 | ||
|
|
55eb398387 | ||
|
|
c8421dd575 | ||
|
|
47fccd88bc | ||
|
|
0703f72f05 | ||
|
|
03a0139f1d | ||
|
|
37beb4904e | ||
|
|
31340521c7 | ||
|
|
da784b5db4 | ||
|
|
6465a70acc | ||
|
|
91a8d57873 | ||
|
|
3f30022956 | ||
|
|
782babee91 | ||
|
|
7cc5a15c92 | ||
|
|
2bde2d04ad | ||
|
|
dd5b3a6174 | ||
|
|
fe900067cc | ||
|
|
1c814ad1f9 | ||
|
|
ef11ec0694 | ||
|
|
5c495624b3 | ||
|
|
baddcb523c | ||
|
|
5f7117097b | ||
|
|
854af68e9e | ||
|
|
f6cb17d97d | ||
|
|
5795897a3e | ||
|
|
07bd770154 | ||
|
|
dd893c514c | ||
|
|
805f1d294f | ||
|
|
d813c8e3ba | ||
|
|
3c4d6fb11c | ||
|
|
9721f5c9d5 | ||
|
|
8bbd31f16d | ||
|
|
9ab47299c1 | ||
|
|
b31fd15e6d | ||
|
|
ae8cd145b9 | ||
|
|
4cc23086fa | ||
|
|
8a4defcf67 | ||
|
|
3b96a97391 | ||
|
|
faee6eebe8 | ||
|
|
89e8995554 | ||
|
|
4c5fdc1b1b | ||
|
|
25a917cee3 | ||
|
|
67a750dcb0 | ||
|
|
28f35b4a26 | ||
|
|
25ec7d9056 | ||
|
|
f0351b9444 | ||
|
|
0634b35a72 | ||
|
|
f4bb271f1c | ||
|
|
666242082d | ||
|
|
a8d3e59401 | ||
|
|
a37653be47 | ||
|
|
90b9592c94 | ||
|
|
e3a3f68138 | ||
|
|
0bd48d17bb | ||
|
|
f6b2cafdf2 | ||
|
|
39ad9461fc | ||
|
|
59f14d89cb | ||
|
|
9ae94fb777 | ||
|
|
8ad66c8639 | ||
|
|
074bfc2fc7 | ||
|
|
c32237360d | ||
|
|
2a24013fda | ||
|
|
3b84f57857 | ||
|
|
c8a86b92ee | ||
|
|
4355caab21 | ||
|
|
e5b94d728b | ||
|
|
0a8d38b8ac | ||
|
|
8b5cf58ce8 | ||
|
|
f06c11f91a | ||
|
|
73859060cc | ||
|
|
124242cf92 | ||
|
|
a3fb960b3e | ||
|
|
143d565927 | ||
|
|
bc48e4fe40 | ||
|
|
e9867a0d11 | ||
|
|
56e2b2eeff | ||
|
|
9cbee91a1c | ||
|
|
51dfb8125c | ||
|
|
b2c3b0270a | ||
|
|
dceefc8fcf | ||
|
|
15ffcfc51e | ||
|
|
73c67df695 | ||
|
|
c4937b52fd | ||
|
|
7bedb58dce | ||
|
|
305b77fe7f | ||
|
|
f6e90789a9 | ||
|
|
26ba6ae137 | ||
|
|
fc85c2c687 | ||
|
|
8603e1b2e5 | ||
|
|
637a44ebc1 | ||
|
|
ea3cbb7c8d | ||
|
|
2dbef36163 | ||
|
|
d9ffdc0937 | ||
|
|
d6677fabf9 | ||
|
|
bef37e5715 | ||
|
|
8af278c2cc | ||
|
|
cd441102d4 | ||
|
|
08e0021858 | ||
|
|
4190605b57 | ||
|
|
fbd7807667 | ||
|
|
d72c40b3d1 | ||
|
|
0b7127d2f3 | ||
|
|
c8669d269b | ||
|
|
53b81cb9a0 | ||
|
|
793cb4ca26 | ||
|
|
6c59923fe8 |
107
.env
Normal file
107
.env
Normal file
@ -0,0 +1,107 @@
|
||||
# Zabbix images
|
||||
ZABBIX_ALPINE_IMAGE_TAG=alpine-7.4
|
||||
ZABBIX_CENTOS_IMAGE_TAG=centos-7.4
|
||||
ZABBIX_OL_IMAGE_TAG=ol-7.4
|
||||
ZABBIX_UBUNTU_IMAGE_TAG=ubuntu-7.4
|
||||
ZABBIX_RHEL_IMAGE_TAG=rhel-7.4
|
||||
ZABBIX_IMAGE_TAG_POSTFIX=-latest
|
||||
ZABBIX_LOCAL_IMAGE_TAG_POSTFIX=-local
|
||||
|
||||
ZABBIX_SERVER_MYSQL_IMAGE=zabbix/zabbix-server-mysql
|
||||
ZABBIX_SERVER_PGSQL_IMAGE=zabbix/zabbix-server-pgsql
|
||||
ZABBIX_PROXY_MYSQL_IMAGE=zabbix/zabbix-proxy-mysql
|
||||
ZABBIX_PROXY_SQLITE3_IMAGE=zabbix/zabbix-proxy-sqlite3
|
||||
ZABBIX_WEB_NGINX_MYSQL_IMAGE=zabbix/zabbix-web-nginx-mysql
|
||||
ZABBIX_WEB_APACHE_MYSQL_IMAGE=zabbix/zabbix-web-apache-mysql
|
||||
ZABBIX_WEB_NGINX_PGSQL_IMAGE=zabbix/zabbix-web-nginx-pgsql
|
||||
ZABBIX_WEB_APACHE_PGSQL_IMAGE=zabbix/zabbix-web-apache-pgsql
|
||||
ZABBIX_AGENT_IMAGE=zabbix/zabbix-agent
|
||||
ZABBIX_AGENT2_IMAGE=zabbix/zabbix-agent2
|
||||
ZABBIX_JAVA_GATEWAY_IMAGE=zabbix/zabbix-java-gateway
|
||||
ZABBIX_SNMPTRAPS_IMAGE=zabbix/zabbix-snmptraps
|
||||
ZABBIX_WEB_SERVICE_IMAGE=zabbix/zabbix-web-service
|
||||
|
||||
# Database images
|
||||
MYSQL_IMAGE=mysql
|
||||
MYSQL_IMAGE_TAG=8.4-oracle
|
||||
POSTGRESQL_IMAGE=postgres
|
||||
POSTGRESQL_IMAGE_TAG=17-alpine
|
||||
#POSTGRESQL_IMAGE=timescale/timescaledb
|
||||
#POSTGRESQL_IMAGE_TAG=2.18.1-pg17
|
||||
|
||||
BUSYBOX_IMAGE=busybox
|
||||
BUSYBOX_IMAGE_TAG=latest
|
||||
|
||||
ELASTICSEARCH_IMAGE=elasticsearch
|
||||
ELASTICSEARCH_IMAGE_TAG=latest
|
||||
|
||||
WEBDRIVER_IMAGE=selenium/hub
|
||||
WEBDRIVER_IMAGE_TAG=4.21.0
|
||||
WEBDRIVER_CHROME_IMAGE=selenium/node-chrome
|
||||
WEBDRIVER_CHROME_IMAGE_TAG=125.0
|
||||
WEBDRIVER_FIREFOX_IMAGE=selenium/node-firefox
|
||||
WEBDRIVER_FIREFOX_IMAGE_TAG=126.0
|
||||
|
||||
# Expose ports per service
|
||||
ZABBIX_SERVER_PORT=10051
|
||||
ZABBIX_PROXY_MYSQL_PORT=10071
|
||||
ZABBIX_PROXY_SQLITE3_PORT=10061
|
||||
ZABBIX_WEB_NGINX_HTTP_PORT=80
|
||||
ZABBIX_WEB_NGINX_HTTPS_PORT=443
|
||||
ZABBIX_WEB_APACHE_HTTP_PORT=8081
|
||||
ZABBIX_WEB_APACHE_HTTPS_PORT=8443
|
||||
ZABBIX_AGENT_PORT=10050
|
||||
ZABBIX_AGENT2_PORT=10060
|
||||
ZABBIX_AGENT2_STATUS_PORT=31999
|
||||
ZABBIX_JAVA_GATEWAY_PORT=10052
|
||||
ZABBIX_SNMPTRAPS_PORT=162
|
||||
ZABBIX_WEB_SERVICE_PORT=10053
|
||||
|
||||
# Network IP ranges
|
||||
FRONTEND_NETWORK_DRIVER=default
|
||||
FRONTEND_SUBNET=172.16.238.0/24
|
||||
FRONTEND_ENABLE_IPV6=false
|
||||
BACKEND_NETWORK_DRIVER=default
|
||||
BACKEND_SUBNET=172.16.239.0/24
|
||||
BACKEND_ENABLE_IPV6=false
|
||||
DATABASE_NETWORK_ENABLE_IPV6=false
|
||||
DATABASE_NETWORK_DRIVER=default
|
||||
ADD_TOOLS_NETWORK_DRIVER=default
|
||||
ADD_TOOLS_SUBNET=172.16.240.0/24
|
||||
ADD_TOOLS_ENABLE_IPV6=false
|
||||
|
||||
# Locations
|
||||
DATA_DIRECTORY=./zbx_env
|
||||
ENV_VARS_DIRECTORY=./env_vars
|
||||
|
||||
# Options
|
||||
RESTART_POLICY=unless-stopped
|
||||
|
||||
# Cache base images
|
||||
ALPINE_BASE_IMAGE=alpine:3.23
|
||||
CENTOS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal
|
||||
OL_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim
|
||||
UBUNTU_BASE_IMAGE=ubuntu:noble
|
||||
RHEL_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1
|
||||
|
||||
# Base images
|
||||
BUILD_BASE_IMAGE=zabbix-build-base
|
||||
BUILD_BASE_MYSQL_IMAGE=zabbix-build-mysql
|
||||
BUILD_BASE_PGSQL_IMAGE=zabbix-build-pgsql
|
||||
BUILD_BASE_SQLITE3_IMAGE=zabbix-build-sqlite3
|
||||
|
||||
# Operating System tags
|
||||
ALPINE_OS_TAG=Alpine
|
||||
ALPINE_OS_TAG_SHORT=alpine
|
||||
|
||||
CENTOS_OS_TAG=CentOS
|
||||
CENTOS_OS_TAG_SHORT=centos
|
||||
|
||||
OL_OS_TAG=Oracle Linux
|
||||
OL_OS_TAG_SHORT=ol
|
||||
|
||||
UBUNTU_OS_TAG=Ubuntu
|
||||
UBUNTU_OS_TAG_SHORT=ubuntu
|
||||
|
||||
RHEL_OS_TAG=Red Hat
|
||||
RHEL_OS_TAG_SHORT=rhel
|
||||
@ -1,9 +0,0 @@
|
||||
# DB_SERVER_HOST=postgres-server
|
||||
# DB_SERVER_PORT=5432
|
||||
# POSTGRES_USER=zabbix
|
||||
POSTGRES_USER=zabbix
|
||||
# POSTGRES_PASSWORD=zabbix
|
||||
POSTGRES_PASSWORD=zabbix
|
||||
# POSTGRES_DB=zabbix
|
||||
POSTGRES_DB=zabbix
|
||||
# ZBX_DBSCHEMA=public
|
||||
52
.env_prx
52
.env_prx
@ -1,52 +0,0 @@
|
||||
# ZBX_PROXYMODE=0
|
||||
# ZBX_SERVER_HOST=zabbix-server
|
||||
# ZBX_SERVER_PORT=10051
|
||||
# ZBX_HOSTNAME=zabbix-proxy-$db_type
|
||||
# ZBX_HOSTNAMEITEM=system.hostname
|
||||
# ZBX_SOURCEIP=
|
||||
# ZBX_DEBUGLEVEL=3
|
||||
# ZBX_PROXYLOCALBUFFER=0
|
||||
# ZBX_PROXYOFFLINEBUFFER=1
|
||||
# ZBX_PROXYHEARTBEATFREQUENCY=60
|
||||
# ZBX_CONFIGFREQUENCY=3600
|
||||
# ZBX_DATASENDERFREQUENCY=1
|
||||
# ZBX_STARTPOLLERS=5
|
||||
# ZBX_IPMIPOLLERS=0
|
||||
# ZBX_STARTPOLLERSUNREACHABLE=1
|
||||
# ZBX_STARTTRAPPERS=5
|
||||
# ZBX_STARTPINGERS=1
|
||||
# ZBX_STARTDISCOVERERS=1
|
||||
# ZBX_STARTHTTPPOLLERS=1
|
||||
# ZBX_JAVAGATEWAY_ENABLE=false
|
||||
# ZBX_JAVAGATEWAY=zabbix-java-gateway
|
||||
# ZBX_JAVAGATEWAYPORT=10052
|
||||
# ZBX_STARTJAVAPOLLERS=0
|
||||
# ZBX_STARTVMWARECOLLECTORS=0
|
||||
# ZBX_VMWAREFREQUENCY=60
|
||||
# ZBX_VMWAREPERFFREQUENCY=60
|
||||
# ZBX_VMWARECACHESIZE=8M
|
||||
# ZBX_VMWARETIMEOUT=10
|
||||
# ZBX_ENABLE_SNMP_TRAPS=false
|
||||
# ZBX_LISTENIP=
|
||||
# ZBX_HOUSEKEEPINGFREQUENCY=1
|
||||
# ZBX_CACHESIZE=8M
|
||||
# ZBX_STARTDBSYNCERS=4
|
||||
# ZBX_HISTORYCACHESIZE=16M
|
||||
# ZBX_HISTORYINDEXCACHESIZE=4M
|
||||
# ZBX_TIMEOUT=4
|
||||
# ZBX_TRAPPERIMEOUT=300
|
||||
# ZBX_UNREACHABLEPERIOD=45
|
||||
# ZBX_UNAVAILABLEDELAY=60
|
||||
# ZBX_UNREACHABLEDELAY=15
|
||||
# ZBX_LOGSLOWQUERIES=3000
|
||||
# ZBX_LOADMODULE="dummy1.so,dummy2.so,dummy10.so"
|
||||
# ZBX_TLSCONNECT=unencrypted
|
||||
# ZBX_TLSACCEPT=unencrypted
|
||||
# ZBX_TLSCAFILE=
|
||||
# ZBX_TLSCRLFILE=
|
||||
# ZBX_TLSSERVERCERTISSUER=
|
||||
# ZBX_TLSSERVERCERTSUBJECT=
|
||||
# ZBX_TLSCERTFILE=
|
||||
# ZBX_TLSKEYFILE=
|
||||
# ZBX_TLSPSKIDENTITY=
|
||||
# ZBX_TLSPSKFILE=
|
||||
@ -1 +0,0 @@
|
||||
# ZBX_HOSTNAME=zabbix-proxy-mysql
|
||||
46
.env_srv
46
.env_srv
@ -1,46 +0,0 @@
|
||||
# ZBX_LISTENIP=
|
||||
# ZBX_DEBUGLEVEL=3
|
||||
# ZBX_STARTPOLLERS=5
|
||||
# ZBX_IPMIPOLLERS=0
|
||||
# ZBX_STARTPOLLERSUNREACHABLE=1
|
||||
# ZBX_STARTTRAPPERS=5
|
||||
# ZBX_STARTPINGERS=1
|
||||
# ZBX_STARTDISCOVERERS=1
|
||||
# ZBX_STARTHTTPPOLLERS=1
|
||||
# ZBX_STARTTIMERS=1
|
||||
# ZBX_STARTESCALATORS=1
|
||||
ZBX_JAVAGATEWAY_ENABLE=true
|
||||
# ZBX_JAVAGATEWAY=zabbix-java-gateway
|
||||
# ZBX_JAVAGATEWAYPORT=10052
|
||||
ZBX_STARTJAVAPOLLERS=5
|
||||
# ZBX_STARTVMWARECOLLECTORS=0
|
||||
# ZBX_VMWAREFREQUENCY=60
|
||||
# ZBX_VMWAREPERFFREQUENCY=60
|
||||
# ZBX_VMWARECACHESIZE=8M
|
||||
# ZBX_VMWARETIMEOUT=10
|
||||
ZBX_ENABLE_SNMP_TRAPS=true
|
||||
# ZBX_SOURCEIP=
|
||||
# ZBX_HOUSEKEEPINGFREQUENCY=1
|
||||
# ZBX_MAXHOUSEKEEPERDELETE=5000
|
||||
# ZBX_SENDERFREQUENCY=30
|
||||
# ZBX_CACHESIZE=8M
|
||||
# ZBX_CACHEUPDATEFREQUENCY=60
|
||||
# ZBX_STARTDBSYNCERS=4
|
||||
# ZBX_HISTORYCACHESIZE=16M
|
||||
# ZBX_HISTORYINDEXCACHESIZE=4M
|
||||
# ZBX_TRENDCACHESIZE=4M
|
||||
# ZBX_VALUECACHESIZE=8M
|
||||
# ZBX_TIMEOUT=4
|
||||
# ZBX_TRAPPERIMEOUT=300
|
||||
# ZBX_UNREACHABLEPERIOD=45
|
||||
# ZBX_UNAVAILABLEDELAY=60
|
||||
# ZBX_UNREACHABLEDELAY=15
|
||||
# ZBX_LOGSLOWQUERIES=3000
|
||||
# ZBX_STARTPROXYPOLLERS=1
|
||||
# ZBX_PROXYCONFIGFREQUENCY=3600
|
||||
# ZBX_PROXYDATAFREQUENCY=1
|
||||
# ZBX_LOADMODULE="dummy1.so,dummy2.so,dummy10.so"
|
||||
# ZBX_TLSCAFILE=
|
||||
# ZBX_TLSCRLFILE=
|
||||
# ZBX_TLSCERTFILE=
|
||||
# ZBX_TLSKEYFILE=
|
||||
10
.env_web
10
.env_web
@ -1,10 +0,0 @@
|
||||
# ZBX_SERVER_HOST=zabbix-server
|
||||
# ZBX_SERVER_PORT=10051
|
||||
ZBX_SERVER_NAME=Composed installation
|
||||
# ZBX_MAXEXECUTIONTIME=600
|
||||
# ZBX_MEMORYLIMIT=128M
|
||||
# ZBX_POSTMAXSIZE=16M
|
||||
# ZBX_UPLOADMAXFILESIZE=2M
|
||||
# ZBX_MAXINPUTTIME=300
|
||||
# Timezone one of: http://php.net/manual/en/timezones.php
|
||||
# PHP_TZ=Europe/Riga
|
||||
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1 @@
|
||||
* @dotneft
|
||||
37
.github/ISSUE_TEMPLATE
vendored
Normal file
37
.github/ISSUE_TEMPLATE
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<!--- Please create issues about Zabbix images only. Zabbix official bug and feature tracker is available on https://support.zabbix.com/ -->
|
||||
<!--- Verify first that your issue is not already reported on GitHub or covered in the Wiki -->
|
||||
<!--- Have you had a look in the official Zabbix Documentation? -->
|
||||
|
||||
##### SUMMARY
|
||||
<!--- Explain the problem briefly below -->
|
||||
|
||||
|
||||
##### OS / ENVIRONMENT / Used docker-compose files
|
||||
<!--- Provide all relevant information below, e.g. Docker/Container versions, used OS and OS-versions, which docker-compose_* template used -->
|
||||
|
||||
|
||||
##### CONFIGURATION
|
||||
<!--- Consider adding information about what .env_* files you changed or add the actual docker-compose you used -->
|
||||
<!--- HINT: You can paste gist.github.com links for larger files -->
|
||||
|
||||
##### STEPS TO REPRODUCE
|
||||
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
|
||||
|
||||
<!--- Paste example commands between quotes below -->
|
||||
```yaml
|
||||
|
||||
```
|
||||
|
||||
<!--- HINT: You can paste gist.github.com links for larger files -->
|
||||
|
||||
##### EXPECTED RESULTS
|
||||
<!--- Describe what you expected to happen when running the steps above -->
|
||||
|
||||
|
||||
##### ACTUAL RESULTS
|
||||
<!--- Describe what actually happened. If possible run with extra verbosity (higher ZABBIX_LOGLEVEL) -->
|
||||
|
||||
<!--- Paste verbatim command output between quotes -->
|
||||
```paste below
|
||||
|
||||
```
|
||||
418
.github/dependabot.yml
vendored
Normal file
418
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,418 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "06:00"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent/windows
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/agent2/windows
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-base/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-base/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-base/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-base/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-base/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-mysql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-mysql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-mysql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-mysql/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-mysql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-pgsql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-pgsql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-pgsql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-pgsql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-sqlite3/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-sqlite3/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-sqlite3/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-sqlite3/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/build-sqlite3/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/java-gateway/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/java-gateway/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/java-gateway/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/java-gateway/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/java-gateway/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-mysql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-mysql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-mysql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-mysql/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-mysql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-sqlite3/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-sqlite3/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-sqlite3/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-sqlite3/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/proxy-sqlite3/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-mysql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-mysql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-mysql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-mysql/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-mysql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-pgsql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-pgsql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-pgsql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/server-pgsql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/snmptraps/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/snmptraps/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/snmptraps/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/snmptraps/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/snmptraps/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-mysql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-mysql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-mysql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-mysql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-pgsql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-pgsql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-pgsql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-apache-pgsql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-mysql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-mysql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-mysql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-mysql/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-mysql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-pgsql/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-pgsql/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-pgsql/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-nginx-pgsql/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-service/alpine
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-service/centos
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-service/ol
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-service/rhel
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: /Dockerfiles/web-service/ubuntu
|
||||
schedule:
|
||||
interval: daily
|
||||
48
.github/scripts/rhel_description.py
vendored
Normal file
48
.github/scripts/rhel_description.py
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
import sys
|
||||
import requests
|
||||
import json
|
||||
import markdown
|
||||
import os
|
||||
|
||||
repository_description = None
|
||||
|
||||
if ("DESCRIPTION_FILE" not in os.environ or len(os.environ["DESCRIPTION_FILE"]) == 0):
|
||||
print("::error::Description file environment variable is not specified")
|
||||
sys.exit(1)
|
||||
if ("PYXIS_API_TOKEN" not in os.environ or len(os.environ["PYXIS_API_TOKEN"]) == 0):
|
||||
print("::error::API token environment variable is not specified")
|
||||
sys.exit(1)
|
||||
if ("API_URL" not in os.environ or len(os.environ["API_URL"]) == 0):
|
||||
print("::error::API URL environment variable is not specified")
|
||||
sys.exit(1)
|
||||
if ("PROJECT_ID" not in os.environ or len(os.environ["PROJECT_ID"]) == 0):
|
||||
print("RedHat project ID environment variable is not specified")
|
||||
sys.exit(1)
|
||||
|
||||
if (os.path.isfile(os.environ["DESCRIPTION_FILE"] + '.html')):
|
||||
file = open(os.environ["DESCRIPTION_FILE"] + '.html', mode='r')
|
||||
repository_description = file.read()
|
||||
file.close()
|
||||
elif (os.path.isfile(os.environ["DESCRIPTION_FILE"] + '.md')):
|
||||
file = open(os.environ["DESCRIPTION_FILE"] + '.md', mode='r')
|
||||
markdown_data = file.read()
|
||||
file.close()
|
||||
repository_description=markdown.markdown(markdown_data)
|
||||
|
||||
if (repository_description is None or len(repository_description) == 0):
|
||||
print("::error::No description file found")
|
||||
sys.exit(1)
|
||||
|
||||
data = dict()
|
||||
data['container'] = dict()
|
||||
data['container']['repository_description'] = repository_description[:32768]
|
||||
|
||||
headers = {'accept' : 'application/json', 'X-API-KEY' : os.environ["PYXIS_API_TOKEN"], 'Content-Type' : 'application/json'}
|
||||
result = requests.patch(os.environ["API_URL"] + os.environ["PROJECT_ID"],
|
||||
headers = headers,
|
||||
data = json.dumps(data))
|
||||
|
||||
print("::group::Result")
|
||||
print("Response code: " + str(result.status_code))
|
||||
print("Last update date: " + json.loads(result.content)['last_update_date'])
|
||||
print("::endgroup::")
|
||||
32
.github/workflows/dependency-review.yml
vendored
Normal file
32
.github/workflows/dependency-review.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
||||
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
||||
# Once installed, if the workflow run is marked as required,
|
||||
# PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
api.github.com:443
|
||||
github.com:443
|
||||
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2
|
||||
70
.github/workflows/dockerhub_description.yml
vendored
Normal file
70
.github/workflows/dockerhub_description.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
name: DockerHub Description
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'trunk'
|
||||
paths:
|
||||
- 'Dockerfiles/*/README.md'
|
||||
- '.github/workflows/dockerhub_description.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKER_REPOSITORY: "zabbix"
|
||||
IMAGES_PREFIX: "zabbix-"
|
||||
DOCKERFILES_DIRECTORY: "./Dockerfiles"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Update description
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_REPOSITORY: "zabbix"
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
component:
|
||||
- build-base
|
||||
- build-mysql
|
||||
- build-pgsql
|
||||
- build-sqlite3
|
||||
- agent
|
||||
- agent2
|
||||
- java-gateway
|
||||
- proxy-mysql
|
||||
- proxy-sqlite3
|
||||
- server-mysql
|
||||
- server-pgsql
|
||||
- snmptraps
|
||||
- web-apache-mysql
|
||||
- web-apache-pgsql
|
||||
- web-nginx-mysql
|
||||
- web-nginx-pgsql
|
||||
- web-service
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
github.com:443
|
||||
hub.docker.com:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Update DockerHub repo description (zabbix-${{ matrix.component }})
|
||||
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ matrix.component }}
|
||||
readme-filepath: ${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.component }}/README.md
|
||||
1077
.github/workflows/images_build.yml
vendored
Normal file
1077
.github/workflows/images_build.yml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
762
.github/workflows/images_build_rhel.yml
vendored
Normal file
762
.github/workflows/images_build_rhel.yml
vendored
Normal file
@ -0,0 +1,762 @@
|
||||
name: Build images (RedHat)
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
push:
|
||||
branches:
|
||||
- '[0-9]+.[0-9]+'
|
||||
- 'trunk'
|
||||
paths:
|
||||
- 'Dockerfiles/*/rhel/*'
|
||||
- 'build.json'
|
||||
- '!**/README.md'
|
||||
- '!**/README.html'
|
||||
- '.github/workflows/images_build_rhel.yml'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish_images:
|
||||
description: 'Publish images'
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
trunk_version:
|
||||
description: 'Specify trunk major version'
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
TRUNK_ONLY_EVENT: ${{ contains(fromJSON('["schedule"]'), github.event_name) }}
|
||||
AUTO_PUSH_IMAGES: ${{ (! contains(fromJSON('["push"]'), github.event_name) && vars.AUTO_PUSH_IMAGES) || (contains(fromJSON('["workflow_dispatch"]'), github.event_name) && inputs.publish_images == 'true' ) }}
|
||||
LATEST_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
TRUNK_GIT_BRANCH: "refs/heads/trunk"
|
||||
IMAGES_PREFIX: "zabbix-"
|
||||
BASE_BUILD_NAME: "build-base"
|
||||
|
||||
MATRIX_FILE: "build.json"
|
||||
DOCKERFILES_DIRECTORY: "Dockerfiles"
|
||||
|
||||
OIDC_ISSUER: "https://token.actions.githubusercontent.com"
|
||||
IDENITY_REGEX: "https://github.com/zabbix/zabbix-docker/.github/"
|
||||
|
||||
REGISTRY: "quay.io"
|
||||
REGISTRY_NAMESPACE: "redhat-isv-containers"
|
||||
PREFLIGHT_IMAGE: "quay.io/opdev/preflight:stable"
|
||||
PFLT_LOGLEVEL: "warn"
|
||||
PFLT_ARTIFACTS: "/tmp/artifacts"
|
||||
IMAGE_DIR: "/tmp/images"
|
||||
|
||||
RHEL_BUILD: "true"
|
||||
|
||||
jobs:
|
||||
init_build:
|
||||
name: Initialize build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
outputs:
|
||||
platforms: ${{ steps.platform_list.outputs.list }}
|
||||
database: ${{ steps.database.outputs.list }}
|
||||
components: ${{ steps.components.outputs.list }}
|
||||
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
|
||||
current_branch: ${{ steps.branch_info.outputs.current_branch }}
|
||||
sha_short: ${{ steps.branch_info.outputs.sha_short }}
|
||||
secret_prefix: ${{ steps.branch_info.outputs.secret_prefix }}
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
api.github.com:443
|
||||
github.com:443
|
||||
objects.githubusercontent.com:443
|
||||
release-assets.githubusercontent.com:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: ${{ env.MATRIX_FILE }}
|
||||
|
||||
- name: Check ${{ env.MATRIX_FILE }} file
|
||||
id: build_exists
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
if [[ ! -f "$MATRIX_FILE" ]]; then
|
||||
echo "::error::File $MATRIX_FILE is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Prepare Platform list
|
||||
id: platform_list
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
platform_list=$(jq -r '.["os-linux"].rhel | @json' "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Platform List"
|
||||
echo "$platform_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$platform_list" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Prepare Database engine list
|
||||
id: database
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
database_list=$(jq -r '[.components | map_values(select(.rhel == true)) | values[].base ] | sort | unique | del(.. | select ( . == "" ) ) | @json' "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Database List"
|
||||
echo "$database_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$database_list" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Prepare Zabbix component list
|
||||
id: components
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
component_list=$(jq -r '.components | map_values(select(.rhel == true)) | keys | @json' "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Zabbix Component List"
|
||||
echo "$component_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$component_list" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get branch info
|
||||
id: branch_info
|
||||
shell: bash
|
||||
env:
|
||||
LATEST_BRANCH: ${{ env.LATEST_BRANCH }}
|
||||
github_ref: ${{ github.ref }}
|
||||
TRUNK_MAJOR_VERSION: ${{ inputs.trunk_version }}
|
||||
run: |
|
||||
result=false
|
||||
sha_short=$(git rev-parse --short HEAD)
|
||||
|
||||
if [[ "$github_ref" == "refs/tags/"* ]]; then
|
||||
github_ref=${github_ref%.*}
|
||||
fi
|
||||
|
||||
github_ref=${github_ref##*/}
|
||||
|
||||
if [[ "$github_ref" == "$LATEST_BRANCH" ]]; then
|
||||
result=true
|
||||
fi
|
||||
|
||||
echo "::group::Branch metadata"
|
||||
echo "is_default_branch - $result"
|
||||
echo "current_branch - $github_ref"
|
||||
if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then
|
||||
echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}"
|
||||
else
|
||||
echo "secret_prefix=RHEL_${github_ref//.}"
|
||||
fi
|
||||
echo "sha_short - $sha_short"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "is_default_branch=$result" >> $GITHUB_OUTPUT
|
||||
echo "current_branch=$github_ref" >> $GITHUB_OUTPUT
|
||||
if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then
|
||||
echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "secret_prefix=RHEL_${github_ref//.}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "sha_short=$sha_short" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cleanup existing cache
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
BRANCH: ${{ steps.branch_info.outputs.current_branch }}
|
||||
GH_RUN_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
gh extension install actions/gh-actions-cache
|
||||
|
||||
cache_keys=$(gh actions-cache list -R "${REPO}" -B "${BRANCH}" -L 100 --sort created-at --order desc | cut -f 1)
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cache_key in $cache_keys
|
||||
do
|
||||
if [[ "$cache_key" == *"${GH_RUN_ID}" ]]; then
|
||||
gh actions-cache delete $cache_key -R "${REPO}" -B "${BRANCH}" --confirm
|
||||
fi
|
||||
done
|
||||
|
||||
build_base:
|
||||
timeout-minutes: 30
|
||||
name: Build ${{ matrix.build }} base (${{ matrix.arch }})
|
||||
needs: ["init_build"]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: [build-base]
|
||||
arch: ${{ fromJson(needs.init_build.outputs.platforms) }}
|
||||
runs-on: [self-hosted, linux, "${{ matrix.arch }}"]
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install cosign
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad
|
||||
with:
|
||||
cosign-release: 'v2.4.0'
|
||||
|
||||
- name: Check cosign version
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
run: cosign version
|
||||
|
||||
- name: Fix string case
|
||||
id: lc
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
echo "arch=${ARCH,,}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }}
|
||||
tags: |
|
||||
type=sha,suffix=-${{ steps.lc.outputs.arch }}
|
||||
|
||||
- name: Build image
|
||||
id: build_image
|
||||
uses: redhat-actions/buildah-build@v2.13
|
||||
with:
|
||||
context: ${{ format('{0}/{1}/rhel', env.DOCKERFILES_DIRECTORY, matrix.build) }}
|
||||
layers: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
containerfiles: |
|
||||
${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile
|
||||
extra-args: |
|
||||
--pull
|
||||
--iidfile=${{ github.workspace }}/iidfile
|
||||
|
||||
- name: Image metadata
|
||||
id: image_metadata
|
||||
env:
|
||||
IMAGE_TAG: ${{ steps.build_image.outputs.image-with-tag }}
|
||||
CACHE_FILE_NAME: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
TAG_ID=$(cat $GITHUB_WORKSPACE/iidfile)
|
||||
|
||||
echo "::group::Image tag"
|
||||
echo "image_tag=$IMAGE_TAG"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Image Tag ID"
|
||||
echo "tag_id=$TAG_ID"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Cache file name"
|
||||
echo "$CACHE_FILE_NAME"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "$TAG_ID" > "${CACHE_FILE_NAME}_tag_id"
|
||||
echo "$IMAGE_TAG" > "${CACHE_FILE_NAME}_tag"
|
||||
|
||||
echo "image_tag_id=${TAG_ID}" >> $GITHUB_OUTPUT
|
||||
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache image metadata
|
||||
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag
|
||||
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Push image to local storage
|
||||
id: push_image
|
||||
env:
|
||||
IMAGE_TAG: ${{ steps.image_metadata.outputs.image_tag }}
|
||||
IMAGE_TAG_ID: ${{ steps.image_metadata.outputs.image_tag_id }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
echo "Image ${IMAGE_TAG} location: \"${IMAGE_DIR}/${IMAGE_TAG_ID}\""
|
||||
podman push "${IMAGE_TAG}" dir:"${IMAGE_DIR}/${IMAGE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Post build image
|
||||
if: ${{ success() || failure() }}
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
|
||||
rm -rf "$GITHUB_WORKSPACE/iidfile"
|
||||
|
||||
echo "Removing working containers"
|
||||
buildah rm -a 2>/dev/null || true
|
||||
echo "Removing container data in storage not controlled by podman"
|
||||
podman system prune --external 2>/dev/null
|
||||
echo "Removing all unused container data with volumes"
|
||||
podman system prune -a --volumes -f 2>/dev/null
|
||||
echo "Reseting podman storage to default state"
|
||||
podman system reset -f 2>/dev/null || true
|
||||
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Check on failures
|
||||
if: ${{ (cancelled() || failure()) && ( steps.push_image.outcome == 'failure' || steps.push_image.outcome == 'cancelled') }}
|
||||
env:
|
||||
IMAGE_TAG_ID: ${{ steps.image_metadata.outputs.image_tag_id }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Removing orphaned image"
|
||||
rm -rf "${IMAGE_DIR}/${IMAGE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
build_base_database:
|
||||
timeout-minutes: 90
|
||||
needs: [ "build_base", "init_build"]
|
||||
name: Build ${{ matrix.build }} base (${{ matrix.arch }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: ${{ fromJson(needs.init_build.outputs.database) }}
|
||||
arch: ${{ fromJson(needs.init_build.outputs.platforms) }}
|
||||
runs-on: [self-hosted, linux, "${{ matrix.arch }}"]
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Fix string case
|
||||
id: lc
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
echo "arch=${ARCH,,}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
|
||||
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag
|
||||
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Pull ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} image from local storage
|
||||
id: base_build
|
||||
env:
|
||||
MATRIX_ARCH: ${{ matrix.arch }}
|
||||
BASE_IMAGE: ${{ env.BASE_BUILD_NAME }}
|
||||
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||
run: |
|
||||
BASE_TAG_ID=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_tag_id")
|
||||
BASE_IMAGE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_tag")
|
||||
|
||||
echo "::group::Pull image"
|
||||
echo "podman pull dir:\"${IMAGE_DIR}/${BASE_TAG_ID}\""
|
||||
podman pull dir:"${IMAGE_DIR}/${BASE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Tag image"
|
||||
echo "podman tag \"${BASE_TAG_ID}\" \"${BASE_IMAGE_TAG}\""
|
||||
podman tag "${BASE_TAG_ID}" "${BASE_IMAGE_TAG}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::SHA256 tag"
|
||||
DIGEST=$(podman inspect "${BASE_TAG_ID}" --format '{{ .Digest }}')
|
||||
BASE_BUILD_IMAGE="${IMAGES_PREFIX}${BASE_IMAGE}@${DIGEST}"
|
||||
|
||||
echo "base_build_image=${BASE_BUILD_IMAGE}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "base_build_image=${BASE_BUILD_IMAGE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.IMAGES_PREFIX }}${{ matrix.build }}
|
||||
tags: |
|
||||
type=sha,suffix=-${{ steps.lc.outputs.arch }}
|
||||
|
||||
- name: Build image
|
||||
id: build_image
|
||||
uses: redhat-actions/buildah-build@v2.13
|
||||
with:
|
||||
context: ${{ format('{0}/{1}/rhel', env.DOCKERFILES_DIRECTORY, matrix.build) }}
|
||||
layers: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
containerfiles: |
|
||||
${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile
|
||||
build-args: BUILD_BASE_IMAGE=localhost/${{ steps.base_build.outputs.base_build_image }}
|
||||
extra-args: |
|
||||
--iidfile=${{ github.workspace }}/iidfile
|
||||
--build-context sources=./sources/
|
||||
--build-context config_templates=./config_templates/
|
||||
|
||||
- name: Prepare image metadata
|
||||
id: image_metadata
|
||||
env:
|
||||
IMAGE_TAG: ${{ steps.build_image.outputs.image-with-tag }}
|
||||
CACHE_FILE_NAME: ${{ matrix.build }}_${{ matrix.arch }}
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
TAG_ID=$(cat $GITHUB_WORKSPACE/iidfile)
|
||||
|
||||
echo "::group::Image tag"
|
||||
echo "image_tag=$IMAGE_TAG"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Image Tag ID"
|
||||
echo "tag_id=$TAG_ID"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Cache file name"
|
||||
echo "$CACHE_FILE_NAME"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "$TAG_ID" > "${CACHE_FILE_NAME}_tag_id"
|
||||
echo "$IMAGE_TAG" > "${CACHE_FILE_NAME}_tag"
|
||||
|
||||
echo "image_tag_id=${TAG_ID}" >> $GITHUB_OUTPUT
|
||||
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache image metadata
|
||||
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ matrix.build }}_${{ matrix.arch }}_tag_id
|
||||
${{ matrix.build }}_${{ matrix.arch }}_tag
|
||||
key: ${{ matrix.build }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Push image to local storage
|
||||
id: push_image
|
||||
env:
|
||||
IMAGE_TAG: ${{ steps.image_metadata.outputs.image_tag }}
|
||||
IMAGE_TAG_ID: ${{ steps.image_metadata.outputs.image_tag_id }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
echo "podman push \"${IMAGE_TAG}\" dir:\"${IMAGE_DIR}/${IMAGE_TAG_ID}\""
|
||||
podman push "${IMAGE_TAG}" dir:"${IMAGE_DIR}/${IMAGE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Post build image
|
||||
if: ${{ success() || failure() }}
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
|
||||
rm -rf "$GITHUB_WORKSPACE/iidfile"
|
||||
|
||||
echo "Removing working containers"
|
||||
buildah rm -a 2>/dev/null || true
|
||||
echo "Removing container data in storage not controlled by podman"
|
||||
podman system prune --external 2>/dev/null
|
||||
echo "Removing all unused container data with volumes"
|
||||
podman system prune -a --volumes -f 2>/dev/null
|
||||
echo "Reseting podman storage to default state"
|
||||
podman system reset -f 2>/dev/null || true
|
||||
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Check on failures
|
||||
if: ${{ (cancelled() || failure()) && ( steps.push_image.outcome == 'failure' || steps.push_image.outcome == 'cancelled') }}
|
||||
env:
|
||||
IMAGE_TAG_ID: ${{ steps.image_metadata.outputs.image_tag_id }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Removing orphaned image"
|
||||
rm -rf "${IMAGE_DIR}/${IMAGE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
build_images:
|
||||
timeout-minutes: 30
|
||||
needs: [ "build_base_database", "init_build"]
|
||||
name: Build ${{ matrix.build }} image (${{ matrix.arch }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: ${{ fromJson(needs.init_build.outputs.components) }}
|
||||
arch: ${{ fromJson(needs.init_build.outputs.platforms) }}
|
||||
runs-on: [self-hosted, linux, "${{ matrix.arch }}"]
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Variables formating
|
||||
id: var_format
|
||||
env:
|
||||
MATRIX_BUILD: ${{ matrix.build }}
|
||||
run: |
|
||||
MATRIX_BUILD=${MATRIX_BUILD^^}
|
||||
MATRIX_BUILD=${MATRIX_BUILD//-/_}
|
||||
|
||||
echo "::group::Result"
|
||||
echo "matrix_build=${MATRIX_BUILD}"
|
||||
echo "::endgroup::"
|
||||
echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Detect Build Base Image
|
||||
id: build_base_image
|
||||
if: ${{ matrix.build != 'snmptraps' }}
|
||||
env:
|
||||
MATRIX_BUILD: ${{ matrix.build }}
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
BUILD_BASE=$(jq -r ".components.\"$MATRIX_BUILD\".base" "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Base Build Image"
|
||||
echo "$BUILD_BASE"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "build_base=${BUILD_BASE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download metadata of ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.arch }}
|
||||
if: ${{ matrix.build != 'snmptraps' }}
|
||||
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ steps.build_base_image.outputs.build_base }}_${{ matrix.arch }}_tag_id
|
||||
${{ steps.build_base_image.outputs.build_base }}_${{ matrix.arch }}_tag
|
||||
key: ${{ steps.build_base_image.outputs.build_base }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Pull ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.arch }} image
|
||||
id: base_build
|
||||
if: ${{ matrix.build != 'snmptraps' }}
|
||||
env:
|
||||
MATRIX_ARCH: ${{ matrix.arch }}
|
||||
BASE_IMAGE: ${{ steps.build_base_image.outputs.build_base }}
|
||||
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||
run: |
|
||||
BASE_TAG_ID=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_tag_id")
|
||||
BASE_IMAGE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_tag")
|
||||
|
||||
echo "::group::Pull image"
|
||||
echo "podman pull dir:\"${IMAGE_DIR}/${BASE_TAG_ID}\""
|
||||
podman pull dir:"${IMAGE_DIR}/${BASE_TAG_ID}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Tag image"
|
||||
echo "podman tag \"${BASE_TAG_ID}\" \"${BASE_IMAGE_TAG}\""
|
||||
podman tag "${BASE_TAG_ID}" "${BASE_IMAGE_TAG}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::SHA256 tag"
|
||||
DIGEST=$(podman inspect "${BASE_TAG_ID}" --format '{{ .Digest }}')
|
||||
BASE_BUILD_IMAGE="${IMAGES_PREFIX}${BASE_IMAGE}@${DIGEST}"
|
||||
echo "digest=${BASE_BUILD_IMAGE}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "base_build_image=${BASE_BUILD_IMAGE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Remove smartmontools
|
||||
if: ${{ matrix.build == 'agent2' }}
|
||||
env:
|
||||
DOCKERFILES_DIRECTORY: ${{ env.DOCKERFILES_DIRECTORY }}
|
||||
run: |
|
||||
sed -i '/smartmontools/d' "$DOCKERFILES_DIRECTORY/agent2/rhel/Dockerfile"
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/${{ secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] || matrix.build }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=sha
|
||||
flavor: |
|
||||
latest=${{ github.event_name == 'release' }}
|
||||
suffix=${{ matrix.arch == 'ARM64' && '-arm64' || '' }},onlatest=true
|
||||
|
||||
- name: Build image
|
||||
id: build_image
|
||||
uses: redhat-actions/buildah-build@v2.13
|
||||
with:
|
||||
context: ${{ format('{0}/{1}/rhel', env.DOCKERFILES_DIRECTORY, matrix.build) }}
|
||||
layers: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: |
|
||||
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
containerfiles: |
|
||||
${{ env.DOCKERFILES_DIRECTORY }}/${{ matrix.build }}/rhel/Dockerfile
|
||||
extra-args: |
|
||||
--iidfile=${{ github.workspace }}/iidfile
|
||||
build-args: BUILD_BASE_IMAGE=localhost/${{ steps.base_build.outputs.base_build_image }}
|
||||
|
||||
- name: Log in to ${{ env.REGISTRY }}
|
||||
uses: redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1.6
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
with:
|
||||
username: ${{ format('redhat-isv-containers+{0}-robot', secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)]) }}
|
||||
password: ${{ secrets[format('{0}_{1}_SECRET', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] }}
|
||||
registry: ${{ env.REGISTRY }}
|
||||
auth_file_path: /tmp/.docker_${{ matrix.build }}_${{ matrix.arch }}_${{ needs.init_build.outputs.sha_short }}
|
||||
|
||||
- name: Push to RedHat certification procedure (1st)
|
||||
id: push_to_registry
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
uses: redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1
|
||||
with:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
- name: Preflight certification
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
env:
|
||||
PFLT_DOCKERCONFIG: /tmp/.docker_${{ matrix.build }}_${{ matrix.arch }}_${{ needs.init_build.outputs.sha_short }}
|
||||
PFLT_CERTIFICATION_PROJECT_ID: ${{ secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] }}
|
||||
PFLT_PYXIS_API_TOKEN: ${{ secrets.REDHAT_API_TOKEN }}
|
||||
PFLT_ARTIFACTS: ${{ env.PFLT_ARTIFACTS }}
|
||||
PFLT_LOGLEVEL: ${{ env.PFLT_LOGLEVEL }}
|
||||
IMAGE_TAG: ${{ steps.build_image.outputs.image-with-tag }}
|
||||
PREFLIGHT_IMAGE: ${{ env.PREFLIGHT_IMAGE }}
|
||||
run: |
|
||||
mkdir -p $PFLT_ARTIFACTS
|
||||
echo "::group::Pull preflight \"$PREFLIGHT_IMAGE\" image"
|
||||
podman pull "$PREFLIGHT_IMAGE"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Perform certification tests"
|
||||
podman run \
|
||||
-it \
|
||||
--rm \
|
||||
--security-opt=label=disable \
|
||||
--env PFLT_LOGLEVEL=$PFLT_LOGLEVEL \
|
||||
--env PFLT_ARTIFACTS=/artifacts \
|
||||
--env PFLT_LOGFILE=/artifacts/preflight.log \
|
||||
--env PFLT_CERTIFICATION_COMPONENT_ID=$PFLT_CERTIFICATION_PROJECT_ID \
|
||||
--env PFLT_PYXIS_API_TOKEN=$PFLT_PYXIS_API_TOKEN \
|
||||
--env PFLT_DOCKERCONFIG=/temp-authfile.json \
|
||||
-v $PFLT_ARTIFACTS:/artifacts \
|
||||
-v $PFLT_DOCKERCONFIG:/temp-authfile.json:ro \
|
||||
"$PREFLIGHT_IMAGE" check container $IMAGE_TAG --submit
|
||||
podman rmi -i -f "$PREFLIGHT_IMAGE"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Push to RedHat certification procedure (all tags)
|
||||
id: push_to_registry_all_tags
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' }}
|
||||
uses: redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1
|
||||
with:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
- name: Post Preflight certification
|
||||
if: ${{ env.AUTO_PUSH_IMAGES == 'true' && (success() || failure()) }}
|
||||
env:
|
||||
PREFLIGHT_IMAGE: ${{ env.PREFLIGHT_IMAGE }}
|
||||
PFLT_ARTIFACTS: ${{ env.PFLT_ARTIFACTS }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
rm -rf "$PFLT_ARTIFACTS"
|
||||
podman rmi -i -f "$PREFLIGHT_IMAGE"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Image digest
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
TAG_ID=$(cat $GITHUB_WORKSPACE/iidfile)
|
||||
echo "::group::Image digest"
|
||||
echo "$TAG_ID"
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Post build image
|
||||
if: ${{ success() || failure() }}
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
|
||||
rm -rf "$GITHUB_WORKSPACE/iidfile"
|
||||
|
||||
echo "Removing working containers"
|
||||
buildah rm -a 2>/dev/null || true
|
||||
echo "Removing container data in storage not controlled by podman"
|
||||
podman system prune --external 2>/dev/null
|
||||
echo "Removing all unused container data with volumes"
|
||||
podman system prune -a --volumes -f 2>/dev/null
|
||||
echo "Reseting podman storage to default state"
|
||||
podman system reset -f 2>/dev/null || true
|
||||
|
||||
echo "::endgroup::"
|
||||
|
||||
clear_artifacts:
|
||||
timeout-minutes: 10
|
||||
needs: [ "build_images", "init_build"]
|
||||
name: Clear ${{ matrix.build }} image cache (${{ matrix.arch }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: ${{ fromJson(needs.init_build.outputs.database) }}
|
||||
arch: ${{ fromJson(needs.init_build.outputs.platforms) }}
|
||||
runs-on: [self-hosted, linux, "${{ matrix.arch }}"]
|
||||
if: ${{ needs.build_base_database.result == 'success' }}
|
||||
permissions: {}
|
||||
steps:
|
||||
- name: Download metadata of ${{ matrix.build }}:${{ matrix.arch }}
|
||||
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ matrix.build }}_${{ matrix.arch }}_tag_id
|
||||
${{ matrix.build }}_${{ matrix.arch }}_tag
|
||||
key: ${{ matrix.build }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Remove ${{ matrix.build }}:${{ matrix.arch }} cache
|
||||
env:
|
||||
CACHE_FILE_NAME: ${{ matrix.build }}_${{ matrix.arch }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
|
||||
BASE_TAG=$(cat "${CACHE_FILE_NAME}_tag_id")
|
||||
echo "Removing ${IMAGE_DIR}/${BASE_TAG}"
|
||||
rm -rf "${IMAGE_DIR}/${BASE_TAG}"
|
||||
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Download metadata of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
|
||||
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: |
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag_id
|
||||
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag
|
||||
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||
|
||||
- name: Remove ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} cache
|
||||
env:
|
||||
CACHE_FILE_NAME: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
||||
IMAGE_DIR: ${{ env.IMAGE_DIR }}
|
||||
run: |
|
||||
echo "::group::Result"
|
||||
|
||||
BASE_TAG=$(cat "${CACHE_FILE_NAME}_tag_id")
|
||||
echo "Removing ${IMAGE_DIR}/${BASE_TAG}"
|
||||
rm -rf "${IMAGE_DIR}/${BASE_TAG}"
|
||||
|
||||
echo "::endgroup::"
|
||||
788
.github/workflows/images_build_windows.yml
vendored
Normal file
788
.github/workflows/images_build_windows.yml
vendored
Normal file
@ -0,0 +1,788 @@
|
||||
name: Build images (DockerHub, Windows)
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
push:
|
||||
branches:
|
||||
- '[0-9]+.[0-9]+'
|
||||
- 'trunk'
|
||||
paths:
|
||||
- 'build.json'
|
||||
- 'Dockerfiles/*/windows/*'
|
||||
- '!**/README.md'
|
||||
- '.github/workflows/images_build_windows.yml'
|
||||
schedule:
|
||||
- cron: '05 02 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
TRUNK_ONLY_EVENT: ${{ contains(fromJSON('["schedule"]'), github.event_name) }}
|
||||
AUTO_PUSH_IMAGES: ${{ vars.AUTO_PUSH_IMAGES }}
|
||||
|
||||
DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }}
|
||||
DOCKER_REPOSITORY: ${{ vars.DOCKER_REPOSITORY }}
|
||||
LATEST_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
TRUNK_GIT_BRANCH: "refs/heads/trunk"
|
||||
IMAGES_PREFIX: "zabbix-"
|
||||
|
||||
MSFT_BASE_BUILD_IMAGE: "mcr.microsoft.com/windows/servercore"
|
||||
OS_BASE_IMAGE_NAME: "mcr.microsoft.com/windows/nanoserver"
|
||||
|
||||
BASE_IMAGE_NAME: "build-base"
|
||||
BASE_BUILD_IMAGE_NAME: "build-mysql"
|
||||
|
||||
MATRIX_FILE: "build.json"
|
||||
DOCKERFILES_DIRECTORY: "Dockerfiles"
|
||||
|
||||
OIDC_ISSUER: "https://token.actions.githubusercontent.com"
|
||||
IDENITY_REGEX: "https://github.com/zabbix/zabbix-docker/.github/"
|
||||
|
||||
jobs:
|
||||
init_build:
|
||||
name: Initialize build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
os: ${{ steps.os.outputs.list }}
|
||||
components: ${{ steps.components.outputs.list }}
|
||||
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
|
||||
current_branch: ${{ steps.branch_info.outputs.current_branch }}
|
||||
sha_short: ${{ steps.branch_info.outputs.sha_short }}
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
github.com:443
|
||||
release-assets.githubusercontent.com:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
|
||||
fetch-depth: 1
|
||||
sparse-checkout: ${{ env.MATRIX_FILE }}
|
||||
|
||||
- name: Check ${{ env.MATRIX_FILE }} file
|
||||
id: build_exists
|
||||
shell: bash
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
if [[ ! -f "$MATRIX_FILE" ]]; then
|
||||
echo "::error::File $MATRIX_FILE is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Prepare Operating System list
|
||||
id: os
|
||||
shell: bash
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
os_list=$(jq -r '.["os-windows"] | keys | [ .[] | tostring ] | @json' "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Operating System List"
|
||||
echo "$os_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$os_list" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Prepare Zabbix component list
|
||||
id: components
|
||||
shell: bash
|
||||
run: |
|
||||
component_list='["agent","agent2"]'
|
||||
|
||||
echo "::group::Zabbix Component List"
|
||||
echo "$component_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$component_list" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get branch info
|
||||
id: branch_info
|
||||
shell: bash
|
||||
env:
|
||||
LATEST_BRANCH: ${{ env.LATEST_BRANCH }}
|
||||
github_ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || github.ref }}
|
||||
run: |
|
||||
result=false
|
||||
sha_short=$(git rev-parse --short HEAD)
|
||||
|
||||
if [[ "$github_ref" == "refs/tags/"* ]]; then
|
||||
github_ref=${github_ref%.*}
|
||||
fi
|
||||
|
||||
github_ref=${github_ref##*/}
|
||||
|
||||
if [[ "$github_ref" == "$LATEST_BRANCH" ]]; then
|
||||
result=true
|
||||
fi
|
||||
|
||||
echo "::group::Branch data"
|
||||
echo "is_default_branch - $result"
|
||||
echo "current_branch - $github_ref"
|
||||
echo "sha_short - $sha_short"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "is_default_branch=$result" >> $GITHUB_OUTPUT
|
||||
echo "current_branch=$github_ref" >> $GITHUB_OUTPUT
|
||||
echo "sha_short=$sha_short" >> $GITHUB_OUTPUT
|
||||
|
||||
build_base:
|
||||
name: Build ${{ matrix.component }} base on ${{ matrix.os }}
|
||||
needs: init_build
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 70
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
attestations: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{ fromJson(needs.init_build.outputs.os) }}
|
||||
component: ${{ fromJson(needs.init_build.outputs.components) }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install cosign
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad
|
||||
with:
|
||||
cosign-release: 'v2.4.0'
|
||||
|
||||
- name: Check cosign version
|
||||
run: cosign version
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Base Windows OS tag
|
||||
id: base_os_tag
|
||||
env:
|
||||
MATRIX_OS: ${{ matrix.os }}
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
$os_tag=$(Get-Content -Path $Env:MATRIX_FILE | ConvertFrom-Json).'os-windows'."$Env:MATRIX_OS"
|
||||
|
||||
echo "::group::Base Microsoft Windows OS tag"
|
||||
echo "$os_tag"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "os_tag=$os_tag" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_IMAGE_NAME }}
|
||||
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
|
||||
tags: |
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ steps.base_os_tag.outputs.os_tag }},prefix=${{ matrix.component }}-
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-,suffix=-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }}-latest,prefix=${{ matrix.component }}-
|
||||
type=raw,enable=${{ (needs.init_build.outputs.current_branch != 'trunk') && (needs.init_build.outputs.is_default_branch == 'true') }},value=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }},prefix=${{ matrix.component }}-
|
||||
flavor: |
|
||||
latest=false
|
||||
|
||||
- name: Build and push image
|
||||
id: docker_build
|
||||
env:
|
||||
DOCKERFILES_DIRECTORY: ${{ env.DOCKERFILES_DIRECTORY }}
|
||||
BASE_BUILD_IMAGE: ${{ env.MSFT_BASE_BUILD_IMAGE }}
|
||||
BASE_IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}
|
||||
MATRIX_COMPONENT: ${{ matrix.component }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
BASE_OS_TAG: ${{ steps.base_os_tag.outputs.os_tag }}
|
||||
LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
AUTO_PUSH_IMAGES: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
run: |
|
||||
echo "::group::Docker version"
|
||||
docker version
|
||||
echo "::endgroup::"
|
||||
echo "::group::Docker info"
|
||||
docker info
|
||||
echo "::endgroup::"
|
||||
|
||||
$context="$Env:DOCKERFILES_DIRECTORY\$Env:BASE_IMAGE_NAME\windows\"
|
||||
$dockerfile= $context + 'Dockerfile.' + $Env:MATRIX_COMPONENT
|
||||
$base_os_image= $Env:BASE_BUILD_IMAGE + ':' + $Env:BASE_OS_TAG
|
||||
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
||||
|
||||
echo "::group::Image tags"
|
||||
echo "$Env:TAGS"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Pull base image"
|
||||
docker pull $base_os_image
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build Image"
|
||||
Write-Host @"
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED
|
||||
--build-arg=OS_BASE_IMAGE=$base_os_image
|
||||
--file=$dockerfile
|
||||
$tags
|
||||
$context
|
||||
"@
|
||||
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION `
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED `
|
||||
--build-arg=OS_BASE_IMAGE=$base_os_image `
|
||||
--file=$dockerfile `
|
||||
$tags `
|
||||
$context
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Publish Image"
|
||||
if ( $Env:AUTO_PUSH_IMAGES -eq 'true' ) {
|
||||
Foreach ($tag in $tags_array) {
|
||||
echo "docker image push $tag"
|
||||
docker image push $tag
|
||||
if (-not $?) {throw "Failed"}
|
||||
}
|
||||
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .RepoDigests 0}}").Split('@')[-1]
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from RepoDigests"
|
||||
}
|
||||
else {
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .Id}}")
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from Id"
|
||||
}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Digest"
|
||||
echo "$digest"
|
||||
echo "::endgroup::"
|
||||
echo "digest=$digest" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Sign the images with GitHub OIDC Token
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
run: |
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tag_list=@()
|
||||
|
||||
|
||||
foreach ($tag in $tags_array) {
|
||||
$tag_name=$tag.Split(":")[0]
|
||||
$tag_list+="$tag_name@$Env:DIGEST"
|
||||
}
|
||||
echo "::group::Images to sign"
|
||||
echo "$tag_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Signing"
|
||||
echo "cosign sign --yes $tag_list"
|
||||
cosign sign --yes $tag_list
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Image digest
|
||||
if: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
CACHE_FILE_NAME: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
run: |
|
||||
echo "::group::Image digest"
|
||||
echo "$Env:DIGEST"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cache file name"
|
||||
echo "$Env:CACHE_FILE_NAME"
|
||||
echo "::endgroup::"
|
||||
|
||||
$Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME
|
||||
|
||||
- name: Cache image digest
|
||||
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
|
||||
|
||||
build_components:
|
||||
name: Build ${{ matrix.component }} sources on ${{ matrix.os }}
|
||||
needs: [ "build_base", "init_build"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 70
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
attestations: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{ fromJson(needs.init_build.outputs.os) }}
|
||||
component: ${{ fromJson(needs.init_build.outputs.components) }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install cosign
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad
|
||||
with:
|
||||
cosign-release: 'v2.4.0'
|
||||
|
||||
- name: Check cosign version
|
||||
run: cosign version
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Base OS tag
|
||||
id: base_os_tag
|
||||
env:
|
||||
MATRIX_OS: ${{ matrix.os }}
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
$os_tag=$(Get-Content -Path $Env:MATRIX_FILE | ConvertFrom-Json).'os-windows'."$Env:MATRIX_OS"
|
||||
|
||||
echo "::group::Base Windows OS tag"
|
||||
echo "$os_tag"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "os_tag=$os_tag" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ env.BASE_BUILD_IMAGE_NAME }}
|
||||
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
|
||||
tags: |
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ steps.base_os_tag.outputs.os_tag }},prefix=${{ matrix.component }}-
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-,suffix=-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }}-latest,prefix=${{ matrix.component }}-
|
||||
type=raw,enable=${{ (needs.init_build.outputs.current_branch != 'trunk') && (needs.init_build.outputs.is_default_branch == 'true') }},value=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,prefix=${{ matrix.component }}-${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }},prefix=${{ matrix.component }}-
|
||||
flavor: |
|
||||
latest=false
|
||||
|
||||
- name: Download SHA256 tag of ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }}
|
||||
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: ${{ env.BASE_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
key: ${{ env.BASE_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
|
||||
|
||||
- name: Retrieve ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }} SHA256 tag
|
||||
id: base_build
|
||||
env:
|
||||
BASE_IMAGE_NAME: ${{ env.BASE_IMAGE_NAME }}
|
||||
MATRIX_OS: ${{ matrix.os }}
|
||||
MATRIX_COMPONENT: ${{ matrix.component }}
|
||||
DOCKER_REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
|
||||
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||
run: |
|
||||
$base_image_file=$Env:BASE_IMAGE_NAME + '_' + $Env:MATRIX_OS + '_' + $Env:MATRIX_COMPONENT
|
||||
$base_tag = Get-Content $base_image_file -Raw
|
||||
$build_base_image="$Env:DOCKER_REPOSITORY/$Env:IMAGES_PREFIX$Env:BASE_IMAGE_NAME@" + $base_tag
|
||||
|
||||
echo "::group::Base image Info"
|
||||
echo "base_tag=$base_tag"
|
||||
echo "base_build_image=$build_base_image"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "base_tag=$base_tag" >> $Env:GITHUB_OUTPUT
|
||||
echo "base_build_image=$build_base_image" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Verify ${{ env.BASE_IMAGE_NAME }}:${{ matrix.os }} cosign
|
||||
env:
|
||||
BASE_IMAGE: ${{ steps.base_build.outputs.base_build_image }}
|
||||
OIDC_ISSUER: ${{ env.OIDC_ISSUER }}
|
||||
IDENITY_REGEX: ${{ env.IDENITY_REGEX }}
|
||||
run: |
|
||||
cosign verify `
|
||||
--certificate-oidc-issuer-regexp "$Env:OIDC_ISSUER" `
|
||||
--certificate-identity-regexp "$Env:IDENITY_REGEX" `
|
||||
"$Env:BASE_IMAGE" | jq
|
||||
|
||||
- name: Build and push image
|
||||
id: docker_build
|
||||
env:
|
||||
DOCKERFILES_DIRECTORY: ${{ env.DOCKERFILES_DIRECTORY }}
|
||||
BASE_BUILD_IMAGE: ${{ steps.base_build.outputs.base_build_image }}
|
||||
BASE_BUILD_IMAGE_NAME: ${{ env.BASE_BUILD_IMAGE_NAME }}
|
||||
BASE_BUILD_OS_TAG: ${{ steps.base_os_tag.outputs.os_tag }}
|
||||
MATRIX_COMPONENT: ${{ matrix.component }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
AUTO_PUSH_IMAGES: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
run: |
|
||||
echo "::group::Docker version"
|
||||
docker version
|
||||
echo "::endgroup::"
|
||||
echo "::group::Docker info"
|
||||
docker info
|
||||
echo "::endgroup::"
|
||||
|
||||
$context="$Env:DOCKERFILES_DIRECTORY\$Env:BASE_BUILD_IMAGE_NAME\windows\"
|
||||
$dockerfile= $context + 'Dockerfile.' + $Env:MATRIX_COMPONENT
|
||||
$base_build_image= $Env:BASE_BUILD_IMAGE
|
||||
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
||||
|
||||
echo "::group::Image tags"
|
||||
echo "$Env:TAGS"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Pull base image"
|
||||
docker pull $base_build_image
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build Image"
|
||||
Write-Host @"
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED
|
||||
--build-arg=BUILD_BASE_IMAGE=$base_build_image
|
||||
--file=$dockerfile
|
||||
$tags
|
||||
$context
|
||||
"@
|
||||
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION `
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED `
|
||||
--build-arg=BUILD_BASE_IMAGE=$base_build_image `
|
||||
--file=$dockerfile `
|
||||
$tags `
|
||||
$context
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Publish Image"
|
||||
if ( $Env:AUTO_PUSH_IMAGES -eq 'true' ) {
|
||||
Foreach ($tag in $tags_array) {
|
||||
echo "docker image push $tag"
|
||||
docker image push $tag
|
||||
if (-not $?) {throw "Failed"}
|
||||
}
|
||||
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .RepoDigests 0}}").Split('@')[-1]
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from RepoDigests"
|
||||
}
|
||||
else {
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .Id}}")
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from Id"
|
||||
}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Digest"
|
||||
echo "$digest"
|
||||
echo "::endgroup::"
|
||||
echo "digest=$digest" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Sign the images with GitHub OIDC Token
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
run: |
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tag_list=@()
|
||||
|
||||
|
||||
foreach ($tag in $tags_array) {
|
||||
$tag_name=$tag.Split(":")[0]
|
||||
$tag_list+="$tag_name@$Env:DIGEST"
|
||||
}
|
||||
echo "::group::Images to sign"
|
||||
echo "$tag_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Signing"
|
||||
echo "cosign sign --yes $tag_list"
|
||||
cosign sign --yes $tag_list
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Image digest
|
||||
if: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
CACHE_FILE_NAME: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
run: |
|
||||
echo "::group::Image digest"
|
||||
echo "$Env:DIGEST"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cache file name"
|
||||
echo "$Env:CACHE_FILE_NAME"
|
||||
echo "::endgroup::"
|
||||
|
||||
$Env:DIGEST | Set-Content -Path $Env:CACHE_FILE_NAME
|
||||
|
||||
- name: Cache image digest
|
||||
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
|
||||
|
||||
build_images:
|
||||
name: Build ${{ matrix.component }} on ${{ matrix.os }}
|
||||
needs: [ "build_components", "init_build"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 70
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
attestations: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{ fromJson(needs.init_build.outputs.os) }}
|
||||
component: ${{ fromJson(needs.init_build.outputs.components) }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || '' }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install cosign
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad
|
||||
with:
|
||||
cosign-release: 'v2.4.0'
|
||||
|
||||
- name: Check cosign version
|
||||
run: cosign version
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Base OS tag
|
||||
id: base_os_tag
|
||||
env:
|
||||
MATRIX_OS: ${{ matrix.os }}
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
$os_tag=$(Get-Content -Path $Env:MATRIX_FILE | ConvertFrom-Json).'os-windows'."$Env:MATRIX_OS"
|
||||
|
||||
echo "::group::Base OS tag"
|
||||
echo "$os_tag"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "os_tag=$os_tag" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: meta
|
||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
||||
with:
|
||||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX }}${{ matrix.component }}
|
||||
context: ${{ env.TRUNK_ONLY_EVENT == 'true' && 'git' || '' }}
|
||||
tags: |
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ steps.base_os_tag.outputs.os_tag }}
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,prefix=${{ steps.base_os_tag.outputs.os_tag }}-,suffix=-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }}-latest
|
||||
type=raw,enable=${{ (needs.init_build.outputs.current_branch != 'trunk') && (needs.init_build.outputs.is_default_branch == 'true') }},value=${{ steps.base_os_tag.outputs.os_tag }}-latest
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,prefix=${{ steps.base_os_tag.outputs.os_tag }}-
|
||||
type=ref,enable=${{ needs.init_build.outputs.current_branch == 'trunk' }},event=branch,suffix=-${{ steps.base_os_tag.outputs.os_tag }}
|
||||
flavor: |
|
||||
latest=false
|
||||
|
||||
- name: Download SHA256 tag of ${{ env.BASE_BUILD_IMAGE_NAME }}:${{ matrix.os }}
|
||||
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
with:
|
||||
path: ${{ env.BASE_BUILD_IMAGE_NAME }}_${{ matrix.os }}_${{ matrix.component }}
|
||||
key: ${{ env.BASE_BUILD_IMAGE_NAME }}-${{ matrix.os }}-${{ github.run_id }}
|
||||
|
||||
- name: Retrieve ${{ env.BASE_BUILD_IMAGE_NAME }}:${{ matrix.os }} SHA256 tag
|
||||
id: base_build
|
||||
env:
|
||||
BASE_BUILD_IMAGE_NAME: ${{ env.BASE_BUILD_IMAGE_NAME }}
|
||||
MATRIX_OS: ${{ matrix.os }}
|
||||
MATRIX_COMPONENT: ${{ matrix.component }}
|
||||
DOCKER_REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
|
||||
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||
run: |
|
||||
$base_image_file=$Env:BASE_BUILD_IMAGE_NAME + '_' + $Env:MATRIX_OS + '_' + $Env:MATRIX_COMPONENT
|
||||
$base_tag = Get-Content $base_image_file -Raw
|
||||
$build_base_image="$Env:DOCKER_REPOSITORY/$Env:IMAGES_PREFIX$Env:BASE_BUILD_IMAGE_NAME@" + $base_tag
|
||||
|
||||
echo "::group::Base image Info"
|
||||
echo "base_tag=$base_tag"
|
||||
echo "base_build_image=$build_base_image"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "base_tag=$base_tag" >> $Env:GITHUB_OUTPUT
|
||||
echo "base_build_image=$build_base_image" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Verify ${{ env.BASE_BUILD_IMAGE_NAME }}:${{ matrix.os }} cosign
|
||||
env:
|
||||
BASE_IMAGE: ${{ steps.base_build.outputs.base_build_image }}
|
||||
OIDC_ISSUER: ${{ env.OIDC_ISSUER }}
|
||||
IDENITY_REGEX: ${{ env.IDENITY_REGEX }}
|
||||
run: |
|
||||
cosign verify `
|
||||
--certificate-oidc-issuer-regexp "$Env:OIDC_ISSUER" `
|
||||
--certificate-identity-regexp "$Env:IDENITY_REGEX" `
|
||||
"$Env:BASE_IMAGE" | jq
|
||||
|
||||
- name: Build and push image
|
||||
id: docker_build
|
||||
env:
|
||||
DOCKERFILES_DIRECTORY: ${{ env.DOCKERFILES_DIRECTORY }}
|
||||
BASE_BUILD_IMAGE: ${{ steps.base_build.outputs.base_build_image }}
|
||||
BASE_BUILD_IMAGE_NAME: ${{ env.BASE_BUILD_IMAGE_NAME }}
|
||||
MATRIX_COMPONENT: ${{ matrix.component }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
BASE_BUILD_OS_TAG: ${{ steps.base_os_tag.outputs.os_tag }}
|
||||
LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
OS_BASE_IMAGE_NAME: ${{ env.OS_BASE_IMAGE_NAME }}
|
||||
AUTO_PUSH_IMAGES: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
run: |
|
||||
echo "::group::Docker version"
|
||||
docker version
|
||||
echo "::endgroup::"
|
||||
echo "::group::Docker info"
|
||||
docker info
|
||||
echo "::endgroup::"
|
||||
|
||||
$context="$Env:DOCKERFILES_DIRECTORY\$Env:MATRIX_COMPONENT\windows\"
|
||||
$dockerfile= $context + 'Dockerfile'
|
||||
$base_build_image= $Env:BASE_BUILD_IMAGE
|
||||
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
||||
|
||||
# PowerShell images based on LTSC 2019 and LTSC 2016 do not have "ltsc" prefix
|
||||
$os_tag_suffix=$Env:BASE_BUILD_OS_TAG
|
||||
# $os_tag_suffix=$os_tag_suffix -replace "ltsc2019",'1809'
|
||||
$base_image=$Env:OS_BASE_IMAGE_NAME + ':' + $os_tag_suffix
|
||||
|
||||
echo "::group::Image tags"
|
||||
echo "$Env:TAGS"
|
||||
echo "::endgroup::"
|
||||
echo "::group::Pull build base image"
|
||||
docker pull $base_build_image
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
echo "::group::Pull Powershell base image"
|
||||
docker pull $base_image
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build Image"
|
||||
Write-Host @"
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED
|
||||
--build-arg=BUILD_BASE_IMAGE=$base_build_image
|
||||
--build-arg=OS_BASE_IMAGE=$base_image
|
||||
--file=$dockerfile
|
||||
$tags
|
||||
$context
|
||||
"@
|
||||
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION `
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED `
|
||||
--build-arg=BUILD_BASE_IMAGE=$base_build_image `
|
||||
--build-arg=OS_BASE_IMAGE=$base_image `
|
||||
--file=$dockerfile `
|
||||
$tags `
|
||||
$context
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Publish Image"
|
||||
if ( $Env:AUTO_PUSH_IMAGES -eq 'true' ) {
|
||||
Foreach ($tag in $tags_array) {
|
||||
echo "docker image push $tag"
|
||||
docker image push $tag
|
||||
if (-not $?) {throw "Failed"}
|
||||
}
|
||||
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .RepoDigests 0}}").Split('@')[-1]
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from RepoDigests"
|
||||
}
|
||||
else {
|
||||
$digest=$(docker inspect $tags_array[0] --format "{{ index .Id}}")
|
||||
if (-not $?) {throw "Failed"}
|
||||
echo "Image digest got from Id"
|
||||
}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Digest"
|
||||
echo "$digest"
|
||||
echo "::endgroup::"
|
||||
echo "digest=$digest" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Sign the images with GitHub OIDC Token
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
run: |
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tag_list=@()
|
||||
|
||||
|
||||
foreach ($tag in $tags_array) {
|
||||
$tag_name=$tag.Split(":")[0]
|
||||
$tag_list+="$tag_name@$Env:DIGEST"
|
||||
}
|
||||
echo "::group::Images to sign"
|
||||
echo "$tag_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Signing"
|
||||
echo "cosign sign --yes $tag_list"
|
||||
cosign sign --yes $tag_list
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Image digest
|
||||
if: ${{ env.AUTO_PUSH_IMAGES }}
|
||||
env:
|
||||
DIGEST: ${{ steps.docker_build.outputs.digest }}
|
||||
run: |
|
||||
echo "::group::Image digest"
|
||||
echo "$Env:DIGEST"
|
||||
echo "::endgroup::"
|
||||
157
.github/workflows/rhel_registry_description.yml
vendored
Normal file
157
.github/workflows/rhel_registry_description.yml
vendored
Normal file
@ -0,0 +1,157 @@
|
||||
name: Red Hat Catalog Description
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '[0-9]+.[0-9]+'
|
||||
paths:
|
||||
- 'Dockerfiles/*/rhel/README.html'
|
||||
- 'Dockerfiles/*/README.md'
|
||||
- 'Dockerfiles/*/rhel/README.md'
|
||||
- '.github/workflows/rhel_registry_description.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKERFILES_DIRECTORY: "./Dockerfiles"
|
||||
API_URL: "https://catalog.redhat.com/api/containers/v1/projects/certification/id/"
|
||||
MATRIX_FILE: "build.json"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
init:
|
||||
name: Initialize workflow
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
components: ${{ steps.components.outputs.list }}
|
||||
zabbix_release: ${{ steps.branch_info.outputs.zabbix_release }}
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
github.com:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: ${{ env.MATRIX_FILE }}
|
||||
|
||||
- name: Check ${{ env.MATRIX_FILE }} file
|
||||
id: build_exists
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
if [[ ! -f "$MATRIX_FILE" ]]; then
|
||||
echo "::error::File $MATRIX_FILE is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Get branch info
|
||||
id: branch_info
|
||||
shell: bash
|
||||
env:
|
||||
github_ref: ${{ github.ref }}
|
||||
run: |
|
||||
result=false
|
||||
|
||||
github_ref=${github_ref##*/}
|
||||
|
||||
echo "::group::Branch metadata"
|
||||
echo "zabbix_release=${github_ref//.}"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "zabbix_release=${github_ref//.}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Prepare Zabbix component list
|
||||
id: components
|
||||
env:
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
component_list=$(jq -r '.components | map_values(select(.rhel == true)) | keys | @json' "$MATRIX_FILE")
|
||||
|
||||
echo "::group::Zabbix Component List"
|
||||
echo "$component_list"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "list=$component_list" >> $GITHUB_OUTPUT
|
||||
|
||||
publish:
|
||||
name: Initialize build
|
||||
runs-on: ubuntu-latest
|
||||
needs: init
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
component: ${{ fromJson(needs.init.outputs.components) }}
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
disable-sudo: true
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
catalog.redhat.com:443
|
||||
files.pythonhosted.org:443
|
||||
github.com:443
|
||||
pypi.org:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Variables formating
|
||||
id: var_format
|
||||
env:
|
||||
MATRIX_BUILD: ${{ matrix.component }}
|
||||
run: |
|
||||
MATRIX_BUILD=${MATRIX_BUILD^^}
|
||||
MATRIX_BUILD=${MATRIX_BUILD//-/_}
|
||||
|
||||
echo "::group::Result"
|
||||
echo "matrix_build=${MATRIX_BUILD}"
|
||||
echo "::endgroup::"
|
||||
echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup Python 3.x
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install markdown requests
|
||||
|
||||
- name: Update Red Hat project description
|
||||
env:
|
||||
DESCRIPTION_FILE: ${{ format('{0}/{1}/rhel/README', env.DOCKERFILES_DIRECTORY, matrix.component) }}
|
||||
PROJECT_ID: ${{ secrets[format('RHEL_{0}_{1}_PROJECT', needs.init.outputs.zabbix_release, steps.var_format.outputs.matrix_build)] }}
|
||||
PYXIS_API_TOKEN: ${{ secrets.REDHAT_API_TOKEN }}
|
||||
API_URL: ${{ env.API_URL }}
|
||||
run: |
|
||||
python ./.github/scripts/rhel_description.py
|
||||
|
||||
- name: Red Hat Gatalog URL
|
||||
env:
|
||||
COMPONENT: ${{ matrix.component }}
|
||||
MATRIX_FILE: ${{ env.MATRIX_FILE }}
|
||||
run: |
|
||||
PROJECT_ID=$(jq -r ".components.\"$COMPONENT\".rhel_project" "$MATRIX_FILE")
|
||||
|
||||
echo "::group::URL"
|
||||
echo "https://catalog.redhat.com/software/containers/${PROJECT_ID}"
|
||||
echo "::endgroup::"
|
||||
78
.github/workflows/scorecard.yml
vendored
Normal file
78
.github/workflows/scorecard.yml
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '39 3 * * 2'
|
||||
push:
|
||||
branches:
|
||||
- '7.2'
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecard on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
61
.github/workflows/sonarcloud.yml
vendored
Normal file
61
.github/workflows/sonarcloud.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow helps you trigger a SonarCloud analysis of your code and populates
|
||||
# GitHub Code Scanning alerts with the vulnerabilities found.
|
||||
# Free for open source project.
|
||||
|
||||
# 1. Login to SonarCloud.io using your GitHub account
|
||||
|
||||
# 2. Import your project on SonarCloud
|
||||
# * Add your GitHub organization first, then add your repository as a new project.
|
||||
# * Please note that many languages are eligible for automatic analysis,
|
||||
# which means that the analysis will start automatically without the need to set up GitHub Actions.
|
||||
# * This behavior can be changed in Administration > Analysis Method.
|
||||
#
|
||||
# 3. Follow the SonarCloud in-product tutorial
|
||||
# * a. Copy/paste the Project Key and the Organization Key into the args parameter below
|
||||
# (You'll find this information in SonarCloud. Click on "Information" at the bottom left)
|
||||
#
|
||||
# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN
|
||||
# (On SonarCloud, click on your avatar on top-right > My account > Security
|
||||
# or go directly to https://sonarcloud.io/account/security/)
|
||||
|
||||
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
|
||||
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9)
|
||||
|
||||
name: SonarCloud analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "7.4" ]
|
||||
pull_request:
|
||||
branches: [ "7.4" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
|
||||
|
||||
jobs:
|
||||
Analysis:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Block egress traffic
|
||||
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Analyze with SonarCloud
|
||||
uses: SonarSource/sonarqube-scan-action@v7.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
|
||||
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
**.DS_Store
|
||||
zbx_env/
|
||||
zbx_env*/
|
||||
.*CERT_FILE
|
||||
.*KEY_FILE
|
||||
.*CA_FILE
|
||||
Dockerfiles/*/rhel/secrets/*
|
||||
sources/*
|
||||
.*.orig
|
||||
.*.rej
|
||||
41
.pre-commit-config.yaml
Normal file
41
.pre-commit-config.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
repos:
|
||||
- repo: https://github.com/gitleaks/gitleaks
|
||||
rev: v8.16.3
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||
rev: 3.0.0
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
exclude: |
|
||||
(?x)(
|
||||
^env_vars/\.MYSQL |
|
||||
^env_vars/\.POSTGRES
|
||||
)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
exclude: |
|
||||
(?x)(
|
||||
.*\.patch$
|
||||
)
|
||||
- id: check-yaml
|
||||
args: [--allow-multiple-documents]
|
||||
- id: check-symlinks
|
||||
# - id: pretty-format-json
|
||||
- id: check-added-large-files
|
||||
#- repo: https://github.com/adrienverge/yamllint.git
|
||||
# rev: v1.21.0 # or higher tag
|
||||
# hooks:
|
||||
# - id: yamllint
|
||||
# args: [--format, parsable, --strict]
|
||||
#- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
|
||||
# rev: 0.2.3
|
||||
# hooks:
|
||||
# - id: yamlfmt
|
||||
# args: [--mapping, '2', --sequence, '1', --offset, '0', --colons, --width, '400']
|
||||
@ -14,15 +14,17 @@ Zabbix agent is deployed on a monitoring target to actively monitor local resour
|
||||
|
||||
# Zabbix agent images
|
||||
|
||||
These are the only official Zabbix agent Docker images. They are based on Alpine Linux v3.4, Ubuntu 14.04 (trusty) and CentOS 7 images. The available versions of Zabbix agent are:
|
||||
These are the only official Zabbix agent Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10, Oracle Linux 10, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent are:
|
||||
|
||||
Zabbix agent 3.0 (tags: alpine-3.0-latest, ubuntu-3.0-latest, centos-3.0-latest)
|
||||
Zabbix agent 3.0.* (tags: alpine-3.0.*, ubuntu-3.0.*, centos-3.0.*)
|
||||
Zabbix agent 3.2 (tags: alpine-3.2-latest, ubuntu-3.2-latest, centos-3.2-latest)
|
||||
Zabbix agent 3.2.* (tags: alpine-3.2.*, ubuntu-3.2.*, centos-3.2.*)
|
||||
Zabbix agent 3.4 (tags: alpine-3.4-latest, ubuntu-3.4-latest, centos-3.4-latest, alpine-latest, ubuntu-latest, centos-latest, latest)
|
||||
Zabbix agent 3.4.* (tags: alpine-3.4.*, ubuntu-3.4.*, centos-3.4.*)
|
||||
Zabbix agent 4.0 (tags: alpine-trunk, ubuntu-trunk, centos-trunk)
|
||||
Zabbix agent 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
|
||||
Zabbix agent 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*)
|
||||
Zabbix agent 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
|
||||
Zabbix agent 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
|
||||
Zabbix agent 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest)
|
||||
Zabbix agent 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
|
||||
Zabbix agent 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest)
|
||||
Zabbix agent 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
|
||||
Zabbix agent 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
|
||||
|
||||
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
|
||||
|
||||
@ -32,7 +34,7 @@ Images are updated when new releases are published. The image with ``latest`` ta
|
||||
|
||||
Start a Zabbix agent container as follows:
|
||||
|
||||
docker run --name some-zabbix-agent -e ZBX_HOSTNAME="some-hostname" -e ZBX_SERVER_HOST="some-zabbix-server" -d zabbix/zabbix-agent:tag
|
||||
docker run --name some-zabbix-agent -e ZBX_HOSTNAME="some-hostname" -e ZBX_SERVER_HOST="some-zabbix-server" --init -d zabbix/zabbix-agent:tag
|
||||
|
||||
Where `some-zabbix-agent` is the name you want to assign to your container, `some-hostname` is the hostname, it is Hostname parameter in Zabbix agent configuration file, `some-zabbix-server` is IP or DNS name of Zabbix server or proxy and `tag` is the tag specifying the version you want. See the list above for relevant tags, or look at the [full list of tags](https://hub.docker.com/r/zabbix/zabbix-agent/tags/).
|
||||
|
||||
@ -41,7 +43,7 @@ Where `some-zabbix-agent` is the name you want to assign to your container, `som
|
||||
This image exposes the standard Zabbix agent port (``10050``) to perform passive checks, so container linking makes Zabbix agent instance available to Zabbix server and Zabbix proxy containers. Start your application container like this in order to link it to the Zabbix agent container:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent -d zabbix/zabbix-server:latest
|
||||
$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent --init -d zabbix/zabbix-server:latest
|
||||
```
|
||||
|
||||
## Connect to Zabbix server or Zabbix proxy containers (Active checks)
|
||||
@ -49,7 +51,7 @@ $ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent -d
|
||||
This image supports perform active checks, so container linking makes Zabbix server and Zabbix proxy containers available to Zabbix agent instance. Start your application container like this in order to link Zabbix agent to Zabbix server or Zabbix proxy containterns:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --init -d zabbix/zabbix-agent:latest
|
||||
```
|
||||
|
||||
## Container shell access and viewing Zabbix agent logs
|
||||
@ -71,10 +73,10 @@ $ docker logs some-zabbix-agent
|
||||
By default, Docker containers are "unprivileged" and do not have access to the most of host resources. Zabbix agent is designed to monitor system resources, to do that Zabbix agent container must be privileged or you may mount some system-wide volumes. For example:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --privileged -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --privileged --init -d zabbix/zabbix-agent:latest
|
||||
```
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -v /dev/sdc:/dev/sdc -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -v /dev/sdc:/dev/sdc --init -d zabbix/zabbix-agent:latest
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
@ -129,8 +131,11 @@ Additionally the image allows to specify many other environment variables listed
|
||||
|
||||
```
|
||||
ZBX_SOURCEIP=
|
||||
ZBX_ENABLEREMOTECOMMANDS=0
|
||||
ZBX_ENABLEREMOTECOMMANDS=0 # Deprecated since 5.0.0
|
||||
ZBX_LOGREMOTECOMMANDS=0
|
||||
ZBX_HEARTBEAT_FREQUENCY=60 # Available since 6.2.0
|
||||
ZBX_HOSTINTERFACE= # Available since 4.4.0
|
||||
ZBX_HOSTINTERFACEITEM= # Available since 4.4.0
|
||||
ZBX_STARTAGENTS=3
|
||||
ZBX_HOSTNAMEITEM=system.hostname
|
||||
ZBX_METADATA=
|
||||
@ -140,24 +145,39 @@ ZBX_BUFFERSEND=5
|
||||
ZBX_BUFFERSIZE=100
|
||||
ZBX_MAXLINESPERSECOND=20
|
||||
ZBX_LISTENIP=
|
||||
ZBX_LISTENPORT=10050
|
||||
ZBX_LISTENBACKLOG=
|
||||
ZBX_UNSAFEUSERPARAMETERS=0
|
||||
ZBX_TLSCONNECT=unencrypted
|
||||
ZBX_TLSACCEPT=unencrypted
|
||||
ZBX_TLSCAFILE=
|
||||
ZBX_TLSCA=
|
||||
ZBX_TLSCRLFILE=
|
||||
ZBX_TLSCRL=
|
||||
ZBX_TLSSERVERCERTISSUER=
|
||||
ZBX_TLSSERVERCERTSUBJECT=
|
||||
ZBX_TLSCERTFILE=
|
||||
ZBX_TLSCERT=
|
||||
ZBX_TLSKEYFILE=
|
||||
ZBX_TLSKEY=
|
||||
ZBX_TLSPSKIDENTITY=
|
||||
ZBX_TLSPSKFILE=
|
||||
ZBX_TLSPSK=
|
||||
ZBX_TLSCIPHERALL= # Available since 4.4.7
|
||||
ZBX_TLSCIPHERALL13= # Available since 4.4.7
|
||||
ZBX_TLSCIPHERCERT= # Available since 4.4.7
|
||||
ZBX_TLSCIPHERCERT13= # Available since 4.4.7
|
||||
ZBX_TLSCIPHERPSK= # Available since 4.4.7
|
||||
ZBX_TLSCIPHERPSK13= # Available since 4.4.7
|
||||
ZBX_DENYKEY=system.run[*] # Available since 5.0.0
|
||||
ZBX_ALLOWKEY= # Available since 5.0.0
|
||||
```
|
||||
|
||||
Default values of these variables are specified after equal sign.
|
||||
|
||||
The allowed variables are identical of parameters in official ``zabbix_agentd.conf`` configuration file. For example, ``ZBX_REFRESHACTIVECHECKS`` = ``RefreshActiveChecks``.
|
||||
|
||||
Please use official documentation for [``zabbix_agentd.conf``](https://www.zabbix.com/documentation/3.0/manual/appendix/config/zabbix_agentd) to get more information about the variables.
|
||||
Please use official documentation for [``zabbix_agentd.conf``](https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agentd) to get more information about the variables.
|
||||
|
||||
## Allowed volumes for the Zabbix agent container
|
||||
|
||||
@ -171,16 +191,12 @@ The volume allows load additional modules and extend Zabbix agent using ``LoadMo
|
||||
|
||||
### ``/var/lib/zabbix/enc``
|
||||
|
||||
The volume is used to store TLS related files. These file names are specified using ``ZBX_TLSCAFILE``, ``ZBX_TLSCRLFILE``, ``ZBX_TLSKEY_FILE`` and ``ZBX_TLSPSKFILE`` variables.
|
||||
The volume is used to store TLS related files. These file names are specified using ``ZBX_TLSCAFILE``, ``ZBX_TLSCRLFILE``, ``ZBX_TLSCERTFILE``, ``ZBX_TLSKEYFILE`` and ``ZBX_TLSPSKFILE`` variables. Additionally it is possible to use environment variables ``ZBX_TLSCA``, ``ZBX_TLSCRL``, ``ZBX_TLSCERT``, ``ZBX_TLSKEY`` and ``ZBX_TLSPSK`` with plaintext values.
|
||||
|
||||
# The image variants
|
||||
|
||||
The `zabbix-agent` images come in many flavors, each designed for a specific use case.
|
||||
|
||||
## `zabbix-agent:ubuntu-<version>`
|
||||
|
||||
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
|
||||
|
||||
## `zabbix-agent:alpine-<version>`
|
||||
|
||||
This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
|
||||
@ -189,6 +205,14 @@ This variant is highly recommended when final image size being as small as possi
|
||||
|
||||
To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).
|
||||
|
||||
## `zabbix-agent:ubuntu-<version>`
|
||||
|
||||
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
|
||||
|
||||
## `zabbix-agent:ol-<version>`
|
||||
|
||||
Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more.
|
||||
|
||||
# Supported Docker versions
|
||||
|
||||
This image is officially supported on Docker version 1.12.0.
|
||||
@ -201,7 +225,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for this image is stored in the [`agent/` directory](https://github.com/zabbix/zabbix-docker/tree/3.0/agent) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
|
||||
Documentation for this image is stored in the [`agent/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request.
|
||||
|
||||
## Issues
|
||||
|
||||
@ -216,3 +240,12 @@ Currently it is not allowed to specify ``ZBX_ALIAS`` environment variable. Pleas
|
||||
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
|
||||
|
||||
Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
|
||||
|
||||
## License
|
||||
|
||||
Starting from Zabbix version 7.0, all subsequent Zabbix versions will be released under the GNU Affero General Public License version 3 (AGPLv3).
|
||||
You can modify the relevant version and propagate such modified version under the terms of the AGPLv3 as published by the Free Software Foundation.
|
||||
For additional details, including answers to common questions about the AGPLv3, see the generic FAQ from the [Free Software Foundation](http://www.fsf.org/licenses/gpl-faq.html).
|
||||
|
||||
Zabbix is Open Source Software, however, if you use Zabbix in a commercial context we kindly ask you to support the development of Zabbix by purchasing some level of technical support.
|
||||
All previous Zabbix software versions up to 6.4 are released under the GNU General Public License version 2 (GPLv2). The formal terms of the GPLv2 and AGPLv3 can be found at http://www.fsf.org/licenses/.
|
||||
102
Dockerfiles/agent/alpine/Dockerfile
Normal file
102
Dockerfiles/agent/alpine/Dockerfile
Normal file
@ -0,0 +1,102 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=alpine:3.23
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
tzdata \
|
||||
coreutils \
|
||||
iputils \
|
||||
c-ares \
|
||||
pcre2 \
|
||||
libgcc \
|
||||
libcurl \
|
||||
libmodbus \
|
||||
libldap \
|
||||
zlib" && \
|
||||
apk add \
|
||||
--no-cache \
|
||||
--clean-protected \
|
||||
${INSTALL_PKGS} && \
|
||||
addgroup \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
adduser \
|
||||
--system \
|
||||
--gecos "Zabbix monitoring system" \
|
||||
--disabled-password \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agentd -V
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
1
Dockerfiles/agent/alpine/README.md
Symbolic link
1
Dockerfiles/agent/alpine/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent/alpine/build.sh
Symbolic link
1
Dockerfiles/agent/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
220
Dockerfiles/agent/alpine/docker-entrypoint.sh
Executable file
220
Dockerfiles/agent/alpine/docker-entrypoint.sh
Executable file
@ -0,0 +1,220 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
ZBX_SERVER_HOST=${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
ZBX_SERVER_PORT=${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf" "LoadModule" "${ZBX_LOADMODULE}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
export ZBX_USER="$(whoami)"
|
||||
else
|
||||
export ZBX_ALLOWROOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
|
||||
prepare_zbx_agent_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agentd "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agentd' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
121
Dockerfiles/agent/centos/Dockerfile
Normal file
121
Dockerfiles/agent/centos/Dockerfile
Normal file
@ -0,0 +1,121 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
c-ares \
|
||||
pcre2 \
|
||||
libcurl-minimal \
|
||||
# libmodbus \
|
||||
openssl-libs \
|
||||
openldap \
|
||||
shadow-utils \
|
||||
zlib" && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "extras-common" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs epel-release && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "baseos" \
|
||||
--enablerepo "appstream" \
|
||||
--enablerepo="epel" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs ${INSTALL_PKGS} && \
|
||||
microdnf -y reinstall \
|
||||
--enablerepo "baseos" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agentd -V
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
1
Dockerfiles/agent/centos/README.md
Symbolic link
1
Dockerfiles/agent/centos/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent/centos/build.sh
Symbolic link
1
Dockerfiles/agent/centos/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
220
Dockerfiles/agent/centos/docker-entrypoint.sh
Executable file
220
Dockerfiles/agent/centos/docker-entrypoint.sh
Executable file
@ -0,0 +1,220 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
ZBX_SERVER_HOST=${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
ZBX_SERVER_PORT=${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf" "LoadModule" "${ZBX_LOADMODULE}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
export ZBX_USER="$(whoami)"
|
||||
else
|
||||
export ZBX_ALLOWROOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
|
||||
prepare_zbx_agent_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agentd "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agentd' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
107
Dockerfiles/agent/ol/Dockerfile
Normal file
107
Dockerfiles/agent/ol/Dockerfile
Normal file
@ -0,0 +1,107 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
c-ares \
|
||||
pcre2 \
|
||||
libcurl \
|
||||
# libmodbus \
|
||||
openssl-libs \
|
||||
zlib" && \
|
||||
microdnf -y install \
|
||||
--disablerepo="*" \
|
||||
--enablerepo="ol10_baseos_latest" \
|
||||
--enablerepo="ol10_appstream" \
|
||||
--enablerepo="ol10_u0_developer_EPEL" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agentd -V
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
1
Dockerfiles/agent/ol/README.md
Symbolic link
1
Dockerfiles/agent/ol/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent/ol/build.sh
Symbolic link
1
Dockerfiles/agent/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
@ -0,0 +1,6 @@
|
||||
[ol10_u0_developer_EPEL]
|
||||
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
|
||||
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
220
Dockerfiles/agent/ol/docker-entrypoint.sh
Executable file
220
Dockerfiles/agent/ol/docker-entrypoint.sh
Executable file
@ -0,0 +1,220 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
ZBX_SERVER_HOST=${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
ZBX_SERVER_PORT=${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf" "LoadModule" "${ZBX_LOADMODULE}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
export ZBX_USER="$(whoami)"
|
||||
else
|
||||
export ZBX_ALLOWROOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
|
||||
prepare_zbx_agent_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agentd "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agentd' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
147
Dockerfiles/agent/rhel/Dockerfile
Normal file
147
Dockerfiles/agent/rhel/Dockerfile
Normal file
@ -0,0 +1,147 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG RELEASE=6
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG RELEASE
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
name="zabbix/zabbix-agent-74" \
|
||||
release="${RELEASE}" \
|
||||
run="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-74:${ZBX_VERSION}" \
|
||||
summary="Zabbix agent" \
|
||||
url="https://www.zabbix.com/" \
|
||||
vendor="Zabbix SIA" \
|
||||
version="${MAJOR_VERSION}" \
|
||||
io.k8s.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
io.k8s.display-name="Zabbix Agent" \
|
||||
io.openshift.expose-services="10050:10050" \
|
||||
io.openshift.tags="zabbix,zabbix-agent" \
|
||||
org.label-schema.build-date="${BUILD_DATE}" \
|
||||
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.label-schema.docker.cmd="podman run --name zabbix-agent -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-74:${ZBX_VERSION}" \
|
||||
org.label-schema.license="AGPL v3.0" \
|
||||
org.label-schema.name="zabbix-agent-rhel" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
||||
org.label-schema.vendor="Zabbix SIA" \
|
||||
org.label-schema.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
shadow-utils \
|
||||
c-ares \
|
||||
pcre2 \
|
||||
# libmodbus \
|
||||
libcurl-minimal \
|
||||
openldap \
|
||||
zlib" && \
|
||||
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-10-baseos-rpms" \
|
||||
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \
|
||||
--enablerepo "epel" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
microdnf -y update \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-10-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
# microdnf -y reinstall \
|
||||
# --disableplugin=subscription-manager \
|
||||
# --disablerepo "*" \
|
||||
# --enablerepo "ubi-10-baseos-rpms" \
|
||||
# --setopt=install_weak_deps=0 \
|
||||
# --setopt=keepcache=0 \
|
||||
# --best \
|
||||
# --setopt=tsflags=nodocs \
|
||||
# tzdata && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agentd -V
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
121
Dockerfiles/agent/rhel/README.html
Normal file
121
Dockerfiles/agent/rhel/README.html
Normal file
@ -0,0 +1,121 @@
|
||||
<p><img src="https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png" alt="logo"></p>
|
||||
<h1 id="what-is-zabbix-">What is Zabbix?</h1>
|
||||
<p>Zabbix is an enterprise-class open source distributed monitoring solution.</p>
|
||||
<p>Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning.</p>
|
||||
<p>For more information and related downloads for Zabbix components, please visit <a href="https://hub.docker.com/u/zabbix/">https://hub.docker.com/u/zabbix/</a> and <a href="https://zabbix.com">https://zabbix.com</a></p>
|
||||
<h1 id="what-is-zabbix-agent-">What is Zabbix agent?</h1>
|
||||
<p>Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications (hard drives, memory, processor statistics etc).</p>
|
||||
<h1 id="zabbix-agent-images">Zabbix agent images</h1>
|
||||
<p>These are the only official Zabbix agent Docker images.</p>
|
||||
<h1 id="how-to-use-this-image">How to use this image</h1>
|
||||
<h2 id="start-zabbix-agent-">Start <code>zabbix-agent</code></h2>
|
||||
<p>Start a Zabbix agent container as follows:</p>
|
||||
<pre><code>podman <span class="hljs-keyword">run</span><span class="bash"> --name some-zabbix-agent <span class="hljs-_">-e</span> ZBX_HOSTNAME=<span class="hljs-string">"some-hostname"</span> <span class="hljs-_">-e</span> ZBX_SERVER_HOST=<span class="hljs-string">"some-zabbix-server"</span> --init <span class="hljs-_">-d</span> zabbix/zabbix-agent:tag</span>
|
||||
</code></pre><p>Where <code>some-zabbix-agent</code> is the name you want to assign to your container, <code>some-hostname</code> is the hostname, it is Hostname parameter in Zabbix agent configuration file, <code>some-zabbix-server</code> is IP or DNS name of Zabbix server or proxy and <code>tag</code> is the tag specifying the version you want.</p>
|
||||
<h2 id="connects-from-zabbix-server-or-zabbix-proxy-in-other-containers-passive-checks-">Connects from Zabbix server or Zabbix proxy in other containers (Passive checks)</h2>
|
||||
<p>This image exposes the standard Zabbix agent port (<code>10050</code>) to perform passive checks, so container linking makes Zabbix agent instance available to Zabbix server and Zabbix proxy containers. Start your application container like this in order to link it to the Zabbix agent container:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:latest</span>
|
||||
</code></pre>
|
||||
<h2 id="connect-to-zabbix-server-or-zabbix-proxy-containers-active-checks-">Connect to Zabbix server or Zabbix proxy containers (Active checks)</h2>
|
||||
<p>This image supports perform active checks, so container linking makes Zabbix server and Zabbix proxy containers available to Zabbix agent instance. Start your application container like this in order to link Zabbix agent to Zabbix server or Zabbix proxy containterns:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent:latest</span>
|
||||
</code></pre>
|
||||
<h2 id="container-shell-access-and-viewing-zabbix-agent-logs">Container shell access and viewing Zabbix agent logs</h2>
|
||||
<p>The <code>podman exec</code> command allows you to run commands inside a Podman container. The following command line will give you a bash shell inside your <code>zabbix-agent</code> container:</p>
|
||||
<pre><code class="lang-console">$ podman <span class="hljs-built_in">exec</span> -ti some-zabbix-<span class="hljs-built_in">agent</span> /bin/bash
|
||||
</code></pre>
|
||||
<p>The Zabbix agent log is available through Podman's container log:</p>
|
||||
<pre><code class="lang-console">$ podman logs <span class="hljs-keyword">some</span>-zabbix-agent
|
||||
</code></pre>
|
||||
<h2 id="privileged-mode">Privileged mode</h2>
|
||||
<p>By default, Podman containers are "unprivileged" and do not have access to the most of host resources. Zabbix agent is designed to monitor system resources, to do that Zabbix agent container must be privileged or you may mount some system-wide volumes. For example:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">privileged</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent:latest</span>
|
||||
</code></pre>
|
||||
<pre><code class="lang-console">$ podman run --name some-zabbix-agent --link some-zabbix-<span class="hljs-string">server:</span>zabbix-server -v <span class="hljs-regexp">/dev/</span><span class="hljs-string">sdc:</span><span class="hljs-regexp">/dev/</span>sdc --init -d zabbix/zabbix-<span class="hljs-string">agent:</span>latest
|
||||
</code></pre>
|
||||
<h2 id="environment-variables">Environment Variables</h2>
|
||||
<p>When you start the <code>zabbix-agent</code> image, you can adjust the configuration of the Zabbix agent by passing one or more environment variables on the <code>podman run</code> command line.</p>
|
||||
<h3 id="-zbx_hostname-"><code>ZBX_HOSTNAME</code></h3>
|
||||
<p>This variable is unique, case sensitive hostname. By default, value is <code>hostname</code> of the container. It is <code>Hostname</code> parameter in <code>zabbix_agentd.conf</code>.</p>
|
||||
<h3 id="-zbx_server_host-"><code>ZBX_SERVER_HOST</code></h3>
|
||||
<p>This variable is IP or DNS name of Zabbix server or Zabbix proxy. By default, value is <code>zabbix-server</code>. It is <code>Server</code> parameter in <code>zabbix_agentd.conf</code>. It is allowed to specify Zabbix server or Zabbix proxy port number using <code>ZBX_SERVER_PORT</code> variable. It make sense in case of non-default port for active checks.</p>
|
||||
<h3 id="-zbx_passive_allow-"><code>ZBX_PASSIVE_ALLOW</code></h3>
|
||||
<p>This variable is boolean (<code>true</code> or <code>false</code>) and enables or disables feature of passive checks. By default, value is <code>true</code>.</p>
|
||||
<h3 id="-zbx_passiveservers-"><code>ZBX_PASSIVESERVERS</code></h3>
|
||||
<p>The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent container.</p>
|
||||
<h3 id="-zbx_active_allow-"><code>ZBX_ACTIVE_ALLOW</code></h3>
|
||||
<p>This variable is boolean (<code>true</code> or <code>false</code>) and enables or disables feature of active checks. By default, value is <code>true</code>.</p>
|
||||
<h3 id="-zbx_activeservers-"><code>ZBX_ACTIVESERVERS</code></h3>
|
||||
<p>The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent container. You may specify port of Zabbix server or Zabbix proxy in such syntax: <code>zabbix-server:10061,zabbix-proxy:10072</code>.</p>
|
||||
<h3 id="-zbx_loadmodule-"><code>ZBX_LOADMODULE</code></h3>
|
||||
<p>The variable is list of comma separated loadable Zabbix modules. It works with volume <code>/var/lib/zabbix/modules</code>. The syntax of the variable is <code>dummy1.so,dummy2.so</code>.</p>
|
||||
<h3 id="-zbx_debuglevel-"><code>ZBX_DEBUGLEVEL</code></h3>
|
||||
<p>The variable is used to specify debug level. By default, value is <code>3</code>. It is <code>DebugLevel</code> parameter in <code>zabbix_agentd.conf</code>. Allowed values are listed below:</p>
|
||||
<ul>
|
||||
<li><code>0</code> - basic information about starting and stopping of Zabbix processes;</li>
|
||||
<li><code>1</code> - critical information</li>
|
||||
<li><code>2</code> - error information</li>
|
||||
<li><code>3</code> - warnings</li>
|
||||
<li><code>4</code> - for debugging (produces lots of information)</li>
|
||||
<li><code>5</code> - extended debugging (produces even more information)</li>
|
||||
</ul>
|
||||
<h3 id="-zbx_timeout-"><code>ZBX_TIMEOUT</code></h3>
|
||||
<p>The variable is used to specify timeout for processing checks. By default, value is <code>3</code>.</p>
|
||||
<h3 id="other-variables">Other variables</h3>
|
||||
<p>Additionally the image allows to specify many other environment variables listed below:</p>
|
||||
<pre><code><span class="hljs-attr">ZBX_SOURCEIP</span>=
|
||||
<span class="hljs-attr">ZBX_ENABLEREMOTECOMMANDS</span>=<span class="hljs-number">0</span> # Deprecated since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_LOGREMOTECOMMANDS</span>=<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_HEARTBEAT_FREQUENCY</span>=<span class="hljs-number">60</span> # Available since <span class="hljs-number">6.2</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_HOSTINTERFACE</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_HOSTINTERFACEITEM</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_STARTAGENTS</span>=<span class="hljs-number">3</span>
|
||||
<span class="hljs-attr">ZBX_HOSTNAMEITEM</span>=system.hostname
|
||||
<span class="hljs-attr">ZBX_METADATA</span>=
|
||||
<span class="hljs-attr">ZBX_METADATAITEM</span>=
|
||||
<span class="hljs-attr">ZBX_REFRESHACTIVECHECKS</span>=<span class="hljs-number">120</span>
|
||||
<span class="hljs-attr">ZBX_BUFFERSEND</span>=<span class="hljs-number">5</span>
|
||||
<span class="hljs-attr">ZBX_BUFFERSIZE</span>=<span class="hljs-number">100</span>
|
||||
<span class="hljs-attr">ZBX_MAXLINESPERSECOND</span>=<span class="hljs-number">20</span>
|
||||
<span class="hljs-attr">ZBX_LISTENIP</span>=
|
||||
<span class="hljs-attr">ZBX_LISTENPORT</span>=<span class="hljs-number">10050</span>
|
||||
<span class="hljs-attr">ZBX_LISTENBACKLOG</span>=
|
||||
<span class="hljs-attr">ZBX_UNSAFEUSERPARAMETERS</span>=<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_TLSCONNECT</span>=unencrypted
|
||||
<span class="hljs-attr">ZBX_TLSACCEPT</span>=unencrypted
|
||||
<span class="hljs-attr">ZBX_TLSCAFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSCRLFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSSERVERCERTISSUER</span>=
|
||||
<span class="hljs-attr">ZBX_TLSSERVERCERTSUBJECT</span>=
|
||||
<span class="hljs-attr">ZBX_TLSCERTFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSKEYFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSPSKIDENTITY</span>=
|
||||
<span class="hljs-attr">ZBX_TLSPSKFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERALL</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERALL13</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERCERT</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERCERT13</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERPSK</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_TLSCIPHERPSK13</span>= # Available since <span class="hljs-number">4.4</span>.<span class="hljs-number">7</span>
|
||||
<span class="hljs-attr">ZBX_DENYKEY</span>=system.run[*] # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_ALLOWKEY</span>= # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
</code></pre><p>Default values of these variables are specified after equal sign.</p>
|
||||
<p>The allowed variables are identical of parameters in official <code>zabbix_agentd.conf</code> configuration file. For example, <code>ZBX_REFRESHACTIVECHECKS</code> = <code>RefreshActiveChecks</code>.</p>
|
||||
<p>Please use official documentation for <a href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agentd"><code>zabbix_agentd.conf</code></a> to get more information about the variables.</p>
|
||||
<h2 id="allowed-volumes-for-the-zabbix-agent-container">Allowed volumes for the Zabbix agent container</h2>
|
||||
<h3 id="-etc-zabbix-zabbix_agentd-d-"><code>/etc/zabbix/zabbix_agentd.d</code></h3>
|
||||
<p>The volume allows include <code>*.conf</code> files and extend Zabbix agent using <code>UserParameter</code> feature.</p>
|
||||
<h3 id="-var-lib-zabbix-modules-"><code>/var/lib/zabbix/modules</code></h3>
|
||||
<p>The volume allows load additional modules and extend Zabbix agent using <code>LoadModule</code> feature.</p>
|
||||
<h3 id="-var-lib-zabbix-enc-"><code>/var/lib/zabbix/enc</code></h3>
|
||||
<p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_TLSCAFILE</code>, <code>ZBX_TLSCRLFILE</code>, <code>ZBX_TLSKEY_FILE</code> and <code>ZBX_TLSPSKFILE</code> variables.</p>
|
||||
<h1 id="user-feedback">User Feedback</h1>
|
||||
<h2 id="documentation">Documentation</h2>
|
||||
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent"><code>agent/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository's <code>README.md</code> file</a> before attempting a pull request.</p>
|
||||
<h2 id="issues">Issues</h2>
|
||||
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
|
||||
<h3 id="known-issues">Known issues</h3>
|
||||
<p>Currently it is not allowed to specify <code>ZBX_ALIAS</code> environment variable. Please use <code>/etc/zabbix/zabbix_agent.d</code> volume with additional configuration files with <code>Alias</code> options.</p>
|
||||
<h2 id="contributing">Contributing</h2>
|
||||
<p>You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.</p>
|
||||
<p>Before you start to code, we recommend discussing your plans through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.</p>
|
||||
1
Dockerfiles/agent/rhel/build.sh
Symbolic link
1
Dockerfiles/agent/rhel/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
220
Dockerfiles/agent/rhel/docker-entrypoint.sh
Executable file
220
Dockerfiles/agent/rhel/docker-entrypoint.sh
Executable file
@ -0,0 +1,220 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
ZBX_SERVER_HOST=${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
ZBX_SERVER_PORT=${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf" "LoadModule" "${ZBX_LOADMODULE}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
export ZBX_USER="$(whoami)"
|
||||
else
|
||||
export ZBX_ALLOWROOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
|
||||
prepare_zbx_agent_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agentd "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agentd' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
661
Dockerfiles/agent/rhel/licenses/AGPL-v3.0.txt
Normal file
661
Dockerfiles/agent/rhel/licenses/AGPL-v3.0.txt
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
104
Dockerfiles/agent/ubuntu/Dockerfile
Normal file
104
Dockerfiles/agent/ubuntu/Dockerfile
Normal file
@ -0,0 +1,104 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=ubuntu:noble
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
|
||||
INSTALL_PKGS="bash \
|
||||
tzdata \
|
||||
iputils-ping \
|
||||
ca-certificates \
|
||||
libcares2 \
|
||||
libssl3t64 \
|
||||
libcurl4t64 \
|
||||
libmodbus5 \
|
||||
libpcre2-8-0 \
|
||||
libldap-2.4 \
|
||||
zlib1g" && \
|
||||
apt-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||
--no-install-recommends install \
|
||||
${INSTALL_PKGS} && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agentd -V
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||
1
Dockerfiles/agent/ubuntu/README.md
Symbolic link
1
Dockerfiles/agent/ubuntu/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent/ubuntu/build.sh
Symbolic link
1
Dockerfiles/agent/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
220
Dockerfiles/agent/ubuntu/docker-entrypoint.sh
Executable file
220
Dockerfiles/agent/ubuntu/docker-entrypoint.sh
Executable file
@ -0,0 +1,220 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
ZBX_SERVER_HOST=${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
ZBX_SERVER_PORT=${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf" "LoadModule" "${ZBX_LOADMODULE}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
export ZBX_USER="$(whoami)"
|
||||
else
|
||||
export ZBX_ALLOWROOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
|
||||
prepare_zbx_agent_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agentd "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agentd' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
71
Dockerfiles/agent/windows/Dockerfile
Normal file
71
Dockerfiles/agent/windows/Dockerfile
Normal file
@ -0,0 +1,71 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# escape=`
|
||||
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:ltsc2022
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV ZABBIX_USER_HOME_DIR="C:\zabbix" `
|
||||
ZABBIX_CONF_DIR="C:\zabbix\conf"
|
||||
|
||||
ENV ZBX_USERPARAMETERDIR="${ZABBIX_USER_HOME_DIR}\user_scripts"
|
||||
|
||||
LABEL org.opencontainers.image.title="Zabbix agent" `
|
||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
||||
org.opencontainers.image.vendor="Zabbix SIA" `
|
||||
org.opencontainers.image.url="https://zabbix.com/" `
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" `
|
||||
org.opencontainers.image.licenses="AGPL v3.0" `
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
|
||||
org.opencontainers.image.version="${ZBX_VERSION}" `
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||
|
||||
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
|
||||
COPY --from=builder ["C:\\build_deps\\pwsh", "C:\\Program Files\\PowerShell"]
|
||||
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
||||
|
||||
WORKDIR C:\zabbix\
|
||||
|
||||
USER ContainerAdministrator
|
||||
|
||||
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
|
||||
|
||||
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
||||
|
||||
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
|
||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
||||
`
|
||||
[Environment]::SetEnvironmentVariable('ZABBIX_USER_HOME_DIR', $env:ZABBIX_USER_HOME_DIR, [EnvironmentVariableTarget]::Machine); `
|
||||
`
|
||||
Write-Host ('Verifying Zabbix agent {0} ...' -f $env:ZBX_VERSION); `
|
||||
zabbix_agentd.exe -V;
|
||||
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_CONF_DIR | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_CONF_DIR\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_USER_HOME_DIR\enc | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_USER_HOME_DIR\enc_internal | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_USERPARAMETERDIR | Out-Null; `
|
||||
`
|
||||
net accounts /MaxPWAge:unlimited; `
|
||||
net user /add zabbix /expire:never /passwordreq:no; `
|
||||
$acl = Get-Acl -Path $env:ZABBIX_USER_HOME_DIR; `
|
||||
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
||||
$acl.AddAccessRule($ace); `
|
||||
Set-Acl -AclObject $acl -Path $env:ZABBIX_USER_HOME_DIR;
|
||||
|
||||
USER zabbix
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
CMD C:\zabbix\docker-entrypoint.ps1 C:\zabbix\sbin\zabbix_agentd.exe -c C:\zabbix\conf\zabbix_agentd.conf -f
|
||||
1
Dockerfiles/agent/windows/README.md
Symbolic link
1
Dockerfiles/agent/windows/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
231
Dockerfiles/agent/windows/docker-entrypoint.ps1
Normal file
231
Dockerfiles/agent/windows/docker-entrypoint.ps1
Normal file
@ -0,0 +1,231 @@
|
||||
|
||||
# Script trace mode
|
||||
if ($env:DEBUG_MODE -eq "true") {
|
||||
Set-PSDebug -trace 1
|
||||
}
|
||||
|
||||
# Default Zabbix server host
|
||||
if ($env:ZBX_SERVER_HOST -eq $null) {
|
||||
$env:ZBX_SERVER_HOST="zabbix-server"
|
||||
}
|
||||
# Default Zabbix server port number
|
||||
if ($env:ZBX_SERVER_PORT -eq $null) {
|
||||
$env:ZBX_SERVER_PORT="10051"
|
||||
}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
$ZabbixInternalEncDir="$env:ZABBIX_USER_HOME_DIR/enc_internal"
|
||||
|
||||
function Update-Config-Var {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ConfigPath,
|
||||
[Parameter(Mandatory=$true, Position=1)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$VarName,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null,
|
||||
[Parameter(Mandatory=$false, Position=3)]
|
||||
[bool]$IsMultiple
|
||||
)
|
||||
|
||||
$MaskList = "TLSPSKIdentity"
|
||||
|
||||
if (-not(Test-Path -Path $ConfigPath -PathType Leaf)) {
|
||||
throw "**** Configuration file '$ConfigPath' does not exist"
|
||||
}
|
||||
|
||||
if ($MaskList.Contains($VarName) -eq $true -And [string]::IsNullOrWhitespace($VarValue) -ne $true) {
|
||||
Write-Host -NoNewline "** Updating '$ConfigPath' parameter ""$VarName"": '****'. Enable DEBUG_MODE to view value ..."
|
||||
}
|
||||
else {
|
||||
Write-Host -NoNewline "** Updating '$ConfigPath' parameter ""$VarName"": '$VarValue'..."
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($VarValue)) {
|
||||
if ((Get-Content $ConfigPath | %{$_ -match "^$VarName="}) -contains $true) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Where-Object {$_ -notmatch "^$VarName=" } |
|
||||
Set-Content $ConfigPath
|
||||
}
|
||||
|
||||
Write-Host "removed"
|
||||
return
|
||||
}
|
||||
|
||||
if ($VarValue -eq '""') {
|
||||
(Get-Content $ConfigPath) | Foreach-Object { $_ -Replace "^($VarName=)(.*)", '$1' } | Set-Content $ConfigPath
|
||||
Write-Host "undefined"
|
||||
return
|
||||
}
|
||||
|
||||
if ($VarName -match '^TLS.*File$') {
|
||||
$VarValue="$env:ZABBIX_USER_HOME_DIR\enc\$VarValue"
|
||||
}
|
||||
|
||||
if ((Get-Content $ConfigPath | %{$_ -match "^$VarName="}) -contains $true -And $IsMultiple -ne $true) {
|
||||
(Get-Content $ConfigPath) | Foreach-Object { $_ -Replace "^$VarName=.+", "$VarName=$VarValue" } | Set-Content $ConfigPath
|
||||
|
||||
Write-Host updated
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 1) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=$") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added first occurrence"
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 0) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added"
|
||||
}
|
||||
else {
|
||||
Add-Content -Path $ConfigPath -Value "$VarName=$VarValue"
|
||||
Write-Host "added at the end"
|
||||
}
|
||||
}
|
||||
|
||||
function Update-Config-Multiple-Var {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ConfigPath,
|
||||
[Parameter(Mandatory=$true, Position=1)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$VarName,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null
|
||||
)
|
||||
|
||||
foreach ($value in $VarValue.split(',')) {
|
||||
Update-Config-Var $ConfigPath $VarName $value $true
|
||||
}
|
||||
}
|
||||
|
||||
function File-Process-From-Env {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $VarName,
|
||||
[Parameter(Mandatory=$false, Position=1)]
|
||||
[string]$FileName = $null,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null
|
||||
)
|
||||
|
||||
if (![string]::IsNullOrEmpty($VarValue)) {
|
||||
$VarValue | Set-Content "$ZabbixInternalEncDir\$VarName"
|
||||
$FileName="$ZabbixInternalEncDir\$VarName"
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($FileName)) {
|
||||
Set-Item env:$VarName -Value $FileName
|
||||
}
|
||||
|
||||
$VarName=$VarName -replace 'FILE$'
|
||||
Set-Item env:$VarName -Value $null
|
||||
}
|
||||
|
||||
function Prepare-Zbx-Agent-Config {
|
||||
if ($env:ZBX_PASSIVESERVERS -eq $null) {
|
||||
$env:ZBX_PASSIVESERVERS=""
|
||||
}
|
||||
if ($env:ZBX_ACTIVESERVERS -eq $null) {
|
||||
$env:ZBX_ACTIVESERVERS=""
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST) -And ![string]::IsNullOrEmpty($env:ZBX_PASSIVESERVERS)) {
|
||||
$env:ZBX_PASSIVESERVERS="$env:ZBX_SERVER_HOST,$env:ZBX_PASSIVESERVERS"
|
||||
}
|
||||
elseif (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST)) {
|
||||
$env:ZBX_PASSIVESERVERS=$env:ZBX_SERVER_HOST
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST)) {
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_PORT) -And $env:ZBX_SERVER_PORT -ne "10051") {
|
||||
$env:ZBX_SERVER_HOST="$env:ZBX_SERVER_HOST:$env:ZBX_SERVER_PORT"
|
||||
}
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_ACTIVESERVERS)) {
|
||||
$env:ZBX_ACTIVESERVERS="$env:ZBX_SERVER_HOST,$env:ZBX_ACTIVESERVERS"
|
||||
}
|
||||
else {
|
||||
$env:ZBX_ACTIVESERVERS=$env:ZBX_SERVER_HOST
|
||||
}
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_PASSIVE_ALLOW)) {
|
||||
$env:ZBX_PASSIVE_ALLOW="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_PASSIVE_ALLOW -eq "true") {
|
||||
Write-Host "** Using '$env:ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
}
|
||||
else {
|
||||
Set-Item env:ZBX_PASSIVESERVERS -Value $null
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_ACTIVE_ALLOW)) {
|
||||
$env:ZBX_ACTIVE_ALLOW="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_ACTIVE_ALLOW -eq "true") {
|
||||
Write-Host "** Using '$env:ZBX_ACTIVESERVERS' servers for active checks"
|
||||
}
|
||||
else {
|
||||
Set-Item env:ZBX_ACTIVESERVERS -Value $null
|
||||
}
|
||||
|
||||
Update-Config-Multiple-Var "$env:ZABBIX_CONF_DIR\zabbix_agentd_item_keys.conf" "DenyKey" "$env:ZBX_DENYKEY"
|
||||
Update-Config-Multiple-Var "$env:ZABBIX_CONF_DIR\zabbix_agentd_item_keys.conf" "AllowKey" "$env:ZBX_ALLOWKEY"
|
||||
|
||||
File-Process-From-Env "ZBX_TLSCAFILE" "$env:ZBX_TLSCAFILE" "$env:ZBX_TLSCA"
|
||||
File-Process-From-Env "ZBX_TLSCRLFILE" "$env:ZBX_TLSCRLFILE" "$env:ZBX_TLSCRL"
|
||||
File-Process-From-Env "ZBX_TLSCERTFILE" "$env:ZBX_TLSCERTFILE" "$env:ZBX_TLSCERT"
|
||||
File-Process-From-Env "ZBX_TLSKEYFILE" "$env:ZBX_TLSKEYFILE" "$env:ZBX_TLSKEY"
|
||||
File-Process-From-Env "ZBX_TLSPSKFILE" "$env:ZBX_TLSPSKFILE" "$env:ZBX_TLSPSK"
|
||||
}
|
||||
|
||||
function ClearZbxEnv() {
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_CLEAR_ENV)) {
|
||||
return
|
||||
}
|
||||
|
||||
$env_vars=Get-ChildItem env:* | Where-Object {$_.Name -match "^ZABBIX_.*" } | foreach { $_.Name }
|
||||
foreach ($env_var in $env_vars) {
|
||||
Set-Item env:$env_var -Value $null
|
||||
}
|
||||
}
|
||||
|
||||
function PrepareAgent {
|
||||
Write-Host "** Preparing Zabbix agent"
|
||||
|
||||
Prepare-Zbx-Agent-Config
|
||||
ClearZbxEnv
|
||||
}
|
||||
|
||||
$commandArgs=$args
|
||||
|
||||
if ($args.length -gt 0 -And $args[0].Substring(0, 1) -eq '-') {
|
||||
$commandArgs = "C:\zabbix\sbin\zabbix_agentd.exe " + $commandArgs
|
||||
}
|
||||
|
||||
if ($args.length -gt 0 -And $args[0] -eq "C:\zabbix\sbin\zabbix_agentd.exe") {
|
||||
PrepareAgent
|
||||
}
|
||||
|
||||
if ($args.length -gt 0) {
|
||||
Invoke-Expression "$CommandArgs"
|
||||
}
|
||||
@ -8,59 +8,61 @@ Zabbix is software that monitors numerous parameters of a network and the health
|
||||
|
||||
For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com
|
||||
|
||||
# What is Zabbix agent?
|
||||
# What is Zabbix agent 2?
|
||||
|
||||
Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications (hard drives, memory, processor statistics etc).
|
||||
Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications (hard drives, memory, processor statistics etc).
|
||||
|
||||
# Zabbix agent images
|
||||
# Zabbix agent 2 images
|
||||
|
||||
These are the only official Zabbix agent Docker images. They are based on Alpine Linux v3.4, Ubuntu 14.04 (trusty) and CentOS 7 images. The available versions of Zabbix agent are:
|
||||
These are the only official Zabbix agent 2 Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10, Oracle Linux 10, Windows 10 LTSC 2019 and Windows 11 LTSC 2022 images. The available versions of Zabbix agent 2 are:
|
||||
|
||||
Zabbix agent 3.0 (tags: alpine-3.0-latest, ubuntu-3.0-latest, centos-3.0-latest)
|
||||
Zabbix agent 3.0.* (tags: alpine-3.0.*, ubuntu-3.0.*, centos-3.0.*)
|
||||
Zabbix agent 3.2 (tags: alpine-3.2-latest, ubuntu-3.2-latest, centos-3.2-latest)
|
||||
Zabbix agent 3.2.* (tags: alpine-3.2.*, ubuntu-3.2.*, centos-3.2.*)
|
||||
Zabbix agent 3.4 (tags: alpine-3.4-latest, ubuntu-3.4-latest, centos-3.4-latest, alpine-latest, ubuntu-latest, centos-latest, latest)
|
||||
Zabbix agent 3.4.* (tags: alpine-3.4.*, ubuntu-3.4.*, centos-3.4.*)
|
||||
Zabbix agent 4.0 (tags: alpine-trunk, ubuntu-trunk, centos-trunk)
|
||||
Zabbix agent 2 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
|
||||
Zabbix agent 2 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*, ltsc2019-6.0.*, ltsc2022-6.0.*)
|
||||
Zabbix agent 2 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
|
||||
Zabbix agent 2 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
|
||||
Zabbix agent 2 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest)
|
||||
Zabbix agent 2 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
|
||||
Zabbix agent 2 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, ltsc2019-latest, ltsc2022-latest, latest)
|
||||
Zabbix agent 2 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
|
||||
Zabbix agent 2 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
|
||||
|
||||
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
|
||||
|
||||
# How to use this image
|
||||
|
||||
## Start `zabbix-agent`
|
||||
## Start `zabbix-agent2`
|
||||
|
||||
Start a Zabbix agent container as follows:
|
||||
Start a Zabbix agent 2 container as follows:
|
||||
|
||||
docker run --name some-zabbix-agent -e ZBX_HOSTNAME="some-hostname" -e ZBX_SERVER_HOST="some-zabbix-server" -d zabbix/zabbix-agent:tag
|
||||
docker run --name some-zabbix-agent -e ZBX_HOSTNAME="some-hostname" -e ZBX_SERVER_HOST="some-zabbix-server" --init -d zabbix/zabbix-agent2:tag
|
||||
|
||||
Where `some-zabbix-agent` is the name you want to assign to your container, `some-hostname` is the hostname, it is Hostname parameter in Zabbix agent configuration file, `some-zabbix-server` is IP or DNS name of Zabbix server or proxy and `tag` is the tag specifying the version you want. See the list above for relevant tags, or look at the [full list of tags](https://hub.docker.com/r/zabbix/zabbix-agent/tags/).
|
||||
Where `some-zabbix-agent2` is the name you want to assign to your container, `some-hostname` is the hostname, it is Hostname parameter in Zabbix agent 2 configuration file, `some-zabbix-server` is IP or DNS name of Zabbix server or proxy and `tag` is the tag specifying the version you want. See the list above for relevant tags, or look at the [full list of tags](https://hub.docker.com/r/zabbix/zabbix-agent2/tags/).
|
||||
|
||||
## Connects from Zabbix server or Zabbix proxy in other containers (Passive checks)
|
||||
|
||||
This image exposes the standard Zabbix agent port (``10050``) to perform passive checks, so container linking makes Zabbix agent instance available to Zabbix server and Zabbix proxy containers. Start your application container like this in order to link it to the Zabbix agent container:
|
||||
This image exposes the standard Zabbix agent 2 port (``10050``) to perform passive checks, so container linking makes Zabbix agent 2 instance available to Zabbix server and Zabbix proxy containers. Start your application container like this in order to link it to the Zabbix agent 2 container:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent -d zabbix/zabbix-server:latest
|
||||
$ docker run --name some-zabbix-server --link some-zabbix-agent:zabbix-agent2 --init -d zabbix/zabbix-server:latest
|
||||
```
|
||||
|
||||
## Connect to Zabbix server or Zabbix proxy containers (Active checks)
|
||||
|
||||
This image supports perform active checks, so container linking makes Zabbix server and Zabbix proxy containers available to Zabbix agent instance. Start your application container like this in order to link Zabbix agent to Zabbix server or Zabbix proxy containterns:
|
||||
This image supports perform active checks, so container linking makes Zabbix server and Zabbix proxy containers available to Zabbix agent 2 instance. Start your application container like this in order to link Zabbix agent 2 to Zabbix server or Zabbix proxy containterns:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --init -d zabbix/zabbix-agent2:latest
|
||||
```
|
||||
|
||||
## Container shell access and viewing Zabbix agent logs
|
||||
## Container shell access and viewing Zabbix agent 2 logs
|
||||
|
||||
The `docker exec` command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your `zabbix-agent` container:
|
||||
The `docker exec` command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your `zabbix-agent2` container:
|
||||
|
||||
```console
|
||||
$ docker exec -ti some-zabbix-agent /bin/bash
|
||||
```
|
||||
|
||||
The Zabbix agent log is available through Docker's container log:
|
||||
The Zabbix agent 2 log is available through Docker's container log:
|
||||
|
||||
```console
|
||||
$ docker logs some-zabbix-agent
|
||||
@ -68,26 +70,26 @@ $ docker logs some-zabbix-agent
|
||||
|
||||
## Privileged mode
|
||||
|
||||
By default, Docker containers are "unprivileged" and do not have access to the most of host resources. Zabbix agent is designed to monitor system resources, to do that Zabbix agent container must be privileged or you may mount some system-wide volumes. For example:
|
||||
By default, Docker containers are "unprivileged" and do not have access to the most of host resources. Zabbix agent 2 is designed to monitor system resources, to do that Zabbix agent 2 container must be privileged or you may mount some system-wide volumes. For example:
|
||||
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --privileged -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server --privileged --init -d zabbix/zabbix-agent2:latest
|
||||
```
|
||||
```console
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -v /dev/sdc:/dev/sdc -d zabbix/zabbix-agent:latest
|
||||
$ docker run --name some-zabbix-agent --link some-zabbix-server:zabbix-server -v /dev/sdc:/dev/sdc --init -d zabbix/zabbix-agent2:latest
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
When you start the `zabbix-agent` image, you can adjust the configuration of the Zabbix agent by passing one or more environment variables on the `docker run` command line.
|
||||
When you start the `zabbix-agent2` image, you can adjust the configuration of the Zabbix agent 2 by passing one or more environment variables on the `docker run` command line.
|
||||
|
||||
### `ZBX_HOSTNAME`
|
||||
|
||||
This variable is unique, case sensitive hostname. By default, value is `hostname` of the container. It is ``Hostname`` parameter in ``zabbix_agentd.conf``.
|
||||
This variable is unique, case sensitive hostname. By default, value is `hostname` of the container. It is ``Hostname`` parameter in ``zabbix_agent2.conf``.
|
||||
|
||||
### `ZBX_SERVER_HOST`
|
||||
|
||||
This variable is IP or DNS name of Zabbix server or Zabbix proxy. By default, value is `zabbix-server`. It is ``Server`` parameter in ``zabbix_agentd.conf``. It is allowed to specify Zabbix server or Zabbix proxy port number using ``ZBX_SERVER_PORT`` variable. It make sense in case of non-default port for active checks.
|
||||
This variable is IP or DNS name of Zabbix server or Zabbix proxy. By default, value is `zabbix-server`. It is ``Server`` parameter in ``zabbix_agent2.conf``. It is allowed to specify Zabbix server or Zabbix proxy port number using ``ZBX_SERVER_PORT`` variable. It make sense in case of non-default port for active checks.
|
||||
|
||||
### `ZBX_PASSIVE_ALLOW`
|
||||
|
||||
@ -95,7 +97,7 @@ This variable is boolean (``true`` or ``false``) and enables or disables feature
|
||||
|
||||
### `ZBX_PASSIVESERVERS`
|
||||
|
||||
The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent container.
|
||||
The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent 2 container.
|
||||
|
||||
### `ZBX_ACTIVE_ALLOW`
|
||||
|
||||
@ -103,15 +105,11 @@ This variable is boolean (``true`` or ``false``) and enables or disables feature
|
||||
|
||||
### `ZBX_ACTIVESERVERS`
|
||||
|
||||
The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent container. You may specify port of Zabbix server or Zabbix proxy in such syntax: ``zabbix-server:10061,zabbix-proxy:10072``.
|
||||
|
||||
### `ZBX_LOADMODULE`
|
||||
|
||||
The variable is list of comma separated loadable Zabbix modules. It works with volume ``/var/lib/zabbix/modules``. The syntax of the variable is ``dummy1.so,dummy2.so``.
|
||||
The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent 2 container. You may specify port of Zabbix server or Zabbix proxy in such syntax: ``zabbix-server:10061,zabbix-proxy:10072``.
|
||||
|
||||
### `ZBX_DEBUGLEVEL`
|
||||
|
||||
The variable is used to specify debug level. By default, value is ``3``. It is ``DebugLevel`` parameter in ``zabbix_agentd.conf``. Allowed values are listed below:
|
||||
The variable is used to specify debug level. By default, value is ``3``. It is ``DebugLevel`` parameter in ``zabbix_agent2.conf``. Allowed values are listed below:
|
||||
- ``0`` - basic information about starting and stopping of Zabbix processes;
|
||||
- ``1`` - critical information
|
||||
- ``2`` - error information
|
||||
@ -128,8 +126,12 @@ The variable is used to specify timeout for processing checks. By default, value
|
||||
Additionally the image allows to specify many other environment variables listed below:
|
||||
|
||||
```
|
||||
ZBX_ENABLEPERSISTENTBUFFER=false # Available since 5.0.0
|
||||
ZBX_PERSISTENTBUFFERPERIOD=1h # Available since 5.0.0
|
||||
ZBX_ENABLESTATUSPORT=
|
||||
ZBX_SOURCEIP=
|
||||
ZBX_ENABLEREMOTECOMMANDS=0
|
||||
ZBX_HEARTBEAT_FREQUENCY=60 # Available since 6.2.0
|
||||
ZBX_ENABLEREMOTECOMMANDS=0 # Deprecated since 5.0.0
|
||||
ZBX_LOGREMOTECOMMANDS=0
|
||||
ZBX_STARTAGENTS=3
|
||||
ZBX_HOSTNAMEITEM=system.hostname
|
||||
@ -140,48 +142,52 @@ ZBX_BUFFERSEND=5
|
||||
ZBX_BUFFERSIZE=100
|
||||
ZBX_MAXLINESPERSECOND=20
|
||||
ZBX_LISTENIP=
|
||||
ZBX_LISTENPORT=10051
|
||||
ZBX_UNSAFEUSERPARAMETERS=0
|
||||
ZBX_TLSCONNECT=unencrypted
|
||||
ZBX_TLSACCEPT=unencrypted
|
||||
ZBX_TLSCAFILE=
|
||||
ZBX_TLSCA=
|
||||
ZBX_TLSCRLFILE=
|
||||
ZBX_TLSCRL=
|
||||
ZBX_TLSSERVERCERTISSUER=
|
||||
ZBX_TLSSERVERCERTSUBJECT=
|
||||
ZBX_TLSCERTFILE=
|
||||
ZBX_TLSCERT=
|
||||
ZBX_TLSKEYFILE=
|
||||
ZBX_TLSKEY=
|
||||
ZBX_TLSPSKIDENTITY=
|
||||
ZBX_TLSPSKFILE=
|
||||
ZBX_TLSPSK=
|
||||
ZBX_DENYKEY=system.run[*] # Available since 5.0.0
|
||||
ZBX_ALLOWKEY= # Available since 5.0.0
|
||||
```
|
||||
|
||||
Default values of these variables are specified after equal sign.
|
||||
|
||||
The allowed variables are identical of parameters in official ``zabbix_agentd.conf`` configuration file. For example, ``ZBX_REFRESHACTIVECHECKS`` = ``RefreshActiveChecks``.
|
||||
The allowed variables are identical of parameters in official ``zabbix_agent2.conf`` configuration file. For example, ``ZBX_REFRESHACTIVECHECKS`` = ``RefreshActiveChecks``.
|
||||
|
||||
Please use official documentation for [``zabbix_agentd.conf``](https://www.zabbix.com/documentation/3.0/manual/appendix/config/zabbix_agentd) to get more information about the variables.
|
||||
Please use official documentation for [``zabbix_agent2.conf``](https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agent2) to get more information about the variables.
|
||||
|
||||
## Allowed volumes for the Zabbix agent container
|
||||
## Allowed volumes for the Zabbix agent 2 container
|
||||
|
||||
### ``/etc/zabbix/zabbix_agentd.d``
|
||||
|
||||
The volume allows include ``*.conf`` files and extend Zabbix agent using ``UserParameter`` feature.
|
||||
|
||||
### ``/var/lib/zabbix/modules``
|
||||
|
||||
The volume allows load additional modules and extend Zabbix agent using ``LoadModule`` feature.
|
||||
The volume allows include ``*.conf`` files and extend Zabbix agent 2 using ``UserParameter`` feature.
|
||||
|
||||
### ``/var/lib/zabbix/enc``
|
||||
|
||||
The volume is used to store TLS related files. These file names are specified using ``ZBX_TLSCAFILE``, ``ZBX_TLSCRLFILE``, ``ZBX_TLSKEY_FILE`` and ``ZBX_TLSPSKFILE`` variables.
|
||||
The volume is used to store TLS related files. These file names are specified using ``ZBX_TLSCAFILE``, ``ZBX_TLSCRLFILE``, ``ZBX_TLSCERTFILE``, ``ZBX_TLSKEYFILE`` and ``ZBX_TLSPSKFILE`` variables. Additionally it is possible to use environment variables ``ZBX_TLSCA``, ``ZBX_TLSCRL``, ``ZBX_TLSCERT``, ``ZBX_TLSKEY`` and ``ZBX_TLSPSK`` with plaintext values.
|
||||
|
||||
### ``/var/lib/zabbix/buffer``
|
||||
|
||||
The volume is used to store the file, where Zabbix Agent2 should keep SQLite database. To enable the feature specify ``ZBX_ENABLEPERSISTENTBUFFER=true``. Available since 5.0.0.
|
||||
|
||||
# The image variants
|
||||
|
||||
The `zabbix-agent` images come in many flavors, each designed for a specific use case.
|
||||
The `zabbix-agent2` images come in many flavors, each designed for a specific use case.
|
||||
|
||||
## `zabbix-agent:ubuntu-<version>`
|
||||
|
||||
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
|
||||
|
||||
## `zabbix-agent:alpine-<version>`
|
||||
## `zabbix-agent2:alpine-<version>`
|
||||
|
||||
This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
|
||||
|
||||
@ -189,6 +195,14 @@ This variant is highly recommended when final image size being as small as possi
|
||||
|
||||
To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).
|
||||
|
||||
## `zabbix-agent2:ubuntu-<version>`
|
||||
|
||||
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
|
||||
|
||||
## `zabbix-agent2:ol-<version>`
|
||||
|
||||
Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more.
|
||||
|
||||
# Supported Docker versions
|
||||
|
||||
This image is officially supported on Docker version 1.12.0.
|
||||
@ -201,7 +215,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for this image is stored in the [`agent/` directory](https://github.com/zabbix/zabbix-docker/tree/3.0/agent) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
|
||||
Documentation for this image is stored in the [`agent2/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent2) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/7.4/README.md) before attempting a pull request.
|
||||
|
||||
## Issues
|
||||
|
||||
@ -216,3 +230,12 @@ Currently it is not allowed to specify ``ZBX_ALIAS`` environment variable. Pleas
|
||||
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
|
||||
|
||||
Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
|
||||
|
||||
## License
|
||||
|
||||
Starting from Zabbix version 7.0, all subsequent Zabbix versions will be released under the GNU Affero General Public License version 3 (AGPLv3).
|
||||
You can modify the relevant version and propagate such modified version under the terms of the AGPLv3 as published by the Free Software Foundation.
|
||||
For additional details, including answers to common questions about the AGPLv3, see the generic FAQ from the [Free Software Foundation](http://www.fsf.org/licenses/gpl-faq.html).
|
||||
|
||||
Zabbix is Open Source Software, however, if you use Zabbix in a commercial context we kindly ask you to support the development of Zabbix by purchasing some level of technical support.
|
||||
All previous Zabbix software versions up to 6.4 are released under the GNU General Public License version 2 (GPLv2). The formal terms of the GPLv2 and AGPLv3 can be found at http://www.fsf.org/licenses/.
|
||||
100
Dockerfiles/agent2/alpine/Dockerfile
Normal file
100
Dockerfiles/agent2/alpine/Dockerfile
Normal file
@ -0,0 +1,100 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=alpine:3.23
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent 2" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
tzdata \
|
||||
pcre2 \
|
||||
coreutils \
|
||||
smartmontools \
|
||||
sudo \
|
||||
iputils" && \
|
||||
apk add \
|
||||
--no-cache \
|
||||
--clean-protected \
|
||||
${INSTALL_PKGS} && \
|
||||
addgroup \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
adduser \
|
||||
--system \
|
||||
--gecos "Zabbix monitoring system" \
|
||||
--disabled-password \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home ${ZABBIX_USER_HOME_DIR}/ \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
1
Dockerfiles/agent2/alpine/README.md
Symbolic link
1
Dockerfiles/agent2/alpine/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent2/alpine/build.sh
Symbolic link
1
Dockerfiles/agent2/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
238
Dockerfiles/agent2/alpine/docker-entrypoint.sh
Executable file
238
Dockerfiles/agent2/alpine/docker-entrypoint.sh
Executable file
@ -0,0 +1,238 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
: ${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
: ${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
export ZBX_ENABLEPERSISTENTBUFFER=1
|
||||
else
|
||||
unset ZBX_ENABLEPERSISTENTBUFFER
|
||||
unset ZBX_PERSISTENTBUFFERFILE
|
||||
fi
|
||||
|
||||
if [ "${ZBX_ENABLESTATUSPORT,,}" == "true" ]; then
|
||||
export ZBX_STATUSPORT=${ZBX_STATUSPORT="31999"}
|
||||
else
|
||||
unset ZBX_STATUSPORT
|
||||
fi
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agent2 "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agent2' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
121
Dockerfiles/agent2/centos/Dockerfile
Normal file
121
Dockerfiles/agent2/centos/Dockerfile
Normal file
@ -0,0 +1,121 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent 2" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
pcre2 \
|
||||
libcurl-minimal \
|
||||
smartmontools \
|
||||
shadow-utils \
|
||||
sudo \
|
||||
openssl-libs" && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "extras-common" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs epel-release && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "baseos" \
|
||||
--enablerepo "appstream" \
|
||||
--enablerepo="epel" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs ${INSTALL_PKGS} && \
|
||||
microdnf -y reinstall \
|
||||
--enablerepo "baseos" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
1
Dockerfiles/agent2/centos/README.md
Symbolic link
1
Dockerfiles/agent2/centos/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent2/centos/build.sh
Symbolic link
1
Dockerfiles/agent2/centos/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
238
Dockerfiles/agent2/centos/docker-entrypoint.sh
Executable file
238
Dockerfiles/agent2/centos/docker-entrypoint.sh
Executable file
@ -0,0 +1,238 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
: ${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
: ${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
export ZBX_ENABLEPERSISTENTBUFFER=1
|
||||
else
|
||||
unset ZBX_ENABLEPERSISTENTBUFFER
|
||||
unset ZBX_PERSISTENTBUFFERFILE
|
||||
fi
|
||||
|
||||
if [ "${ZBX_ENABLESTATUSPORT,,}" == "true" ]; then
|
||||
export ZBX_STATUSPORT=${ZBX_STATUSPORT="31999"}
|
||||
else
|
||||
unset ZBX_STATUSPORT
|
||||
fi
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agent2 "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agent2' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
108
Dockerfiles/agent2/ol/Dockerfile
Normal file
108
Dockerfiles/agent2/ol/Dockerfile
Normal file
@ -0,0 +1,108 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent 2" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
pcre2 \
|
||||
libcurl \
|
||||
smartmontools \
|
||||
sudo \
|
||||
openssl-libs" && \
|
||||
microdnf -y install \
|
||||
--disablerepo="*" \
|
||||
--enablerepo="ol10_baseos_latest" \
|
||||
--enablerepo="ol10_appstream" \
|
||||
--enablerepo="ol10_u0_developer_EPEL" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
1
Dockerfiles/agent2/ol/README.md
Symbolic link
1
Dockerfiles/agent2/ol/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent2/ol/build.sh
Symbolic link
1
Dockerfiles/agent2/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
@ -0,0 +1,6 @@
|
||||
[ol10_u0_developer_EPEL]
|
||||
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
|
||||
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
239
Dockerfiles/agent2/ol/docker-entrypoint.sh
Executable file
239
Dockerfiles/agent2/ol/docker-entrypoint.sh
Executable file
@ -0,0 +1,239 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
: ${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
: ${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local file_name=$3
|
||||
local var_value=$4
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
export ZBX_ENABLEPERSISTENTBUFFER=1
|
||||
else
|
||||
unset ZBX_ENABLEPERSISTENTBUFFER
|
||||
unset ZBX_PERSISTENTBUFFERFILE
|
||||
fi
|
||||
|
||||
if [ "${ZBX_ENABLESTATUSPORT,,}" == "true" ]; then
|
||||
export ZBX_STATUSPORT=${ZBX_STATUSPORT="31999"}
|
||||
else
|
||||
unset ZBX_STATUSPORT
|
||||
fi
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agent2 "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agent2' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
142
Dockerfiles/agent2/rhel/Dockerfile
Normal file
142
Dockerfiles/agent2/rhel/Dockerfile
Normal file
@ -0,0 +1,142 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG RELEASE=6
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG RELEASE
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
name="zabbix/zabbix-agent2-74" \
|
||||
release="${RELEASE}" \
|
||||
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-74:${ZBX_VERSION}" \
|
||||
summary="Zabbix agent" \
|
||||
url="https://www.zabbix.com/" \
|
||||
vendor="Zabbix SIA" \
|
||||
version="${MAJOR_VERSION}" \
|
||||
io.k8s.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
io.k8s.display-name="Zabbix Agent 2" \
|
||||
io.openshift.expose-services="10050:10050" \
|
||||
io.openshift.tags="zabbix,zabbix-agent" \
|
||||
org.label-schema.build-date="${BUILD_DATE}" \
|
||||
org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-74:${ZBX_VERSION}" \
|
||||
org.label-schema.license="AGPL v3.0" \
|
||||
org.label-schema.name="zabbix-agent2-rhel" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
||||
org.label-schema.vendor="Zabbix SIA" \
|
||||
org.label-schema.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
shadow-utils \
|
||||
pcre2 \
|
||||
# smartmontools \
|
||||
sudo \
|
||||
libcurl-minimal" && \
|
||||
microdnf -y install \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-10-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
microdnf -y update \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-10-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
# microdnf -y reinstall \
|
||||
# --disableplugin=subscription-manager \
|
||||
# --disablerepo "*" \
|
||||
# --enablerepo "ubi-9-baseos-rpms" \
|
||||
# --setopt=install_weak_deps=0 \
|
||||
# --setopt=keepcache=0 \
|
||||
# --best \
|
||||
# --setopt=tsflags=nodocs \
|
||||
# tzdata && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
144
Dockerfiles/agent2/rhel/Dockerfile.cuda
Normal file
144
Dockerfiles/agent2/rhel/Dockerfile.cuda
Normal file
@ -0,0 +1,144 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=nvidia/cuda:12.9.0-base-ubi9
|
||||
ARG MAJOR_VERSION=7.2
|
||||
ARG RELEASE=7
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.7
|
||||
ARG BUILD_BASE_IMAGE=registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG RELEASE
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
name="zabbix/zabbix-agent2-72" \
|
||||
release="${RELEASE}" \
|
||||
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}" \
|
||||
summary="Zabbix agent" \
|
||||
url="https://www.zabbix.com/" \
|
||||
vendor="Zabbix SIA" \
|
||||
version="${MAJOR_VERSION}" \
|
||||
io.k8s.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
io.k8s.display-name="Zabbix Agent 2" \
|
||||
io.openshift.expose-services="10050:10050" \
|
||||
io.openshift.tags="zabbix,zabbix-agent" \
|
||||
org.label-schema.build-date="${BUILD_DATE}" \
|
||||
org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-72:${ZBX_VERSION}" \
|
||||
org.label-schema.license="AGPL v3.0" \
|
||||
org.label-schema.name="zabbix-agent2-rhel" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
||||
org.label-schema.vendor="Zabbix SIA" \
|
||||
org.label-schema.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
COPY --from=builder ["/usr/sbin/zabbix*", "/usr/sbin/"]
|
||||
COPY --from=builder ["/usr/sbin/zabbix-agent2-plugin/", "/usr/sbin/zabbix-agent2-plugin/"]
|
||||
COPY --from=builder ["/usr/bin/zabbix*", "/usr/bin/"]
|
||||
COPY --from=builder ["/etc/zabbix/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
iputils \
|
||||
shadow-utils \
|
||||
pcre2 \
|
||||
# smartmontools \
|
||||
sudo \
|
||||
libcurl-minimal" && \
|
||||
dnf -y install \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-9-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
${INSTALL_PKGS} && \
|
||||
dnf -y update \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-9-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
dnf -y reinstall \
|
||||
--disableplugin=subscription-manager \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-9-baseos-rpms" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
tzdata && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
ln -s /usr/lib64/libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
113
Dockerfiles/agent2/rhel/README.html
Normal file
113
Dockerfiles/agent2/rhel/README.html
Normal file
@ -0,0 +1,113 @@
|
||||
<p><img src="https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png" alt="logo"></p>
|
||||
<h1 id="what-is-zabbix-">What is Zabbix?</h1>
|
||||
<p>Zabbix is an enterprise-class open source distributed monitoring solution.</p>
|
||||
<p>Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning.</p>
|
||||
<p>For more information and related downloads for Zabbix components, please visit <a href="https://hub.docker.com/u/zabbix/">https://hub.docker.com/u/zabbix/</a> and <a href="https://zabbix.com">https://zabbix.com</a></p>
|
||||
<h1 id="what-is-zabbix-agent-2-">What is Zabbix agent 2?</h1>
|
||||
<p>Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications (hard drives, memory, processor statistics etc).</p>
|
||||
<h1 id="zabbix-agent-2-images">Zabbix agent 2 images</h1>
|
||||
<p>Images are updated when new releases are published.</p>
|
||||
<h1 id="how-to-use-this-image">How to use this image</h1>
|
||||
<h2 id="start-zabbix-agent2-">Start <code>zabbix-agent2</code></h2>
|
||||
<p>Start a Zabbix agent 2 container as follows:</p>
|
||||
<pre><code>podman <span class="hljs-keyword">run</span><span class="bash"> --name some-zabbix-agent <span class="hljs-_">-e</span> ZBX_HOSTNAME=<span class="hljs-string">"some-hostname"</span> <span class="hljs-_">-e</span> ZBX_SERVER_HOST=<span class="hljs-string">"some-zabbix-server"</span> --init <span class="hljs-_">-d</span> zabbix/zabbix-agent2:tag</span>
|
||||
</code></pre><p>Where <code>some-zabbix-agent2</code> is the name you want to assign to your container, <code>some-hostname</code> is the hostname, it is Hostname parameter in Zabbix agent 2 configuration file, <code>some-zabbix-server</code> is IP or DNS name of Zabbix server or proxy and <code>tag</code> is the tag specifying the version you want.</p>
|
||||
<h2 id="connects-from-zabbix-server-or-zabbix-proxy-in-other-containers-passive-checks-">Connects from Zabbix server or Zabbix proxy in other containers (Passive checks)</h2>
|
||||
<p>This image exposes the standard Zabbix agent 2 port (<code>10050</code>) to perform passive checks, so container linking makes Zabbix agent 2 instance available to Zabbix server and Zabbix proxy containers. Start your application container like this in order to link it to the Zabbix agent 2 container:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent2</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:latest</span>
|
||||
</code></pre>
|
||||
<h2 id="connect-to-zabbix-server-or-zabbix-proxy-containers-active-checks-">Connect to Zabbix server or Zabbix proxy containers (Active checks)</h2>
|
||||
<p>This image supports perform active checks, so container linking makes Zabbix server and Zabbix proxy containers available to Zabbix agent 2 instance. Start your application container like this in order to link Zabbix agent 2 to Zabbix server or Zabbix proxy containterns:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent2:latest</span>
|
||||
</code></pre>
|
||||
<h2 id="container-shell-access-and-viewing-zabbix-agent-2-logs">Container shell access and viewing Zabbix agent 2 logs</h2>
|
||||
<p>The <code>podman exec</code> command allows you to run commands inside a Podman container. The following command line will give you a bash shell inside your <code>zabbix-agent2</code> container:</p>
|
||||
<pre><code class="lang-console">$ podman <span class="hljs-built_in">exec</span> -ti some-zabbix-<span class="hljs-built_in">agent</span> /bin/bash
|
||||
</code></pre>
|
||||
<p>The Zabbix agent 2 log is available through Podman's container log:</p>
|
||||
<pre><code class="lang-console">$ podman logs <span class="hljs-keyword">some</span>-zabbix-agent
|
||||
</code></pre>
|
||||
<h2 id="privileged-mode">Privileged mode</h2>
|
||||
<p>By default, Podman containers are "unprivileged" and do not have access to the most of host resources. Zabbix agent 2 is designed to monitor system resources, to do that Zabbix agent 2 container must be privileged or you may mount some system-wide volumes. For example:</p>
|
||||
<pre><code class="lang-console"><span class="hljs-comment">$</span> <span class="hljs-comment">podman</span> <span class="hljs-comment">run</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">name</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">link</span> <span class="hljs-comment">some</span><span class="hljs-literal">-</span><span class="hljs-comment">zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server:zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">privileged</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">init</span> <span class="hljs-literal">-</span><span class="hljs-comment">d</span> <span class="hljs-comment">zabbix/zabbix</span><span class="hljs-literal">-</span><span class="hljs-comment">agent2:latest</span>
|
||||
</code></pre>
|
||||
<pre><code class="lang-console">$ podman run --name some-zabbix-agent --link some-zabbix-<span class="hljs-string">server:</span>zabbix-server -v <span class="hljs-regexp">/dev/</span><span class="hljs-string">sdc:</span><span class="hljs-regexp">/dev/</span>sdc --init -d zabbix/zabbix-<span class="hljs-string">agent2:</span>latest
|
||||
</code></pre>
|
||||
<h2 id="environment-variables">Environment Variables</h2>
|
||||
<p>When you start the <code>zabbix-agent2</code> image, you can adjust the configuration of the Zabbix agent 2 by passing one or more environment variables on the <code>podman run</code> command line.</p>
|
||||
<h3 id="-zbx_hostname-"><code>ZBX_HOSTNAME</code></h3>
|
||||
<p>This variable is unique, case sensitive hostname. By default, value is <code>hostname</code> of the container. It is <code>Hostname</code> parameter in <code>zabbix_agent2.conf</code>.</p>
|
||||
<h3 id="-zbx_server_host-"><code>ZBX_SERVER_HOST</code></h3>
|
||||
<p>This variable is IP or DNS name of Zabbix server or Zabbix proxy. By default, value is <code>zabbix-server</code>. It is <code>Server</code> parameter in <code>zabbix_agent2.conf</code>. It is allowed to specify Zabbix server or Zabbix proxy port number using <code>ZBX_SERVER_PORT</code> variable. It make sense in case of non-default port for active checks.</p>
|
||||
<h3 id="-zbx_passive_allow-"><code>ZBX_PASSIVE_ALLOW</code></h3>
|
||||
<p>This variable is boolean (<code>true</code> or <code>false</code>) and enables or disables feature of passive checks. By default, value is <code>true</code>.</p>
|
||||
<h3 id="-zbx_passiveservers-"><code>ZBX_PASSIVESERVERS</code></h3>
|
||||
<p>The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent 2 container.</p>
|
||||
<h3 id="-zbx_active_allow-"><code>ZBX_ACTIVE_ALLOW</code></h3>
|
||||
<p>This variable is boolean (<code>true</code> or <code>false</code>) and enables or disables feature of active checks. By default, value is <code>true</code>.</p>
|
||||
<h3 id="-zbx_activeservers-"><code>ZBX_ACTIVESERVERS</code></h3>
|
||||
<p>The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent 2 container. You may specify port of Zabbix server or Zabbix proxy in such syntax: <code>zabbix-server:10061,zabbix-proxy:10072</code>.</p>
|
||||
<h3 id="-zbx_debuglevel-"><code>ZBX_DEBUGLEVEL</code></h3>
|
||||
<p>The variable is used to specify debug level. By default, value is <code>3</code>. It is <code>DebugLevel</code> parameter in <code>zabbix_agent2.conf</code>. Allowed values are listed below:</p>
|
||||
<ul>
|
||||
<li><code>0</code> - basic information about starting and stopping of Zabbix processes;</li>
|
||||
<li><code>1</code> - critical information</li>
|
||||
<li><code>2</code> - error information</li>
|
||||
<li><code>3</code> - warnings</li>
|
||||
<li><code>4</code> - for debugging (produces lots of information)</li>
|
||||
<li><code>5</code> - extended debugging (produces even more information)</li>
|
||||
</ul>
|
||||
<h3 id="-zbx_timeout-"><code>ZBX_TIMEOUT</code></h3>
|
||||
<p>The variable is used to specify timeout for processing checks. By default, value is <code>3</code>.</p>
|
||||
<h3 id="other-variables">Other variables</h3>
|
||||
<p>Additionally the image allows to specify many other environment variables listed below:</p>
|
||||
<pre><code><span class="hljs-attr">ZBX_ENABLEPERSISTENTBUFFER</span>=<span class="hljs-literal">false</span> # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_PERSISTENTBUFFERPERIOD</span>=<span class="hljs-number">1</span>h # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_ENABLESTATUSPORT</span>=
|
||||
<span class="hljs-attr">ZBX_SOURCEIP</span>=
|
||||
<span class="hljs-attr">ZBX_HEARTBEAT_FREQUENCY</span>=<span class="hljs-number">60</span> # Available since <span class="hljs-number">6.2</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_ENABLEREMOTECOMMANDS</span>=<span class="hljs-number">0</span> # Deprecated since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_LOGREMOTECOMMANDS</span>=<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_STARTAGENTS</span>=<span class="hljs-number">3</span>
|
||||
<span class="hljs-attr">ZBX_HOSTNAMEITEM</span>=system.hostname
|
||||
<span class="hljs-attr">ZBX_METADATA</span>=
|
||||
<span class="hljs-attr">ZBX_METADATAITEM</span>=
|
||||
<span class="hljs-attr">ZBX_REFRESHACTIVECHECKS</span>=<span class="hljs-number">120</span>
|
||||
<span class="hljs-attr">ZBX_BUFFERSEND</span>=<span class="hljs-number">5</span>
|
||||
<span class="hljs-attr">ZBX_BUFFERSIZE</span>=<span class="hljs-number">100</span>
|
||||
<span class="hljs-attr">ZBX_MAXLINESPERSECOND</span>=<span class="hljs-number">20</span>
|
||||
<span class="hljs-attr">ZBX_LISTENIP</span>=
|
||||
<span class="hljs-attr">ZBX_LISTENPORT</span>=<span class="hljs-number">10051</span>
|
||||
<span class="hljs-attr">ZBX_UNSAFEUSERPARAMETERS</span>=<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_TLSCONNECT</span>=unencrypted
|
||||
<span class="hljs-attr">ZBX_TLSACCEPT</span>=unencrypted
|
||||
<span class="hljs-attr">ZBX_TLSCAFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSCRLFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSSERVERCERTISSUER</span>=
|
||||
<span class="hljs-attr">ZBX_TLSSERVERCERTSUBJECT</span>=
|
||||
<span class="hljs-attr">ZBX_TLSCERTFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSKEYFILE</span>=
|
||||
<span class="hljs-attr">ZBX_TLSPSKIDENTITY</span>=
|
||||
<span class="hljs-attr">ZBX_TLSPSKFILE</span>=
|
||||
<span class="hljs-attr">ZBX_DENYKEY</span>=system.run[*] # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
<span class="hljs-attr">ZBX_ALLOWKEY</span>= # Available since <span class="hljs-number">5.0</span>.<span class="hljs-number">0</span>
|
||||
</code></pre><p>Default values of these variables are specified after equal sign.</p>
|
||||
<p>The allowed variables are identical of parameters in official <code>zabbix_agent2.conf</code> configuration file. For example, <code>ZBX_REFRESHACTIVECHECKS</code> = <code>RefreshActiveChecks</code>.</p>
|
||||
<p>Please use official documentation for <a href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agent2"><code>zabbix_agent2.conf</code></a> to get more information about the variables.</p>
|
||||
<h2 id="allowed-volumes-for-the-zabbix-agent-2-container">Allowed volumes for the Zabbix agent 2 container</h2>
|
||||
<h3 id="-etc-zabbix-zabbix_agentd-d-"><code>/etc/zabbix/zabbix_agentd.d</code></h3>
|
||||
<p>The volume allows include <code>*.conf</code> files and extend Zabbix agent 2 using <code>UserParameter</code> feature.</p>
|
||||
<h3 id="-var-lib-zabbix-enc-"><code>/var/lib/zabbix/enc</code></h3>
|
||||
<p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_TLSCAFILE</code>, <code>ZBX_TLSCRLFILE</code>, <code>ZBX_TLSKEY_FILE</code> and <code>ZBX_TLSPSKFILE</code> variables.</p>
|
||||
<h3 id="-var-lib-zabbix-buffer-"><code>/var/lib/zabbix/buffer</code></h3>
|
||||
<p>The volume is used to store the file, where Zabbix Agent2 should keep SQLite database. To enable the feature specify <code>ZBX_ENABLEPERSISTENTBUFFER=true</code>. Available since 5.0.0.</p>
|
||||
<h1 id="user-feedback">User Feedback</h1>
|
||||
<h2 id="documentation">Documentation</h2>
|
||||
<p>Documentation for this image is stored in the <a href="https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/agent2"><code>agent2/</code> directory</a> of the <a href="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <a href="https://github.com/zabbix/zabbix-docker/blob/7.4/README.md">repository's <code>README.md</code> file</a> before attempting a pull request.</p>
|
||||
<h2 id="issues">Issues</h2>
|
||||
<p>If you have any problems with or questions about this image, please contact us through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
|
||||
<h3 id="known-issues">Known issues</h3>
|
||||
<p>Currently it is not allowed to specify <code>ZBX_ALIAS</code> environment variable. Please use <code>/etc/zabbix/zabbix_agent.d</code> volume with additional configuration files with <code>Alias</code> options.</p>
|
||||
<h2 id="contributing">Contributing</h2>
|
||||
<p>You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.</p>
|
||||
<p>Before you start to code, we recommend discussing your plans through a <a href="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.</p>
|
||||
1
Dockerfiles/agent2/rhel/build.sh
Symbolic link
1
Dockerfiles/agent2/rhel/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
238
Dockerfiles/agent2/rhel/docker-entrypoint.sh
Executable file
238
Dockerfiles/agent2/rhel/docker-entrypoint.sh
Executable file
@ -0,0 +1,238 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
: ${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
: ${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
export ZBX_ENABLEPERSISTENTBUFFER=1
|
||||
else
|
||||
unset ZBX_ENABLEPERSISTENTBUFFER
|
||||
unset ZBX_PERSISTENTBUFFERFILE
|
||||
fi
|
||||
|
||||
if [ "${ZBX_ENABLESTATUSPORT,,}" == "true" ]; then
|
||||
export ZBX_STATUSPORT=${ZBX_STATUSPORT="31999"}
|
||||
else
|
||||
unset ZBX_STATUSPORT
|
||||
fi
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agent2 "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agent2' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
661
Dockerfiles/agent2/rhel/licenses/AGPL-v3.0.txt
Normal file
661
Dockerfiles/agent2/rhel/licenses/AGPL-v3.0.txt
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
105
Dockerfiles/agent2/ubuntu/Dockerfile
Normal file
105
Dockerfiles/agent2/ubuntu/Dockerfile
Normal file
@ -0,0 +1,105 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=ubuntu:noble
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix agent 2" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"]
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
|
||||
set -eux && \
|
||||
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
|
||||
INSTALL_PKGS="bash \
|
||||
tzdata \
|
||||
iputils-ping \
|
||||
ca-certificates \
|
||||
smartmontools \
|
||||
sudo \
|
||||
libssl3t64 \
|
||||
libcurl4t64 \
|
||||
libpcre2-8-0 \
|
||||
libldap-2.4" && \
|
||||
apt-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||
--no-install-recommends install \
|
||||
${INSTALL_PKGS} && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agent2.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZBX_USERPARAMETERDIR} && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chgrp 0 ${ZABBIX_CONF_DIR} && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
${ZABBIX_USER_HOME_DIR}/ && \
|
||||
chmod g=u ${ZABBIX_CONF_DIR} && \
|
||||
/usr/sbin/zabbix_agent2 -V
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
1
Dockerfiles/agent2/ubuntu/README.md
Symbolic link
1
Dockerfiles/agent2/ubuntu/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/agent2/ubuntu/build.sh
Symbolic link
1
Dockerfiles/agent2/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
238
Dockerfiles/agent2/ubuntu/docker-entrypoint.sh
Executable file
238
Dockerfiles/agent2/ubuntu/docker-entrypoint.sh
Executable file
@ -0,0 +1,238 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
set +e
|
||||
|
||||
# Script trace mode
|
||||
if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default Zabbix installation name
|
||||
# Default Zabbix server host
|
||||
: ${ZBX_SERVER_HOST="zabbix-server"}
|
||||
# Default Zabbix server port number
|
||||
: ${ZBX_SERVER_PORT="10051"}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
ZABBIX_INTERNAL_ENC_DIR="${ZABBIX_USER_HOME_DIR}/enc_internal"
|
||||
|
||||
escape_spec_char() {
|
||||
local var_value=$1
|
||||
|
||||
var_value="${var_value//\\/\\\\}"
|
||||
var_value="${var_value//[$'\n']/}"
|
||||
var_value="${var_value//\//\\/}"
|
||||
var_value="${var_value//./\\.}"
|
||||
var_value="${var_value//\*/\\*}"
|
||||
var_value="${var_value//^/\\^}"
|
||||
var_value="${var_value//\$/\\\$}"
|
||||
var_value="${var_value//\&/\\\&}"
|
||||
var_value="${var_value//\[/\\[}"
|
||||
var_value="${var_value//\]/\\]}"
|
||||
|
||||
echo "$var_value"
|
||||
}
|
||||
|
||||
update_config_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
local is_multiple=$4
|
||||
|
||||
local masklist=("TLSPSKIdentity")
|
||||
|
||||
if [ ! -f "$config_path" ]; then
|
||||
echo "**** Configuration file '$config_path' does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ " ${masklist[@]} " =~ " $var_name " ]] && [ ! -z "$var_value" ]; then
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '****'. Enable DEBUG_MODE to view value ..."
|
||||
else
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
|
||||
# Use full path to a file for TLS related configuration parameters
|
||||
if [[ $var_name =~ ^TLS.*File$ ]] && [[ ! $var_value =~ ^/.+$ ]]; then
|
||||
var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value
|
||||
fi
|
||||
|
||||
# Escaping characters in parameter value and name
|
||||
var_value=$(escape_spec_char "$var_value")
|
||||
var_name=$(escape_spec_char "$var_name")
|
||||
|
||||
if [ "$(grep -E "^$var_name=$var_value$" $config_path)" ]; then
|
||||
echo "exists"
|
||||
elif [ "$(grep -E "^$var_name=" $config_path)" ] && [ "$is_multiple" != "true" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=$var_value/" "$config_path"
|
||||
echo "updated"
|
||||
elif [ "$(grep -Ec "^# $var_name=" $config_path)" -gt 1 ]; then
|
||||
sed -i -e "/^[#;] $var_name=$/i\\$var_name=$var_value" "$config_path"
|
||||
echo "added first occurrence"
|
||||
elif [ "$(grep -Ec "^[#;] $var_name=" $config_path)" -gt 0 ]; then
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=$var_value/" "$config_path"
|
||||
echo "added"
|
||||
else
|
||||
sed -i -e '$a\' -e "$var_name=$var_value" "$config_path"
|
||||
echo "added at the end"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
file_process_from_env() {
|
||||
local var_name=$1
|
||||
local file_name=$2
|
||||
local var_value=$3
|
||||
|
||||
if [ ! -z "$var_value" ]; then
|
||||
echo -n "$var_value" > "${ZABBIX_INTERNAL_ENC_DIR}/$var_name"
|
||||
file_name="${ZABBIX_INTERNAL_ENC_DIR}/${var_name}"
|
||||
fi
|
||||
|
||||
if [ -n "$var_value" ]; then
|
||||
export "$var_name"="$file_name"
|
||||
fi
|
||||
# Remove variable with plain text data
|
||||
unset "${var_name%%FILE}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_config() {
|
||||
: ${ZBX_PASSIVESERVERS=""}
|
||||
: ${ZBX_ACTIVESERVERS=""}
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST","$ZBX_PASSIVESERVERS
|
||||
elif [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
ZBX_PASSIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
|
||||
if [ ! -z "$ZBX_SERVER_HOST" ]; then
|
||||
if [ ! -z "$ZBX_SERVER_PORT" ] && [ "$ZBX_SERVER_PORT" != "10051" ]; then
|
||||
ZBX_SERVER_HOST=$ZBX_SERVER_HOST":"$ZBX_SERVER_PORT
|
||||
fi
|
||||
if [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST","$ZBX_ACTIVESERVERS
|
||||
else
|
||||
ZBX_ACTIVESERVERS=$ZBX_SERVER_HOST
|
||||
fi
|
||||
fi
|
||||
|
||||
: ${ZBX_PASSIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_PASSIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
export ZBX_PASSIVESERVERS="${ZBX_PASSIVESERVERS}"
|
||||
else
|
||||
unset ZBX_PASSIVESERVERS
|
||||
fi
|
||||
|
||||
: ${ZBX_ACTIVE_ALLOW:="true"}
|
||||
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ] && [ ! -z "$ZBX_ACTIVESERVERS" ]; then
|
||||
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
|
||||
export ZBX_ACTIVESERVERS="${ZBX_ACTIVESERVERS}"
|
||||
else
|
||||
unset ZBX_ACTIVESERVERS
|
||||
fi
|
||||
unset ZBX_SERVER_HOST
|
||||
unset ZBX_SERVER_PORT
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
export ZBX_ENABLEPERSISTENTBUFFER=1
|
||||
else
|
||||
unset ZBX_ENABLEPERSISTENTBUFFER
|
||||
unset ZBX_PERSISTENTBUFFERFILE
|
||||
fi
|
||||
|
||||
if [ "${ZBX_ENABLESTATUSPORT,,}" == "true" ]; then
|
||||
export ZBX_STATUSPORT=${ZBX_STATUSPORT="31999"}
|
||||
else
|
||||
unset ZBX_STATUSPORT
|
||||
fi
|
||||
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "DenyKey" "${ZBX_DENYKEY}"
|
||||
update_config_multiple_var "${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf" "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
|
||||
file_process_from_env "ZBX_TLSCAFILE" "${ZBX_TLSCAFILE}" "${ZBX_TLSCA}"
|
||||
file_process_from_env "ZBX_TLSCRLFILE" "${ZBX_TLSCRLFILE}" "${ZBX_TLSCRL}"
|
||||
file_process_from_env "ZBX_TLSCERTFILE" "${ZBX_TLSCERTFILE}" "${ZBX_TLSCERT}"
|
||||
file_process_from_env "ZBX_TLSKEYFILE" "${ZBX_TLSKEYFILE}" "${ZBX_TLSKEY}"
|
||||
file_process_from_env "ZBX_TLSPSKFILE" "${ZBX_TLSPSKFILE}" "${ZBX_TLSPSK}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
clear_zbx_env() {
|
||||
[[ "${ZBX_CLEAR_ENV}" == "false" ]] && return
|
||||
|
||||
for env_var in $(env | grep -E "^ZABBIX_"); do
|
||||
unset "${env_var%%=*}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
clear_zbx_env
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- /usr/sbin/zabbix_agent2 "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" == '/usr/sbin/zabbix_agent2' ]; then
|
||||
prepare_agent
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
#################################################
|
||||
74
Dockerfiles/agent2/windows/Dockerfile
Normal file
74
Dockerfiles/agent2/windows/Dockerfile
Normal file
@ -0,0 +1,74 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# escape=`
|
||||
ARG OS_BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:ltsc2022
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION}
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV ZABBIX_USER_HOME_DIR="C:\zabbix" `
|
||||
ZABBIX_CONF_DIR="C:\zabbix\conf"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR\buffer\agent2.db" `
|
||||
ZBX_USERPARAMETERDIR="${ZABBIX_USER_HOME_DIR}\user_scripts"
|
||||
|
||||
LABEL org.opencontainers.image.title="Zabbix agent 2" `
|
||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
||||
org.opencontainers.image.vendor="Zabbix SIA" `
|
||||
org.opencontainers.image.url="https://zabbix.com/" `
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" `
|
||||
org.opencontainers.image.licenses="AGPL v3.0" `
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
|
||||
org.opencontainers.image.version="${ZBX_VERSION}" `
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||
|
||||
COPY --from=builder ["C:\\zabbix-${ZBX_VERSION}-output", "C:\\zabbix"]
|
||||
COPY --from=builder ["C:\\build_deps\\pwsh", "C:\\Program Files\\PowerShell"]
|
||||
COPY [".\\docker-entrypoint.ps1", "C:\\zabbix"]
|
||||
|
||||
WORKDIR C:\zabbix\
|
||||
|
||||
USER ContainerAdministrator
|
||||
|
||||
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
|
||||
|
||||
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"]
|
||||
|
||||
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
|
||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
||||
`
|
||||
[Environment]::SetEnvironmentVariable('ZABBIX_USER_HOME_DIR', $env:ZABBIX_USER_HOME_DIR, [EnvironmentVariableTarget]::Machine); `
|
||||
`
|
||||
Write-Host ('Verifying Zabbix agent 2 {0} ...' -f $env:ZBX_VERSION); `
|
||||
zabbix_agent2.exe -V;
|
||||
|
||||
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_CONF_DIR | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_CONF_DIR\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_CONF_DIR\zabbix_agent2.d | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_USER_HOME_DIR\enc | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_USER_HOME_DIR\enc_internal | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZABBIX_USER_HOME_DIR\buffer | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_USERPARAMETERDIR | Out-Null; `
|
||||
`
|
||||
net accounts /MaxPWAge:unlimited; `
|
||||
net user /add zabbix /expire:never /passwordreq:no; `
|
||||
$acl = Get-Acl -Path $env:ZABBIX_USER_HOME_DIR; `
|
||||
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
||||
$acl.AddAccessRule($ace); `
|
||||
Set-Acl -AclObject $acl -Path $env:ZABBIX_USER_HOME_DIR;
|
||||
|
||||
USER zabbix
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
||||
CMD C:\zabbix\docker-entrypoint.ps1 C:\zabbix\sbin\zabbix_agent2.exe -c C:\zabbix\conf\zabbix_agent2.conf -f
|
||||
1
Dockerfiles/agent2/windows/README.md
Symbolic link
1
Dockerfiles/agent2/windows/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
266
Dockerfiles/agent2/windows/docker-entrypoint.ps1
Normal file
266
Dockerfiles/agent2/windows/docker-entrypoint.ps1
Normal file
@ -0,0 +1,266 @@
|
||||
|
||||
# Script trace mode
|
||||
if ($env:DEBUG_MODE -eq "true") {
|
||||
Set-PSDebug -trace 1
|
||||
}
|
||||
|
||||
# Default Zabbix server host
|
||||
if ($env:ZBX_SERVER_HOST -eq $null) {
|
||||
$env:ZBX_SERVER_HOST="zabbix-server"
|
||||
}
|
||||
# Default Zabbix server port number
|
||||
if ($env:ZBX_SERVER_PORT -eq $null) {
|
||||
$env:ZBX_SERVER_PORT="10051"
|
||||
}
|
||||
|
||||
# Default directories
|
||||
# Internal directory for TLS related files, used when TLS*File specified as plain text values
|
||||
$ZabbixInternalEncDir="$env:ZABBIX_USER_HOME_DIR/enc_internal"
|
||||
|
||||
function Update-Config-Var {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ConfigPath,
|
||||
[Parameter(Mandatory=$true, Position=1)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$VarName,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null,
|
||||
[Parameter(Mandatory=$false, Position=3)]
|
||||
[bool]$IsMultiple
|
||||
)
|
||||
|
||||
$MaskList = "TLSPSKIdentity"
|
||||
|
||||
if (-not(Test-Path -Path $ConfigPath -PathType Leaf)) {
|
||||
throw "**** Configuration file '$ConfigPath' does not exist"
|
||||
}
|
||||
|
||||
if ($MaskList.Contains($VarName) -eq $true -And [string]::IsNullOrWhitespace($VarValue) -ne $true) {
|
||||
Write-Host -NoNewline "** Updating '$ConfigPath' parameter ""$VarName"": '****'. Enable DEBUG_MODE to view value ..."
|
||||
}
|
||||
else {
|
||||
Write-Host -NoNewline "** Updating '$ConfigPath' parameter ""$VarName"": '$VarValue'..."
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($VarValue)) {
|
||||
if ((Get-Content $ConfigPath | %{$_ -match "^$VarName="}) -contains $true) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Where-Object {$_ -notmatch "^$VarName=" } |
|
||||
Set-Content $ConfigPath
|
||||
}
|
||||
|
||||
Write-Host "removed"
|
||||
return
|
||||
}
|
||||
|
||||
if ($VarValue -eq '""') {
|
||||
(Get-Content $ConfigPath) | Foreach-Object { $_ -Replace "^($VarName=)(.*)", '$1' } | Set-Content $ConfigPath
|
||||
Write-Host "undefined"
|
||||
return
|
||||
}
|
||||
|
||||
if ($VarName -match '^TLS.*File$') {
|
||||
$VarValue="$env:ZABBIX_USER_HOME_DIR\enc\$VarValue"
|
||||
}
|
||||
|
||||
if ((Get-Content $ConfigPath | %{$_ -match "^$VarName="}) -contains $true -And $IsMultiple -ne $true) {
|
||||
(Get-Content $ConfigPath) | Foreach-Object { $_ -Replace "^$VarName=.+", "$VarName=$VarValue" } | Set-Content $ConfigPath
|
||||
|
||||
Write-Host updated
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 1) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=$") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added first occurrence"
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 0) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added"
|
||||
}
|
||||
else {
|
||||
Add-Content -Path $ConfigPath -Value "$VarName=$VarValue"
|
||||
Write-Host "added at the end"
|
||||
}
|
||||
}
|
||||
|
||||
function Update-Config-Multiple-Var {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ConfigPath,
|
||||
[Parameter(Mandatory=$true, Position=1)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$VarName,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null
|
||||
)
|
||||
|
||||
foreach ($value in $VarValue.split(',')) {
|
||||
Update-Config-Var $ConfigPath $VarName $value $true
|
||||
}
|
||||
}
|
||||
|
||||
function File-Process-From-Env {
|
||||
Param (
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $VarName,
|
||||
[Parameter(Mandatory=$false, Position=1)]
|
||||
[string]$FileName = $null,
|
||||
[Parameter(Mandatory=$false, Position=2)]
|
||||
[string]$VarValue = $null
|
||||
)
|
||||
|
||||
if (![string]::IsNullOrEmpty($VarValue)) {
|
||||
$VarValue | Set-Content "$ZabbixInternalEncDir\$VarName"
|
||||
$FileName="$ZabbixInternalEncDir\$VarName"
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($FileName)) {
|
||||
Set-Item env:$VarName -Value $FileName
|
||||
}
|
||||
|
||||
$VarName=$VarName -replace 'FILE$'
|
||||
Set-Item env:$VarName -Value $null
|
||||
}
|
||||
|
||||
function Prepare-Zbx-Agent-Config {
|
||||
if ($env:ZBX_PASSIVESERVERS -eq $null) {
|
||||
$env:ZBX_PASSIVESERVERS=""
|
||||
}
|
||||
if ($env:ZBX_ACTIVESERVERS -eq $null) {
|
||||
$env:ZBX_ACTIVESERVERS=""
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST) -And ![string]::IsNullOrEmpty($env:ZBX_PASSIVESERVERS)) {
|
||||
$env:ZBX_PASSIVESERVERS="$env:ZBX_SERVER_HOST,$env:ZBX_PASSIVESERVERS"
|
||||
}
|
||||
elseif (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST)) {
|
||||
$env:ZBX_PASSIVESERVERS=$env:ZBX_SERVER_HOST
|
||||
}
|
||||
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_HOST)) {
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_SERVER_PORT) -And $env:ZBX_SERVER_PORT -ne "10051") {
|
||||
$env:ZBX_SERVER_HOST="$env:ZBX_SERVER_HOST:$env:ZBX_SERVER_PORT"
|
||||
}
|
||||
if (![string]::IsNullOrEmpty($env:ZBX_ACTIVESERVERS)) {
|
||||
$env:ZBX_ACTIVESERVERS="$env:ZBX_SERVER_HOST,$env:ZBX_ACTIVESERVERS"
|
||||
}
|
||||
else {
|
||||
$env:ZBX_ACTIVESERVERS=$env:ZBX_SERVER_HOST
|
||||
}
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_PASSIVE_ALLOW)) {
|
||||
$env:ZBX_PASSIVE_ALLOW="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_PASSIVE_ALLOW -eq "true") {
|
||||
Write-Host "** Using '$env:ZBX_PASSIVESERVERS' servers for passive checks"
|
||||
}
|
||||
else {
|
||||
Set-Item env:ZBX_PASSIVESERVERS -Value $null
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_ACTIVE_ALLOW)) {
|
||||
$env:ZBX_ACTIVE_ALLOW="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_ACTIVE_ALLOW -eq "true") {
|
||||
Write-Host "** Using '$env:ZBX_ACTIVESERVERS' servers for active checks"
|
||||
}
|
||||
else {
|
||||
Set-Item env:ZBX_ACTIVESERVERS -Value $null
|
||||
}
|
||||
Set-Item env:ZBX_SERVER_HOST -Value $null
|
||||
Set-Item env:ZBX_SERVER_PORT -Value $null
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_ENABLEPERSISTENTBUFFER)) {
|
||||
$env:ZBX_ENABLEPERSISTENTBUFFER="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_ENABLEPERSISTENTBUFFER -eq "true") {
|
||||
$env:ZBX_ENABLEPERSISTENTBUFFER="1"
|
||||
}
|
||||
else {
|
||||
Set-Item env:ZBX_ENABLEPERSISTENTBUFFER -Value $null
|
||||
Set-Item env:ZBX_PERSISTENTBUFFERFILE -Value $null
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_ENABLESTATUSPORT)) {
|
||||
$env:ZBX_ENABLESTATUSPORT="true"
|
||||
}
|
||||
|
||||
if ($env:ZBX_ENABLESTATUSPORT -eq "true") {
|
||||
$env:ZBX_STATUSPORT="31999"
|
||||
}
|
||||
|
||||
Update-Config-Multiple-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2_item_keys.conf" "DenyKey" "$env:ZBX_DENYKEY"
|
||||
Update-Config-Multiple-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2_item_keys.conf" "AllowKey" "$env:ZBX_ALLOWKEY"
|
||||
|
||||
File-Process-From-Env "ZBX_TLSCAFILE" "$env:ZBX_TLSCAFILE" "$env:ZBX_TLSCA"
|
||||
File-Process-From-Env "ZBX_TLSCRLFILE" "$env:ZBX_TLSCRLFILE" "$env:ZBX_TLSCRL"
|
||||
File-Process-From-Env "ZBX_TLSCERTFILE" "$env:ZBX_TLSCERTFILE" "$env:ZBX_TLSCERT"
|
||||
File-Process-From-Env "ZBX_TLSKEYFILE" "$env:ZBX_TLSKEYFILE" "$env:ZBX_TLSKEY"
|
||||
File-Process-From-Env "ZBX_TLSPSKFILE" "$env:ZBX_TLSPSKFILE" "$env:ZBX_TLSPSK"
|
||||
}
|
||||
|
||||
function Prepare-Zbx-Agent-Plugins-Config {
|
||||
Write-Host "** Preparing Zabbix agent 2 (plugins) configuration files"
|
||||
|
||||
Update-Config-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2.d\plugins.d\mongodb.conf" "Plugins.MongoDB.System.Path" "$env:ZABBIX_USER_HOME_DIR\zabbix-agent2-plugin\mongodb.exe"
|
||||
Update-Config-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2.d\plugins.d\postgresql.conf" "Plugins.PostgreSQL.System.Path" "$env:ZABBIX_USER_HOME_DIR\zabbix-agent2-plugin\postgresql.exe"
|
||||
Update-Config-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2.d\plugins.d\mssql.conf" "Plugins.MSSQL.System.Path" "$env:ZABBIX_USER_HOME_DIR\zabbix-agent2-plugin\mssql.exe"
|
||||
Update-Config-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2.d\plugins.d\ember.conf" "Plugins.EmberPlus.System.Path" "$env:ZABBIX_USER_HOME_DIR\zabbix-agent2-plugin\ember-plus.exe"
|
||||
if (Get-Command nvidia-smi.exe -errorAction SilentlyContinue) {
|
||||
Update-Config-Var "$env:ZABBIX_CONF_DIR\zabbix_agent2.d\plugins.d\nvidia.conf" "Plugins.NVIDIA.System.Path" "$env:ZABBIX_USER_HOME_DIR\zabbix-agent2-plugin\nvidia-gpu.exe"
|
||||
}
|
||||
}
|
||||
|
||||
function ClearZbxEnv() {
|
||||
if ([string]::IsNullOrWhitespace($env:ZBX_CLEAR_ENV)) {
|
||||
return
|
||||
}
|
||||
|
||||
$env_vars=Get-ChildItem env:* | Where-Object {$_.Name -match "^ZABBIX_.*" } | foreach { $_.Name }
|
||||
foreach ($env_var in $env_vars) {
|
||||
Set-Item env:$env_var -Value $null
|
||||
}
|
||||
}
|
||||
|
||||
function PrepareAgent {
|
||||
Write-Host "** Preparing Zabbix agent 2"
|
||||
|
||||
Prepare-Zbx-Agent-Config
|
||||
Prepare-Zbx-Agent-Plugins-Config
|
||||
ClearZbxEnv
|
||||
}
|
||||
|
||||
$commandArgs=$args
|
||||
|
||||
if ($args.length -gt 0 -And $args[0].Substring(0, 1) -eq '-') {
|
||||
$commandArgs = "C:\zabbix\sbin\zabbix_agent2.exe " + $commandArgs
|
||||
}
|
||||
|
||||
if ($args.length -gt 0 -And $args[0] -eq "C:\zabbix\sbin\zabbix_agent2.exe") {
|
||||
PrepareAgent
|
||||
}
|
||||
|
||||
if ($args.length -gt 0) {
|
||||
Invoke-Expression "$CommandArgs"
|
||||
}
|
||||
88
Dockerfiles/build-base/README.md
Normal file
88
Dockerfiles/build-base/README.md
Normal file
@ -0,0 +1,88 @@
|
||||

|
||||
|
||||
# What is Zabbix?
|
||||
|
||||
Zabbix is an enterprise-class open source distributed monitoring solution.
|
||||
|
||||
Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning.
|
||||
|
||||
For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com
|
||||
|
||||
# What is Zabbix build base?
|
||||
|
||||
Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools.
|
||||
|
||||
# Zabbix build base images
|
||||
|
||||
These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.23, Ubuntu 24.04 (noble), CentOS Stream 10 and Oracle Linux 10 images. The available versions of the image are:
|
||||
|
||||
Zabbix build base 6.0 (tags: alpine-6.0-latest, ubuntu-6.0-latest, ol-6.0-latest)
|
||||
Zabbix build base 6.0.* (tags: alpine-6.0.*, ubuntu-6.0.*, ol-6.0.*)
|
||||
Zabbix build base 7.0 (tags: alpine-7.0-latest, ubuntu-7.0-latest, ol-7.0-latest)
|
||||
Zabbix build base 7.0.* (tags: alpine-7.0.*, ubuntu-7.0.*, ol-7.0.*, ltsc2019-7.0.*, ltsc2022-7.0.*)
|
||||
Zabbix build base 7.2 (tags: alpine-7.2-latest, ubuntu-7.2-latest, ol-7.2-latest)
|
||||
Zabbix build base 7.2.* (tags: alpine-7.2.*, ubuntu-7.2.*, ol-7.2.*, ltsc2019-7.2.*, ltsc2022-7.2.*)
|
||||
Zabbix build base 7.4 (tags: alpine-7.4-latest, ubuntu-7.4-latest, ol-7.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest)
|
||||
Zabbix build base 7.4.* (tags: alpine-7.4.*, ubuntu-7.4.*, ol-7.4.*, ltsc2019-7.4.*, ltsc2022-7.4.*)
|
||||
Zabbix build base 8.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk, ltsc2019-trunk, ltsc2022-trunk)
|
||||
|
||||
Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux.
|
||||
|
||||
# How to use this image
|
||||
|
||||
The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage.
|
||||
|
||||
# The image variants
|
||||
|
||||
The `zabbix-build-base` images come in many flavors, each designed for a specific use case.
|
||||
|
||||
## `zabbix-build-base:alpine-<version>`
|
||||
|
||||
This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
|
||||
|
||||
This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
|
||||
|
||||
To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).
|
||||
|
||||
## `zabbix-build-base:ubuntu-<version>`
|
||||
|
||||
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
|
||||
|
||||
## `zabbix-build-base:ol-<version>`
|
||||
|
||||
Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more.
|
||||
|
||||
# Supported Docker versions
|
||||
|
||||
This image is officially supported on Docker version 1.12.0.
|
||||
|
||||
Support for older versions (down to 1.6) is provided on a best-effort basis.
|
||||
|
||||
Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon.
|
||||
|
||||
# User Feedback
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/7.4/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request.
|
||||
|
||||
## Issues
|
||||
|
||||
If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues).
|
||||
|
||||
### Known issues
|
||||
|
||||
## Contributing
|
||||
|
||||
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
|
||||
|
||||
Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
|
||||
|
||||
## License
|
||||
|
||||
Starting from Zabbix version 7.0, all subsequent Zabbix versions will be released under the GNU Affero General Public License version 3 (AGPLv3).
|
||||
You can modify the relevant version and propagate such modified version under the terms of the AGPLv3 as published by the Free Software Foundation.
|
||||
For additional details, including answers to common questions about the AGPLv3, see the generic FAQ from the [Free Software Foundation](http://www.fsf.org/licenses/gpl-faq.html).
|
||||
|
||||
Zabbix is Open Source Software, however, if you use Zabbix in a commercial context we kindly ask you to support the development of Zabbix by purchasing some level of technical support.
|
||||
All previous Zabbix software versions up to 6.4 are released under the GNU General Public License version 2 (GPLv2). The formal terms of the GPLv2 and AGPLv3 can be found at http://www.fsf.org/licenses/.
|
||||
62
Dockerfiles/build-base/alpine/Dockerfile
Normal file
62
Dockerfiles/build-base/alpine/Dockerfile
Normal file
@ -0,0 +1,62 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=alpine:3.23
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} \
|
||||
PATH=/usr/lib/jvm/default-jvm/bin:$PATH \
|
||||
JAVA_HOME=/usr/lib/jvm/default-jvm
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.title="Zabbix build base" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
RUN set -eux && \
|
||||
ARCH_SUFFIX="$(cat /etc/apk/arch)"; \
|
||||
case "$ARCH_SUFFIX" in \
|
||||
riscv64) \
|
||||
openjdk_packages='openjdk21 openjdk21-jre-headless'; \
|
||||
;; \
|
||||
*) openjdk_packages='openjdk17 openjdk17-jre-headless'; \
|
||||
esac; \
|
||||
INSTALL_PKGS="bash \
|
||||
autoconf \
|
||||
automake \
|
||||
c-ares-dev \
|
||||
coreutils \
|
||||
curl \
|
||||
curl-dev \
|
||||
libevent-dev \
|
||||
libssh-dev \
|
||||
sqlite-dev \
|
||||
libmodbus-dev \
|
||||
libxml2-dev \
|
||||
linux-headers \
|
||||
mysql-dev \
|
||||
net-snmp-dev \
|
||||
openipmi-dev \
|
||||
openldap-dev \
|
||||
openssl-dev \
|
||||
patch \
|
||||
pcre2-dev \
|
||||
libpq-dev \
|
||||
gettext \
|
||||
git \
|
||||
g++ \
|
||||
go \
|
||||
make \
|
||||
$openjdk_packages \
|
||||
unixodbc-dev \
|
||||
zlib-dev" && \
|
||||
apk add \
|
||||
--no-cache \
|
||||
--clean-protected \
|
||||
${INSTALL_PKGS}
|
||||
1
Dockerfiles/build-base/alpine/README.md
Symbolic link
1
Dockerfiles/build-base/alpine/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/build-base/alpine/build.sh
Symbolic link
1
Dockerfiles/build-base/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
69
Dockerfiles/build-base/centos/Dockerfile
Normal file
69
Dockerfiles/build-base/centos/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=quay.io/centos/centos:stream10-minimal
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} \
|
||||
PATH=/usr/local/go/bin:$PATH \
|
||||
GOPROXY=direct
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.title="Zabbix build base" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="autoconf \
|
||||
automake \
|
||||
bash \
|
||||
gcc \
|
||||
patch \
|
||||
c-ares-devel \
|
||||
pcre2-devel \
|
||||
libcurl-devel \
|
||||
libevent-devel \
|
||||
libssh-devel \
|
||||
# libmodbus-devel \
|
||||
libxml2-devel \
|
||||
openssl-devel \
|
||||
openldap-devel \
|
||||
make \
|
||||
mysql8.4-devel \
|
||||
net-snmp-devel \
|
||||
OpenIPMI-devel \
|
||||
openldap-devel \
|
||||
sqlite-devel \
|
||||
postgresql-private-devel \
|
||||
postgresql-server-devel \
|
||||
java-21-openjdk-devel \
|
||||
git \
|
||||
gettext \
|
||||
go-toolset \
|
||||
unixODBC-devel \
|
||||
zlib-devel" && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "extras-common" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs epel-release && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "baseos" \
|
||||
--enablerepo "appstream" \
|
||||
--enablerepo "crb" \
|
||||
--enablerepo="epel" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs ${INSTALL_PKGS}
|
||||
1
Dockerfiles/build-base/centos/README.md
Symbolic link
1
Dockerfiles/build-base/centos/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/build-base/centos/build.sh
Symbolic link
1
Dockerfiles/build-base/centos/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
63
Dockerfiles/build-base/ol/Dockerfile
Normal file
63
Dockerfiles/build-base/ol/Dockerfile
Normal file
@ -0,0 +1,63 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=container-registry.oracle.com/os/oraclelinux:10-slim
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} \
|
||||
PATH=/usr/local/go/bin:$PATH
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="AGPL v3.0" \
|
||||
org.opencontainers.image.title="Zabbix build base" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix SIA" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol10.repo", "/etc/yum.repos.d/oracle-epel-ol10.repo"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="autoconf \
|
||||
automake \
|
||||
bash \
|
||||
gcc \
|
||||
go-toolset \
|
||||
patch \
|
||||
c-ares-devel \
|
||||
pcre2-devel \
|
||||
libcurl-devel \
|
||||
libevent-devel \
|
||||
libssh-devel \
|
||||
# libmodbus-devel \
|
||||
libxml2-devel \
|
||||
openssl-devel \
|
||||
openldap-devel \
|
||||
make \
|
||||
mysql8.4-devel \
|
||||
net-snmp-devel \
|
||||
OpenIPMI-devel \
|
||||
openldap-devel \
|
||||
sqlite-devel \
|
||||
postgresql-private-devel \
|
||||
postgresql-server-devel \
|
||||
java-21-openjdk-devel \
|
||||
git \
|
||||
gettext \
|
||||
unixODBC-devel \
|
||||
zlib-devel" && \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ol10_baseos_latest" \
|
||||
--enablerepo "ol10_appstream" \
|
||||
--enablerepo "ol10_codeready_builder" \
|
||||
--enablerepo="ol10_u0_developer_EPEL" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--nodocs ${INSTALL_PKGS}
|
||||
1
Dockerfiles/build-base/ol/README.md
Symbolic link
1
Dockerfiles/build-base/ol/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
1
Dockerfiles/build-base/ol/build.sh
Symbolic link
1
Dockerfiles/build-base/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
||||
@ -0,0 +1,6 @@
|
||||
[ol10_u0_developer_EPEL]
|
||||
name=Oracle Linux $releasever.0 EPEL Packages for Development ($basearch)
|
||||
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL10/0/developer/EPEL/$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
82
Dockerfiles/build-base/rhel/Dockerfile
Normal file
82
Dockerfiles/build-base/rhel/Dockerfile
Normal file
@ -0,0 +1,82 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG OS_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi-minimal:10.1
|
||||
FROM ${OS_BASE_IMAGE}
|
||||
|
||||
ARG MAJOR_VERSION=7.4
|
||||
ARG RELEASE=6
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.6
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} \
|
||||
PATH=/usr/local/go/bin:$PATH
|
||||
|
||||
LABEL description="Prepared environment to build Zabbix components" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
name="zabbix/zabbix-build-base-trunk" \
|
||||
release="${RELEASE}" \
|
||||
summary="Zabbix build base" \
|
||||
url="https://www.zabbix.com/" \
|
||||
vendor="Zabbix SIA" \
|
||||
version="${MAJOR_VERSION}" \
|
||||
io.k8s.description="Prepared environment to build Zabbix components" \
|
||||
io.k8s.display-name="Zabbix build base" \
|
||||
io.openshift.expose-services="" \
|
||||
io.openshift.tags="zabbix,build" \
|
||||
org.label-schema.description="Prepared environment to build Zabbix components" \
|
||||
org.label-schema.license="AGPL v3.0" \
|
||||
org.label-schema.name="zabbix-build-base-rhel" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vendor="Zabbix SIA"
|
||||
|
||||
COPY ["licenses", "/licenses"]
|
||||
|
||||
RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--mount=type=tmpfs,target=/var/cache/yum/ \
|
||||
# --mount=type=bind,target=/run/secrets/,src=secrets/ \
|
||||
set -eux && \
|
||||
INSTALL_PKGS="autoconf \
|
||||
automake \
|
||||
bash \
|
||||
gcc \
|
||||
go-toolset \
|
||||
patch \
|
||||
c-ares-devel \
|
||||
pcre2-devel \
|
||||
libcurl-devel \
|
||||
libevent-devel \
|
||||
libssh-devel \
|
||||
# libmodbus-devel \
|
||||
libxml2-devel \
|
||||
openssl-devel \
|
||||
openldap-devel \
|
||||
make \
|
||||
mysql8.4-devel \
|
||||
net-snmp-devel \
|
||||
OpenIPMI-devel \
|
||||
openldap-devel \
|
||||
sqlite-devel \
|
||||
postgresql-private-devel \
|
||||
postgresql-server-devel \
|
||||
java-21-openjdk-devel \
|
||||
git \
|
||||
gettext \
|
||||
unixODBC-devel \
|
||||
zlib-devel" && \
|
||||
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
rm -rf /tmp/epel-release-latest-10.noarch.rpm && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
microdnf -y install \
|
||||
--disablerepo "*" \
|
||||
--enablerepo "ubi-10-baseos-rpms" \
|
||||
--enablerepo "ubi-10-appstream-rpms" \
|
||||
--enablerepo "rhel-10-for-$ARCH_SUFFIX-baseos-rpms" \
|
||||
--enablerepo "rhel-10-for-$ARCH_SUFFIX-appstream-rpms" \
|
||||
--enablerepo "codeready-builder-for-rhel-10-$ARCH_SUFFIX-rpms" \
|
||||
--enablerepo "epel" \
|
||||
--setopt=install_weak_deps=0 \
|
||||
--setopt=keepcache=0 \
|
||||
--best \
|
||||
--setopt=tsflags=nodocs \
|
||||
${INSTALL_PKGS}
|
||||
1
Dockerfiles/build-base/rhel/README.md
Symbolic link
1
Dockerfiles/build-base/rhel/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
../README.md
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user