add the checkmk agent and config
This commit is contained in:
parent
916f394cdf
commit
05459a50e1
6 changed files with 2348 additions and 0 deletions
checkmk-agent
BIN
checkmk-agent/agent.tar.gz
Normal file
BIN
checkmk-agent/agent.tar.gz
Normal file
Binary file not shown.
26
checkmk-agent/default.nix
Normal file
26
checkmk-agent/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ stdenv, lib, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "checkmk-agent";
|
||||
src = ./agent.tar.gz;
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" "wrapPhase" ];
|
||||
buildInputs = [ ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m 0755 check_mk_agent.linux $out/bin/check_mk_agent
|
||||
substitute sshwrapper $out/bin/check_mk_agent.sshwrapper \
|
||||
--replace SUDOCOMMAND "$out/bin/check_mk_agent"
|
||||
chmod 0755 $out/bin/check_mk_agent.sshwrapper
|
||||
'';
|
||||
wrapPhase = ''
|
||||
wrapProgram $out/bin/check_mk_agent --suffix PATH : /run/current-system/sw/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "checkmk-agent";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
2294
checkmk-agent/files/check_mk_agent.linux
Normal file
2294
checkmk-agent/files/check_mk_agent.linux
Normal file
File diff suppressed because it is too large
Load diff
5
checkmk-agent/files/sshwrapper
Normal file
5
checkmk-agent/files/sshwrapper
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# The agent does not need stdin
|
||||
exec </dev/null
|
||||
exec sudo --non-interactive -- SUDOCOMMAND
|
Loading…
Add table
Add a link
Reference in a new issue