From e97afec2ada6face3e100cea0a5cc1a07ac284c7 Mon Sep 17 00:00:00 2001 From: Robert Sander Date: Fri, 11 Oct 2024 09:47:07 +0200 Subject: [PATCH] readds check if last element is available on line --- .../plugins/agent_based/postfix_mailq_details.py | 9 +++++++-- .../postfix_mailq_details-5.3.0.mkp | Bin 3991 -> 0 bytes .../postfix_mailq_details-5.3.1.mkp | Bin 0 -> 3960 bytes 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 postfix_mailq_details/postfix_mailq_details-5.3.0.mkp create mode 100644 postfix_mailq_details/postfix_mailq_details-5.3.1.mkp diff --git a/postfix_mailq_details/lib/check_mk/base/plugins/agent_based/postfix_mailq_details.py b/postfix_mailq_details/lib/check_mk/base/plugins/agent_based/postfix_mailq_details.py index 0e7b445a..b4d10716 100644 --- a/postfix_mailq_details/lib/check_mk/base/plugins/agent_based/postfix_mailq_details.py +++ b/postfix_mailq_details/lib/check_mk/base/plugins/agent_based/postfix_mailq_details.py @@ -41,10 +41,15 @@ def parse_postfix_mailq_details(string_table): section = {} for line in string_table: item = _postfix_mailq_details_name(line) + mails = int(line[3]) + try: + bytes = int(line[4]) + except: + bytes = 0 if line[1] == 'age': - data = (line[2], int(line[3]), int(line[4])) + data = (line[2], mails, bytes) if line[1] == 'total' and line[2] == 'all': - data = (line[5], int(line[3]), int(line[4])) + data = (line[5], mails, bytes) section[item] = data return section diff --git a/postfix_mailq_details/postfix_mailq_details-5.3.0.mkp b/postfix_mailq_details/postfix_mailq_details-5.3.0.mkp deleted file mode 100644 index 72fe7c76360a56d04362fe539e1b8a03544dd3b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3991 zcmZ|RWl$83x(09>r9)a$LXZ$d=@0}7>5|w*3CSgwX5kNrbV%3IAWKTKfPkccuypSt zv9iQc(%|knXXeiRaPHg>&%Dp~-@G#qcfvh_6k*#BM0hM9#CP=v_2v4_1KD9V?Ie^$ zyG{mdvXRlie&nRgW%$DRv8zC1i54e!n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0{>iFca(;LoF#a4YN-7Z9Qc zPZ%Wvh9t^6{h)z@ijgG+Ka*=g*QkZjiA6@e0#M9BzA}wBr92y!#O+bV{Q#KrdFJFIPh;oHngIp_?Xz z4s^;AGNXxpZl2W3N>M=N%Hqt!xiI2d7(?Mf{z$rVPKkVu%TYg8-#WWKZYr_Q&&b1# zA@|YV!)AkS0U@}n!+S^6&dLV^dRHI87X{ql#mb+~$k!<696ehAceG0-9kxOAHPz9y z^4NZpLH1l@ia7z(>`kQ3UdAS1DXmTlRy9wGh=Q#Q?i%j#-&mxx!D~#1| zv49s&2Mqimw~!ji37+IyO}BKy(INk?%cS=)%(fsGrGi39$*ebb3l|GK*)8fDK#ZPC zQYEAQ9)n(?*CuOY(6fo`NgT#(Lbk+;U##&xQ7OcF-{BdD@XmG_!~jMn zu{9v)S2|R&l%~JK3to$lQp*~L#vuFW54O#PIM2n@csIA0h-@eA%^>|=oC+A(hb#)k zVgcHpRpu92QFf3gn~Frt1+B%P64E9=t2m{0{>~hLg7lHbQPH5EKUS>m8h~FDDzW?E zDy~J<+wqxq>gOEng5y*n?cB&vlp$U_pUT|s@WS*Y^3tbd*CL+90hQN09L$*xnASN|O)hBNIJ>Qo3J!jHO=3*-Mug45Lud1CuJb%t#zF(@x zbXD7k;!^w$Z-1l++P9hqdoV_UnP0T1nQN}wpq=?XRB|?^q(ohj)ZKO1!(>Q0kv6r> zRwCbrT|E}oChEJ}KMB)7(5p0m;eE^Nw{auNE0voZ)HfssWGXXXC3d$2GMV+(ijCv&TK-MFb9a4LDS@C{9A=KMiNH{KVwWwk}H+htEaf5$69?LAH7c z6gPSakJkyprg{lKa(owF4XV(%?MG)TlyO+ysNN7KwV|f-8ZU#{;nLluqsZ`W87!wZ ezc7~%j2zbu{qIrmze}O!#1@KYZ6WwUK=3b7{`D6C diff --git a/postfix_mailq_details/postfix_mailq_details-5.3.1.mkp b/postfix_mailq_details/postfix_mailq_details-5.3.1.mkp new file mode 100644 index 0000000000000000000000000000000000000000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