Re: Neither success nor failure?
M/Monit Support <[email protected]> Mon, 24 Mar 2025 12:01:48 +0100
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_76E3EF67-6C34-4C3A-BF0A-84CF023BF612 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The upcoming release (monit 5.35.0) eliminates the delay in the process = check, which may help to simplify the configuration a bit :)=20 Best regards, The Monit team > On 24. 3. 2025, at 0:59, Steven Christensen <[email protected]> wrote: >=20 > Following up on this for closure, I ended up doing something which = included dependencies. >=20 > 1) Created a check for the DNS lookup, with a noalert. It simply = succeeds or fails on whether the DNS lookup works. > 2) Created the actual checking procedure, which has a "depends" on #1. >=20 > I had to add a "for 3 cycles" on #2 because it looks like Monit = doesn't actually execute the process checks in an order based on depends = statements. Also, there looks to be a one check lag between the actual = results and what Monit reports. So the number 3 allowed me to = effectively "pause" the checks for #2 based on whether the DNS was = working. >=20 > Thanks for all the help! >=20 > On Thu, Mar 13, 2025 at 3:08=E2=80=AFAM Tino Hendricks via This is the = general mailing list for monit <[email protected] = <mailto:[email protected]>> wrote: >> Hi Steven, >>=20 >> the only thing coming to my mind if you can=E2=80=99t handle this in = the script you=E2=80=99re using is >>=20 >> = https://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDENCIES >>=20 >> Like, depending on a test for working DNS.=20 >>=20 >> Cheers! >>=20 >> Tino >>=20 >>> Am 13.03.2025 um 05:23 schrieb Steven Christensen <[email protected] = <mailto:[email protected]>>: >>>=20 >>> =EF=BB=BF >>> Hi All, I have a use case I am not sure Monit can handle. I looked = at the document and tried keywords in this mailing list, but nothing = came up. >>>=20 >>> I have a script which checks another node for some information, and = then reports success or failure (via exit code).The script works fine in = Monit. >>>=20 >>> But due to some dodgy DNS service, sometimes when the script tries = to get information from the other node, the DNS lookup fails. So we = don't know whether the information would have resulted in a success or = failure, to report to Monit.=20 >>>=20 >>> My question: Is there a way to tell Monit during that script check = interval that the results of the check are indeterminate, that it should = maintain the previous success/failure state until it the next time it is = able to definitively report a true or false status? >>>=20 >>> Thanks! >>>=20 --Apple-Mail=_76E3EF67-6C34-4C3A-BF0A-84CF023BF612 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;"><div><p = style=3D"margin: 0px; font-stretch: 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;">The upcoming release (monit 5.35.0) = eliminates the delay in the process check, which may help to simplify = the configuration a bit :) </p><p style=3D"margin: 0px; = font-stretch: 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 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 = Monit team<br></div></div> </div> <div><br><blockquote type=3D"cite"><div>On 24. 3. 2025, at 0:59, Steven = Christensen <[email protected]> wrote:</div><br = class=3D"Apple-interchange-newline"><div><div dir=3D"ltr">Following up = on this for closure, I ended up doing something which included = dependencies.<div><br></div><div>1) Created a check for the DNS lookup, = with a noalert. It simply succeeds or fails on whether the DNS lookup = works.</div><div>2) Created the actual checking procedure, which has a = "depends" on #1.</div><div><br></div><div>I had to add a "for 3 cycles" = on #2 because it looks like Monit doesn't actually execute the process = checks in an order based on depends statements. Also, there looks to be = a one check lag between the actual results and what Monit reports. So = the number 3 allowed me to effectively "pause" the checks for #2 based = on whether the DNS was working.</div><div><br></div><div>Thanks for all = the help!</div></div><br><div class=3D"gmail_quote = gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Mar = 13, 2025 at 3:08=E2=80=AFAM Tino Hendricks via This is the general = mailing list for monit <<a = href=3D"mailto:[email protected]">[email protected]</a>> = wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px = 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div = dir=3D"ltr"></div><div dir=3D"ltr">Hi Steven,</div><div = dir=3D"ltr"><br></div><div dir=3D"ltr">the only thing coming to my mind = if you can=E2=80=99t handle this in the script you=E2=80=99re using = is</div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><a = href=3D"https://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDEN= CIES" = target=3D"_blank">https://mmonit.com/monit/documentation/monit.html#SERVIC= E-DEPENDENCIES</a></div><div dir=3D"ltr"><br></div><div dir=3D"ltr">Like, = depending on a test for working DNS. </div><div = dir=3D"ltr"><br></div><div dir=3D"ltr">Cheers!</div><div = dir=3D"ltr"><br></div><div dir=3D"ltr">Tino</div><div = dir=3D"ltr"><br><blockquote type=3D"cite">Am 13.03.2025 um 05:23 schrieb = Steven Christensen <<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>>:<br><br></blockquote></div><block= quote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div dir=3D"ltr">Hi All, I = have a use case I am not sure Monit can handle. I looked at the document = and tried keywords in this mailing list, but nothing came = up.<div><br></div><div>I have a script which checks another node for = some information, and then reports success or failure (via exit = code).The script works fine in Monit.</div><div><br></div><div>But due = to some dodgy DNS service, sometimes when the script tries to get = information from the other node, the DNS lookup fails. So we don't know = whether the information would have resulted in a success or = failure, to report to Monit. </div><div><br></div><div>My = question: Is there a way to tell Monit during that script check interval = that the results of the check are indeterminate, that it should maintain = the previous success/failure state until it the next time it is able to = definitively report a true or false = status?</div><div><br></div><div>Thanks!</div><div><br></div></div> </div></blockquote></div></blockquote></div> </div></blockquote></div><br></body></html>= --Apple-Mail=_76E3EF67-6C34-4C3A-BF0A-84CF023BF612--