From nobody Tue Dec 17 00:58:56 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YBz344Y7rz5gp2V; Tue, 17 Dec 2024 00:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YBz34142Fz4P7r; Tue, 17 Dec 2024 00:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734397136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVFktoAXHAlsrY5/PRRmQBIKTQWU5hp3x+TAJkEuBuI=; b=pL2b1S+AMs2xqCbzPduCduloD4bbd5oVuS6nobwLw8D2rWSi3odQAtvesBuoWduWRk9vtb V0dzvcQNECR6Xc63aqmNtRS9XzCLuaNQklEbGW/zXFwGqnBSXPjgIpfu27DhOL7GCPD8Y/ 5VdbjXD/+Kjy8zOhjCI3Ku2fhletaY8J8rSh1tgwbes5JsOMH2C3PxKOWiCJdxYEkG5ok5 z+fuIPAhhpzL48Bn7e4nzCbJngr1xNy11zNghjFc4PbbOFsTwR2x5JS8tqB1owBG4gv0us F4UHh2lsvnMNOsOKlCGYxgoMby2Uei8Cl8BHR/qZcdCJacgfVGbJoNPQUn1nTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734397136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVFktoAXHAlsrY5/PRRmQBIKTQWU5hp3x+TAJkEuBuI=; b=BOTtrE0dgWEvq6mIcwPK5/ZequCPQJ9Ottov0BZU3vWpA+jbQMJvUTxGC0qldpVEAOXmww gjiqHLp5Y65Ssd8G7EGNwhxjQvxHeIt5ebrBM4JmofDCU0+cGkuFWzeh7O4qRz9sy4qsXd Fzq7yLF6i8WMqgyYJsy/VF306Wan29vbvO3Dw0twtWqxJyrCQJsaj2TKRIazhRw/gudSQr PW1m9IvaKpcC2x/M2KjBiEtDrQ7Hiy17rNOxnq2qFFmuZyJp8a61WNtZLkCkZabDs3W1XK BYgpAYEuzp6M72ycc6hQP3TF+vHiRlQtS+mNsw7hOfDulaNtCztSmMjRLLDr7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734397136; a=rsa-sha256; cv=none; b=cyjSt8m9wJGonK0f56stfPey+7TVBUomT+Kgc3nV5L/TW3/iVVg1KUe50usiLDyZPTu4II KVNUirf61XJcVSTgs99QsJhzVy/millJwaDG4FgCh9UruuNqTbRM74TSwBlE7mO4ll1wlF bf8OWN14zVm16zJvi/5lFKQnRC9kdsAaaRqt+HwQL8kqp24MwEgx3nqr/bVIYf4R5BgibP chze4FgIX04aFgyIvKtuNKql7wOZqFFWQkbjqImuVIqsm6L30TA8vwjNArb12tI6MTBaRz a2ny/LXEekSuE9T9hMqXyipYhncqlOKOQ7lUx6zyiiiIn+Oxvhk0qH7z7OeWuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YBz340f4rz1FwS; Tue, 17 Dec 2024 00:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BH0wu8u094705; Tue, 17 Dec 2024 00:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BH0wukA094702; Tue, 17 Dec 2024 00:58:56 GMT (envelope-from git) Date: Tue, 17 Dec 2024 00:58:56 GMT Message-Id: <202412170058.4BH0wukA094702@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 9f44d73b21ed - main - net-mgmt/check_wg: Icinga2 health check of wireguard peers, using output of wg(8) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f44d73b21edeaa1a2e0ce304eece2b3031d7f96 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f44d73b21edeaa1a2e0ce304eece2b3031d7f96 commit 9f44d73b21edeaa1a2e0ce304eece2b3031d7f96 Author: Denis Shaposhnikov AuthorDate: 2024-12-11 15:11:53 +0000 Commit: Robert Clausecker CommitDate: 2024-12-17 00:31:50 +0000 net-mgmt/check_wg: Icinga2 health check of wireguard peers, using output of wg(8) Icinga2 health check of wireguard peers, using output of wg(8). It analizes latest handshake of every peer and outputs warning or critical status if any of them is greater of given threshold. WWW: https://github.com/dsh2dsh/check_wg --- net-mgmt/Makefile | 1 + net-mgmt/check_wg/Makefile | 25 +++++++++++++++++++++++++ net-mgmt/check_wg/distinfo | 5 +++++ net-mgmt/check_wg/pkg-descr | 4 ++++ 4 files changed, 35 insertions(+) diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 469fd6856a06..51cec1776dd7 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -43,6 +43,7 @@ SUBDIR += check_nwc_health SUBDIR += check_ssl_cert SUBDIR += check_ups_health + SUBDIR += check_wg SUBDIR += chillispot SUBDIR += choparp SUBDIR += cidr diff --git a/net-mgmt/check_wg/Makefile b/net-mgmt/check_wg/Makefile new file mode 100644 index 000000000000..92ff975a4dda --- /dev/null +++ b/net-mgmt/check_wg/Makefile @@ -0,0 +1,25 @@ +PORTNAME= check_wg +DISTVERSIONPREFIX= v +DISTVERSION= 0.0.7 +CATEGORIES= net-mgmt + +MAINTAINER= dsh@bamus.cz +COMMENT= Icinga2 health check of wireguard peers, using output of wg(8) +WWW= https://github.com/dsh2dsh/${PORTNAME} + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:1.22,modules + +GO_MODULE= github.com/dsh2dsh/${PORTNAME} +GO_BUILDFLAGS= -ldflags="${STRIP} -w -X ${GO_MODULE}/main.version=${DISTVERSIONFULL}" + +PLIST_FILES= libexec/nagios/${PORTNAME} + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios + ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/libexec/nagios/ + +.include diff --git a/net-mgmt/check_wg/distinfo b/net-mgmt/check_wg/distinfo new file mode 100644 index 000000000000..ad28467f8c81 --- /dev/null +++ b/net-mgmt/check_wg/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1716219169 +SHA256 (go/net-mgmt_check_wg/check_wg-v0.0.7/v0.0.7.mod) = 70bf440bb65daba36df9cf87cb3314523bb0435053cd72ff796b932cd3790809 +SIZE (go/net-mgmt_check_wg/check_wg-v0.0.7/v0.0.7.mod) = 423 +SHA256 (go/net-mgmt_check_wg/check_wg-v0.0.7/v0.0.7.zip) = f4f19a8cc0090d92323a4ebeb6ded085f7d1614e18f6ab1f7d67db0b41a0d2ee +SIZE (go/net-mgmt_check_wg/check_wg-v0.0.7/v0.0.7.zip) = 18637 diff --git a/net-mgmt/check_wg/pkg-descr b/net-mgmt/check_wg/pkg-descr new file mode 100644 index 000000000000..c60d1297c715 --- /dev/null +++ b/net-mgmt/check_wg/pkg-descr @@ -0,0 +1,4 @@ +Icinga2 health check of wireguard peers, using output of wg(8). + +It analizes latest handshake of every peer and outputs warning or critical +status if any of them is greater of given threshold.