From owner-freebsd-questions@freebsd.org Fri Oct 2 11:51:38 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 464CA42A439 for ; Fri, 2 Oct 2020 11:51:38 +0000 (UTC) (envelope-from jerry@seibercom.net) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2pHY2Z6Cz40YY for ; Fri, 2 Oct 2020 11:51:36 +0000 (UTC) (envelope-from jerry@seibercom.net) Received: by mail-qv1-xf33.google.com with SMTP id z18so586778qvp.6 for ; Fri, 02 Oct 2020 04:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seibercom.net; s=google; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :organization:mime-version; bh=bm+bVL4/J9aS95Lv3MJOhDg4RivSCnY0woF4VBuHs38=; b=LdnKkzjY9QO5UaUEnYOgw3d/OWoVlIBKlSTrTIzOdCkdRI7fjO/uqtD/TQFFYGagOb +RsoovA5xieCDK1VerVfHY9+OkPvcp1xQq+lA/wS0y4x9ILjVTXX2I3+tWYnH25i5Qx9 /uUDBBykqBZbTh2sIQcEUrKhXzHXzgKqpaV0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:reply-to:organization:mime-version; bh=bm+bVL4/J9aS95Lv3MJOhDg4RivSCnY0woF4VBuHs38=; b=f1XKoSzi92VyVpLSXtD62amXohTu30CQRm+gCV3WiLh2RKZusP5wkZRjHGsnyQRGsl eX0FxV8pFGSVuRuuZJGqW5toAYxd4rm1uA3PI2cGJBf3OfmTPGhZa9mkOLipPvS8uqZg j95yEkXGpk6Be3W0yhWQpABcB07cchyumjnsHLBJBmRrFZ9C5nhYJgZhNEa28LnFURyg wZ28PCXunjAN6jGHi9hyJO/wU4twCV+udfTk5wQkC53d7wZZcukoe0IjJrK9Q3lMixHH hBYZI3A9bCIr1/cYx3uZhp2FHGH33l0ei6RuCBKf+VfSA1R2J1Lvj5MKUYKDKkTLDmx9 FVHA== X-Gm-Message-State: AOAM532eqK4lTnPFiJTGmWfe3DntmR/3vlS5zo2EOptmtNtDCMpgeYnd R9YDeJIX3S8R+odYRQvIBlw9Lrp1H4cl9g== X-Google-Smtp-Source: ABdhPJxWrHoZeHf/s0LadD9QJzeysx62KrNQGar94PuiPMzcswFDLWU0RwepugK4epmTaal/EFIPug== X-Received: by 2002:a05:6214:945:: with SMTP id dn5mr1792902qvb.56.1601639495464; Fri, 02 Oct 2020 04:51:35 -0700 (PDT) Received: from scorpio.seibercom.net (cpe-174-109-231-236.nc.res.rr.com. [174.109.231.236]) by smtp.gmail.com with ESMTPSA id 18sm868283qkd.120.2020.10.02.04.51.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 04:51:34 -0700 (PDT) Received: from localhost (hp-envy.seibercom.net [192.168.1.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jerry@seibercom.net) by scorpio.seibercom.net (Postfix) with ESMTPSA id 4C2pHT1qSpz1llH for ; Fri, 2 Oct 2020 07:51:33 -0400 (EDT) Date: Fri, 2 Oct 2020 07:51:25 -0400 From: Jerry To: freebsd-questions@freebsd.org Subject: Re: Monitor an app Message-ID: <20201002075125.000001d6@seibercom.net> In-Reply-To: <65C3BE67-3389-4F8E-9975-7EC0714FB056@kreme.com> References: <65C3BE67-3389-4F8E-9975-7EC0714FB056@kreme.com> Reply-To: freebsd-questions@freebsd.org Organization: seibercom.net X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/0PutGeaxAl4mWQWSrHwqZh8"; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4C2pHY2Z6Cz40YY X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=seibercom.net header.s=google header.b=LdnKkzjY; dmarc=none; spf=pass (mx1.freebsd.org: domain of jerry@seibercom.net designates 2607:f8b0:4864:20::f33 as permitted sender) smtp.mailfrom=jerry@seibercom.net X-Spamd-Result: default: False [2.27 / 15.00]; HAS_REPLYTO(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[seibercom.net:+]; NEURAL_HAM_SHORT(-0.15)[-0.148]; RECEIVED_SPAMHAUS_PBL(0.00)[174.109.231.236:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; REPLYTO_EQ_TO_ADDR(5.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.018]; R_DKIM_ALLOW(-0.20)[seibercom.net:s=google]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.961]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[seibercom.net]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f33:from]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,meta]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 11:51:38 -0000 --Sig_/0PutGeaxAl4mWQWSrHwqZh8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 2 Oct 2020 04:59:59 -0600, @lbutlr commented: >Are there any tools that monitor apps or services and do sane things >to make sure that the series are running? > >Obviously, I can write a simple script that says something like "if >service status doesn't have a PID, then =E2=80=A6" but that's >simplistic and I don't want something that is simply going to restart >a failed service over and over every time it crashes. (But once or >twice when it crashes is good, with an escalation to maybe restart a >different series and a fall back from that to restart the machine=E2=80=A6= but >again, not restarting the machine a few seconds after boot because it >can't start the service.) > >I am not looking for something that says "hey, email is not working" >(I already have that but more subtly like "Hey, dovecot isn't running" >or "MySQL isn't running". > >Googling leads me to external monitoring of forward facing services >based on port scanning, I'm looking for something local to the machine. Have you considered "/sysutils/monit" or one of its cousins? It might do what you want. It an be configured to limit the number of times it will attempt to restart a program, and lots of other things too. --=20 Jerry --Sig_/0PutGeaxAl4mWQWSrHwqZh8 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIQb/tTwl6I1ueEVtOHMGOIfexWQFAl93FD4ACgkQOHMGOIfe xWRsmgf+M3oc14EkDQLWNh3CcqS8wjRki/3VyBMnCsbLNCh/CkV56/GggD5GZL4P cy+UKPZzmFEDzMb2UD/1GS1/P/3u8qj13YyQ31gw36oZmGANoKYgPFC0tITYDWaU IBsPPAEqgwyPJuenJ2ddQw/icoC2CQtc9LyFNQL9TnnwBQEJulflmHP6dDic1xwp 1In7PLoJICXYWCp7ptUhJbKtEHkUipwaad9Z808ZOE5GjjsTjuBAZ+Fpe6PPwnu+ ABVntpF01LBtt2m3wC0gDHrBNS1HFSkj66G0ohQFXlXFS62deOW8iNOSIvNR1739 mQiErWlzknxM0SI6FaQ/vD80RRyvwA== =Blqp -----END PGP SIGNATURE----- --Sig_/0PutGeaxAl4mWQWSrHwqZh8--