From 87b27b3b49fcf717a7ab656c391f539878d57b83 Mon Sep 17 00:00:00 2001 From: Marsell Kukuljevic Date: Tue, 26 Nov 2024 17:58:00 +0100 Subject: [PATCH] Add support for configurable Azure Defender severity, plus fix a sporadic resource-group bug. --- check_mk-azure/azure-spearhead-0.2.3.mkp | Bin 5695 -> 0 bytes check_mk-azure/azure-spearhead-0.3.0.mkp | Bin 0 -> 6072 bytes .../base/plugins/agent_based/azure_common.py | 10 ++- .../agents/special/agent_azure_common | 13 +++- .../check_mk/web/plugins/wato/azure_common.py | 71 +++++++++++++++++- 5 files changed, 86 insertions(+), 8 deletions(-) delete mode 100755 check_mk-azure/azure-spearhead-0.2.3.mkp create mode 100755 check_mk-azure/azure-spearhead-0.3.0.mkp diff --git a/check_mk-azure/azure-spearhead-0.2.3.mkp b/check_mk-azure/azure-spearhead-0.2.3.mkp deleted file mode 100755 index 8dfd2e7465454ee7604d1daea1c71601e7b95357..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5695 zcma);I+h4ZE6+afj+=xl%))zRRc7 z(&^WoWGwI&&(Uz!aC)6Or~F~utAM=0!^c$3cG_~>KOcj3FS+ftO#Q@lJXH5?2$*BrYew`VN~S_EvKcUZ1X_rgkene`h}G@f+ip{fbAc z1{WRL)EP35xS~_;6?#31*?kA{4An}b26C`C^rDqwYWR307!~xqYj=5zi0H!!a6)ZB zp{rugC_}^$``_43uf{7%(*$Q4O@~IMh0Ih76M={K4Y?;2 z%gxqJr9T2rekZvNpf%Pm^S&a)pd_Fl>AfALojEw!wb_h`j=O~4ZLE*XvOisPg!WlE zpwiIskFVygE^Y#$V<@;!cQ*>OrJI&&N z&t-lyN)@*9jBn4esR zVvnI&n;S#Sq}jp4MmTb574#5ef3?_I6$$%aZ`38I7Vx6acQ~ZV=wYi20XNuO<7K7qW{;vNhOECt8fF zo!pa+C3aS>22{_Piv*CtRj^3y3Mgi@S1s4R3-oez-FmPt0kg#?*h7o8|# z^0ix8w)h+m1^S-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`T2Sv;Tr({F`jmqxgJaQz3HrV9EA(AOxcT4Bw?~L9R3^a0(2iKp&5P=)b1VdVXM>f zI9bP9(IjN2Yw!lDu?ENVUY9AI6NBtD#_rn!oktT#wy?zy zNfw6}0*wwIl93#*CkJ`2UATCE_K&pqW6IeC+tl0sbW#y8F~iYNwqD?6ZL7)HFcAUI z(3sQReX-f?d($jEy}B;*^J?4!c7%@{{Rh?%^LvsPy-S_jSdqBT;0@-dqO~?j{Q0re zLc`6nD%*8;fsVWlLiOP@i*6kg%lSMc*oWH3S8t?ENRX$7tz5Xe5RJnpsxUhbXjM#{ zSJ0?QeZc)W&))R5#eRx?HvQJvCX1t8sGUeaBPM0f78p=iwUWK6RCV)&dj7zEl^^IS zH~J029>ic5dW*~Jj@@}1EYUZZLDy5!$GcX>`orTb3_D*OPpRzhHL>5-vmCiD!Cjy| zq6b-<6c|s^BpQoj1hCnc8LB9*3u{#E_O;M`EpSNLLfJ8OPg7GtEV?FFIa;TP-0Eyx z@N8C(|DZV|7VI9i=uwD)5?iX;IMfVA+?bf(fx2&H`N!f{vI`W5N%aI_Jg ztf=4bgA!ethDiut@4ZjLDeQq2!#SJ>`+=FWi1E7S4T9M`7FN1Ehz}RdHP)I9OsUy6 zE_Q|sK;!y*i$O<;K+Y?9r2oYmn|*=}!P848MnULwD=n5FYrWX&R7we-FI4q@&;%_= yWK^9*QHp1<3e8`m9}h*Q~dV~Ia4%#Ie+J69)79>&t diff --git a/check_mk-azure/azure-spearhead-0.3.0.mkp b/check_mk-azure/azure-spearhead-0.3.0.mkp new file mode 100755 index 0000000000000000000000000000000000000000..8d65f83a7d0d3d8542284605e032e95ee187410d GIT binary patch literal 6072 zcma)m?}X0`M^$QXlvlYPQ?yEiA} z9&lydm@9=rl%Q(besgDtLMhHO5sJ$ychtcwgzBeZiv(YVzR7TKe&rQfbi%PUpcWOYOu(h%#*v5bRlEl zruX(WTivfD{lM{9`U&E^WKh=Yr6hl92fZta+K*T1f~G@fZkd9% zL#2v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