Import check_mk_agent from ports
This commit is contained in:
70
ports-mgmt/check_mk_agent/Makefile
Normal file
70
ports-mgmt/check_mk_agent/Makefile
Normal file
@ -0,0 +1,70 @@
|
||||
PORTNAME= check_mk_agent
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.3.0p12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= https://raw.githubusercontent.com/Checkmk/checkmk/${DISTVERSIONFULL}/agents/:agent \
|
||||
https://raw.githubusercontent.com/Checkmk/checkmk/${DISTVERSIONFULL}/doc/agents/:doc \
|
||||
https://raw.githubusercontent.com/Checkmk/checkmk/${DISTVERSIONFULL}/:license
|
||||
DISTFILES= ${_CHECKMK_AGENT}:agent \
|
||||
README.FreeBSD:doc \
|
||||
COPYING:license
|
||||
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ivalentine@arizona.edu
|
||||
COMMENT= Checkmk agent to monitor *nix style systems
|
||||
WWW= https://checkmk.com/
|
||||
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
RUN_DEPENDS= bash:shells/bash \
|
||||
ipmitool:sysutils/ipmitool \
|
||||
statgrab:devel/libstatgrab \
|
||||
wget:ftp/wget
|
||||
|
||||
USES= perl5 python:3.4+ shebangfix
|
||||
USE_PERL5= run
|
||||
|
||||
SHEBANG_FILES= ${_CHECKMK_AGENT}
|
||||
|
||||
EXTRACT_CMD= ${CP}
|
||||
EXTRACT_BEFORE_ARGS= # none
|
||||
EXTRACT_AFTER_ARGS= ${WRKSRC}
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
NO_TEST= yes
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= PORTNAME=${PORTNAME}
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
|
||||
PORTDOCS= README.FreeBSD
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
_CHECKMK_AGENT= ${PORTNAME}.freebsd
|
||||
_CHECKMK_LIBDIR= ${PREFIX}/lib/check_mk_agent
|
||||
_CHECKMK_CONFDIR= ${PREFIX}/etc/check_mk
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's|%%CHECKMK_LIBDIR%%|${_CHECKMK_LIBDIR}|' \
|
||||
-e 's|%%CHECKMK_CONFDIR%%|${_CHECKMK_CONFDIR}|' \
|
||||
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||
${WRKSRC}/${_CHECKMK_AGENT}
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/${_CHECKMK_AGENT} \
|
||||
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.FreeBSD \
|
||||
${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
7
ports-mgmt/check_mk_agent/distinfo
Normal file
7
ports-mgmt/check_mk_agent/distinfo
Normal file
@ -0,0 +1,7 @@
|
||||
TIMESTAMP = 1723755628
|
||||
SHA256 (check_mk_agent-2.3.0.p12/check_mk_agent.freebsd) = e90757599339de56cab8f5059a1006d20f6bdfe9cb5cfd8460b95deee8039ffd
|
||||
SIZE (check_mk_agent-2.3.0.p12/check_mk_agent.freebsd) = 32404
|
||||
SHA256 (check_mk_agent-2.3.0.p12/README.FreeBSD) = 01094a2197ca0a3a43ac16098c0f800d2ee808db2fd9a2f133f4bad04062ec5f
|
||||
SIZE (check_mk_agent-2.3.0.p12/README.FreeBSD) = 1349
|
||||
SHA256 (check_mk_agent-2.3.0.p12/COPYING) = fbaab079995bef694ef8451f0f763b91b44e5b57b8e2a487d2a240b395187a7f
|
||||
SIZE (check_mk_agent-2.3.0.p12/COPYING) = 15174
|
||||
@ -0,0 +1,26 @@
|
||||
--- check_mk_agent.freebsd.orig 2024-08-15 18:32:18 UTC
|
||||
+++ check_mk_agent.freebsd
|
||||
@@ -117,9 +117,9 @@ set_variable_defaults() {
|
||||
#
|
||||
|
||||
set_variable_defaults() {
|
||||
- : "${MK_LIBDIR:=/usr/local/lib/check_mk_agent}"
|
||||
- : "${MK_CONFDIR:=/etc/check_mk}"
|
||||
- : "${MK_VARDIR:=/var/lib/check_mk_agent}"
|
||||
+ : "${MK_LIBDIR:=%%CHECKMK_LIBDIR%%}"
|
||||
+ : "${MK_CONFDIR:=%%CHECKMK_CONFDIR%%}"
|
||||
+ : "${MK_VARDIR:=/var/db/check_mk_agent}"
|
||||
: "${MK_LOGDIR:=/var/log/check_mk_agent}"
|
||||
|
||||
# some 'booleans'
|
||||
@@ -138,8 +138,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
|
||||
16
ports-mgmt/check_mk_agent/files/pkg-message.in
Normal file
16
ports-mgmt/check_mk_agent/files/pkg-message.in
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Checkmk may collect additional data if the following ports are installed:
|
||||
- sysutils/megacli
|
||||
- mail/postfix
|
||||
- mail/qmail
|
||||
|
||||
See the code of the agent (%%PREFIX%%/bin/%%PORTNAME%%) for details.
|
||||
|
||||
Configuration instructions may be found in one of the following places:
|
||||
- %%DOCSDIR%%/README.FreeBSD
|
||||
- https://docs.checkmk.com/latest/en/agent_freebsd.html
|
||||
EOM
|
||||
}
|
||||
]
|
||||
16
ports-mgmt/check_mk_agent/pkg-descr
Normal file
16
ports-mgmt/check_mk_agent/pkg-descr
Normal file
@ -0,0 +1,16 @@
|
||||
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.
|
||||
Reference in New Issue
Block a user