Re: regex matched but not matched

M/Monit Support <[email protected]> Mon, 7 Jul 2025 13:36:13 +0200
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
--Apple-Mail=_48033324-13E9-40EF-B887-B96F61FAD28F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

could you please check if the issue persists with Monit 5.35.2? There =
was a fix that might result in false negatives when LWP (thread) exists =
that matches the old PID of the process.

Best regards,
The M/Monit team


> On 7. 7. 2025, at 13:27, lejeczek via This is the general mailing list =
for monit <[email protected]> wrote:
>=20
> Hi guys.
> I do:
> -> $ monit procmatch "^/usr/bin/conmon(.*?)-n freeipa.mine.priv "
> List of processes matching pattern "^/usr/bin/conmon(.*?)-n =
freeipa.mine.priv ":
> Total matches: 0
>=20
> yet I have a monit file like:
>=20
>   check process freeipa.mine.priv.container with matching =
"^/usr/bin/conmon(.*?)-n freeipa.mine.priv "
>     start program =3D "/usr/bin/podman start freeipa.mine.priv" with =
timeout 30 seconds
>     stop program  =3D "/usr/bin/podman stop freeipa.mine.priv" with =
timeout 30 seconds
>     if 3 restarts within 5 cycles then alert
>     if 3 restarts within 5 cycles then timeout
>=20
> and monit thinks, say:
>=20
> -> $ monit status freeipa.mine.priv.container
> Monit 5.33.0 uptime: 4d 6h 18m
>=20
> Process 'freeipa.mine.priv.container'
>   status                       OK
>   monitoring status            Monitored
>   monitoring mode              active
>   on reboot                    start
>   pid                          3617222
>=20
> What is going on there? 'Pid' above, is of another container's of name =
'freeipa.mine.priv.c9s'
> If @devel reads this - a bug?
> many thanks, L.


--Apple-Mail=_48033324-13E9-40EF-B887-B96F61FAD28F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: =
after-white-space;">Hi,<div><br></div><div><p style=3D"margin: 0px; =
font-width: normal; line-height: normal; font-size-adjust: none; =
font-kerning: auto; font-variant-alternates: normal; =
font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;">could you please check if the issue =
persists with Monit 5.35.2? There was a fix that might result in false =
negatives when LWP (thread) exists that matches the old PID of the =
process.</p><p style=3D"margin: 0px; font-width: normal; line-height: =
normal; font-size-adjust: none; font-kerning: auto; =
font-variant-alternates: normal; font-variant-ligatures: normal; =
font-variant-numeric: normal; font-variant-east-asian: normal; =
font-variant-position: normal; font-feature-settings: normal; =
font-optical-sizing: auto; font-variation-settings: =
normal;"><br></p></div><div><div>
<div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;"><div style=3D"color: rgb(0, 0, 0); =
font-family: Helvetica; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;">Best regards,<br>The =
M/Monit team<br></div><div style=3D"color: rgb(0, 0, 0); font-family: =
Helvetica; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;"><br></div></div>

</div>
<div><br><blockquote type=3D"cite"><div>On 7. 7. 2025, at 13:27, =
lejeczek via This is the general mailing list for monit =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div>

 =20

    <meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3DUTF-8">
 =20
  <div>
    <font size=3D"2" face=3D"Courier 10 Pitch">Hi guys.<br>
      I do:<br>
      -&gt; $ monit procmatch "^/usr/bin/conmon(.*?)-n freeipa.mine.priv
      "<br>
      List of processes matching pattern "^/usr/bin/conmon(.*?)-n
      freeipa.mine.priv ":<br>
      Total matches: 0<br>
      <br>
      yet I have a monit file like:<br>
      <br>
      &nbsp; check process freeipa.mine.priv.container with matching
      "^/usr/bin/conmon(.*?)-n freeipa.mine.priv "<br>
      &nbsp;&nbsp;&nbsp; start program =3D "/usr/bin/podman start =
freeipa.mine.priv" with
      timeout 30 seconds<br>
      &nbsp;&nbsp;&nbsp; stop program&nbsp; =3D "/usr/bin/podman stop =
freeipa.mine.priv" with
      timeout 30 seconds<br>
      &nbsp;&nbsp;&nbsp; if 3 restarts within 5 cycles then alert<br>
      &nbsp;&nbsp;&nbsp; if 3 restarts within 5 cycles then timeout<br>
      <br>
      and monit thinks, say:<br>
      <br>
      -&gt; $ monit status freeipa.mine.priv.container<br>
      Monit 5.33.0 uptime: 4d 6h 18m<br>
      <br>
      Process 'freeipa.mine.priv.container'<br>
      &nbsp; =
status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OK<br>
      &nbsp; monitoring =
status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Monitored<br>
      &nbsp; monitoring =
mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; active<br>
      &nbsp; on =
reboot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start<br>
      &nbsp; =
pid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; 3617222<br>
      <br>
      What is going on there? 'Pid' above, is of another container's of
      name 'freeipa.mine.priv.c9s'<br>
      If @devel reads this - a bug?<br>
      many thanks, L.<br>
    </font>
  </div>

</div></blockquote></div><br></div></body></html>=

--Apple-Mail=_48033324-13E9-40EF-B887-B96F61FAD28F--