Skip to content

Commit

Permalink
net-mgmt/check_mk_agent: Update to 2.1.0p22
Browse files Browse the repository at this point in the history
PR:		269925
Reported by:	ivalentine@arizona.edu (maintainer)
  • Loading branch information
robotski authored and Fernando Apesteguía committed Mar 19, 2023
1 parent 1d1c5c6 commit 9abc07b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 42 deletions.
7 changes: 2 additions & 5 deletions net-mgmt/check_mk_agent/Makefile
@@ -1,6 +1,6 @@
PORTNAME= check_mk_agent
DISTVERSIONPREFIX= v
DISTVERSION= 2.0.0p20
DISTVERSION= 2.1.0p22
CATEGORIES= net-mgmt
MASTER_SITES= https://raw.githubusercontent.com/tribe29/checkmk/${DISTVERSIONFULL}/agents/:agent \
https://raw.githubusercontent.com/tribe29/checkmk/${DISTVERSIONFULL}/doc/agents/:doc \
Expand All @@ -11,7 +11,7 @@ DISTFILES= ${_CHECKMK_AGENT}:agent \
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}

MAINTAINER= ivalentine@arizona.edu
COMMENT= Nagios-compatible agent for the Checkmk monitoring
COMMENT= Checkmk agent to monitor *nix style systems
WWW= https://checkmk.com/

LICENSE= GPLv2
Expand Down Expand Up @@ -46,15 +46,12 @@ OPTIONS_DEFINE= DOCS
_CHECKMK_AGENT= ${PORTNAME}.freebsd
_CHECKMK_CONFDIR= ${LOCALBASE}/etc/check_mk
_CHECKMK_LIBDIR= ${LOCALBASE}/lib/check_mk_agent
_CHECKMK_TMPDIR= /var/run/check_mk

post-patch:
@${REINPLACE_CMD} \
-e 's|%%CHECKMK_LIBDIR%%|${_CHECKMK_LIBDIR}|' \
-e 's|%%CHECKMK_CONFDIR%%|${_CHECKMK_CONFDIR}|' \
-e 's|%%CHECKMK_TMPDIR%%|${_CHECKMK_TMPDIR}|' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-e 's|%%BASH%%|${LOCALBASE}/bin/bash|' \
${WRKSRC}/${_CHECKMK_AGENT}

do-install:
Expand Down
14 changes: 7 additions & 7 deletions net-mgmt/check_mk_agent/distinfo
@@ -1,7 +1,7 @@
TIMESTAMP = 1645394456
SHA256 (check_mk_agent-2.0.0.p20/check_mk_agent.freebsd) = 8a332e0f73533ffacf03a5cab2e42a4ff76e104777c8fe548a41618097661536
SIZE (check_mk_agent-2.0.0.p20/check_mk_agent.freebsd) = 14350
SHA256 (check_mk_agent-2.0.0.p20/README.FreeBSD) = 01094a2197ca0a3a43ac16098c0f800d2ee808db2fd9a2f133f4bad04062ec5f
SIZE (check_mk_agent-2.0.0.p20/README.FreeBSD) = 1349
SHA256 (check_mk_agent-2.0.0.p20/COPYING) = fbaab079995bef694ef8451f0f763b91b44e5b57b8e2a487d2a240b395187a7f
SIZE (check_mk_agent-2.0.0.p20/COPYING) = 15174
TIMESTAMP = 1677107456
SHA256 (check_mk_agent-2.1.0.p22/check_mk_agent.freebsd) = c99b59beb8d0eee0916e8dc4b7f9dcce08afb62e157856e785837aadb0f071ec
SIZE (check_mk_agent-2.1.0.p22/check_mk_agent.freebsd) = 28094
SHA256 (check_mk_agent-2.1.0.p22/README.FreeBSD) = 01094a2197ca0a3a43ac16098c0f800d2ee808db2fd9a2f133f4bad04062ec5f
SIZE (check_mk_agent-2.1.0.p22/README.FreeBSD) = 1349
SHA256 (check_mk_agent-2.1.0.p22/COPYING) = fbaab079995bef694ef8451f0f763b91b44e5b57b8e2a487d2a240b395187a7f
SIZE (check_mk_agent-2.1.0.p22/COPYING) = 15174
47 changes: 20 additions & 27 deletions net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd
@@ -1,31 +1,24 @@
--- check_mk_agent.freebsd.orig 2021-10-31 19:22:57 UTC
--- check_mk_agent.freebsd.orig 2023-02-22 23:45:20 UTC
+++ check_mk_agent.freebsd
@@ -27,15 +27,15 @@ $MK_RUN_SYNC_PARTS || {
export LC_ALL=C
unset LANG
@@ -105,8 +105,8 @@ set_up_get_epoch() {
#

-export MK_LIBDIR="/usr/local/lib/check_mk_agent"
-export MK_CONFDIR="/etc/check_mk"
-export MK_TMPDIR="/var/run/check_mk"
+export MK_LIBDIR="%%CHECKMK_LIBDIR%%"
+export MK_CONFDIR="%%CHECKMK_CONFDIR%%"
+export MK_TMPDIR="%%CHECKMK_TMPDIR%%"
set_variable_defaults() {
- : "${MK_LIBDIR:=/usr/local/lib/check_mk_agent}"
- : "${MK_CONFDIR:=/etc/check_mk}"
+ : "${MK_LIBDIR:=%%CHECKMK_LIBDIR%%}"
+ : "${MK_CONFDIR:=%%CHECKMK_CONFDIR%%}"
: "${MK_VARDIR:=/var/lib/check_mk_agent}"
: "${MK_LOGDIR:=/var/log/check_mk_agent}"

# Optionally set a tempdir for all subsequent calls
#export TMPDIR=

# Make sure, locally installed binaries are found
-PATH=$PATH:/usr/local/bin:/usr/local/sbin
+PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
[ -d /var/qmail/bin ] && PATH=$PATH:/var/qmail/bin

# All executables in PLUGINSDIR will simply be executed and their
@@ -102,7 +102,7 @@ function run_cached() {

# Cache file outdated and new job not yet running? Start it
if [ -z "$USE_CACHEFILE" -a ! -e "$CACHEFILE.new" ] ; then
- echo "$CMDLINE" | daemon /usr/local/bin/bash -o noclobber > $CACHEFILE.new && mv $CACHEFILE.new $CACHEFILE || rm -f $CACHEFILE $CACHEFILE.new &
+ echo "$CMDLINE" | daemon %%BASH%% -o noclobber > $CACHEFILE.new && mv $CACHEFILE.new $CACHEFILE || rm -f $CACHEFILE $CACHEFILE.new &
fi
}
@@ -126,8 +126,8 @@ preamble_1() {
# Make sure locally installed binaries are found
# Only add binaries if they are not already in the path! If you append to path in a loop the process will
# eventually each the 128k size limit for the environment and become a zombie process. See execve manpage.
- [ "${PATH#*"/usr/local/bin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/bin"
- [ "${PATH#*"/usr/local/sbin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/sbin"
+ [ "${PATH#*"%%LOCALBASE%%/bin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/bin"
+ [ "${PATH#*"%%LOCALBASE%%/sbin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/sbin"
[ -d "/var/qmail/bin" ] && { [ "${PATH#*"/var/qmail/bin"}" != "${PATH}" ] || PATH="${PATH}:/var/qmail/bin"; }

# All executables in PLUGINSDIR will simply be executed and their
19 changes: 16 additions & 3 deletions net-mgmt/check_mk_agent/pkg-descr
@@ -1,3 +1,16 @@
Checkmk is a software for effective IT monitoring. Easy installation,
best-in-class scalability and a broad range of features are just some of the
reasons why more and more users become Checkmk fans.
For a monitoring system to receive more information from an endpoint
other than that it is simply accessible, help is required from the
target system. For example - how else can Checkmk know how full a
server's storage volume is without that system somehow providing the
information? The component that provides this information is always an
active piece of software - namely a monitoring agent, usually just
referred to as an agent. An agent collects data relevant to monitoring
from a host at specified intervals and transmits that data to the
monitoring server.

For servers and workstations, Checkmk provides its own agents, these
are known as Checkmk agents. Checkmk agents are available for a wide
variety of operating systems - from the commonplace such as Windows and
Linux to exotics such as OpenVMS. The agents are passive and listen on
TCP port 6556. Only on receiving a Checkmk server query will these
agents be activated and respond with the required data.

0 comments on commit 9abc07b

Please sign in to comment.