diff --git a/.etckeeper b/.etckeeper index 8aeba9d6..5e337d33 100755 --- a/.etckeeper +++ b/.etckeeper @@ -40,7 +40,6 @@ mkdir -p './ssl/private' mkdir -p './triggerhappy/triggers.d' mkdir -p './udev/hwdb.d' mkdir -p './usb_modeswitch.d' -mkdir -p './xinetd.d' maybe chmod 0755 '.' maybe chmod 0700 '.etckeeper' maybe chmod 0644 '.fstab' @@ -142,6 +141,8 @@ maybe chmod 0775 'check_mk' maybe chmod 0640 'check_mk/cmk-update-agent.cfg' maybe chmod 0640 'check_mk/docker.cfg' maybe chmod 0640 'check_mk/mk_inventory.cfg' +maybe chmod 0644 'check_mk/super-server.cfg' +maybe chmod 0644 'check_mk/xinetd-service-template.cfg' maybe chmod 0755 'cifs-utils' maybe chmod 0600 'cmk-update-agent.state' maybe chmod 0755 'console-setup' @@ -683,9 +684,6 @@ maybe chmod 0644 'systemd/sleep.conf' maybe chmod 0755 'systemd/system' maybe chmod 0644 'systemd/system.conf' maybe chmod 0755 'systemd/system/bluetooth.target.wants' -maybe chmod 0644 'systemd/system/check-mk-agent-async.service' -maybe chmod 0644 'systemd/system/check-mk-agent.socket' -maybe chmod 0644 'systemd/system/check-mk-agent@.service' maybe chmod 0755 'systemd/system/default.target.wants' maybe chmod 0755 'systemd/system/dev-serial1.device.wants' maybe chmod 0755 'systemd/system/dhcpcd.service.d' @@ -750,4 +748,3 @@ maybe chmod 0755 'xdg' maybe chmod 0755 'xdg/autostart' maybe chmod 0644 'xdg/autostart/at-spi-dbus-bus.desktop' maybe chmod 0755 'xdg/systemd' -maybe chmod 0775 'xinetd.d' diff --git a/check_mk/super-server.cfg b/check_mk/super-server.cfg new file mode 100644 index 00000000..f2ffa20a --- /dev/null +++ b/check_mk/super-server.cfg @@ -0,0 +1,5 @@ +# Created by Check_MK Agent Bakery. +# This file is managed via WATO, do not edit manually or you +# lose your changes next time when you update the agent. + +auto diff --git a/check_mk/xinetd-service-template.cfg b/check_mk/xinetd-service-template.cfg new file mode 100644 index 00000000..d9668916 --- /dev/null +++ b/check_mk/xinetd-service-template.cfg @@ -0,0 +1,44 @@ +# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2 +# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and +# conditions defined in the file COPYING, which is part of this source code package. + +# NOTE: +# For users of the Checkmk Agent Bakery, this file is manageged by the corresponding +# monitoring server. In that case, manual changes to this file will be lost upon +# an update of the check-mk-agent package. + +service check-mk-agent +{ + type = UNLISTED + port = 6556 + socket_type = stream + protocol = tcp + wait = no + user = root + + # If you use fully redundant monitoring and poll the client + # from more then one monitoring servers in parallel you might + # want to use the agent cache wrapper: + #server = /usr/bin/check_mk_caching_agent + server = /usr/bin/check_mk_agent + + # To avoid intentional or unintentional overload due to too many parallel + # queries from one source we set this parameter. It limits the number of + # concurrent connections per source address. If you need more requests + # per source system, you can of course increase or remove this value + # (https://github.com/tribe29/checkmk/pull/157) + per_source = 3 + + # listen on IPv4 AND IPv6 when available on this host + #flags = IPv6 + + # configure the IP address(es) of your Nagios server here: + #only_from = 127.0.0.1 10.0.20.1 10.0.20.2 + + # Don't be too verbose. Don't log every check. This might be + # commented out for debugging. If this option is commented out + # the default options will be used for this service. + log_on_success = + + disable = no +} diff --git a/cmk-update-agent.state b/cmk-update-agent.state index 724e4a0d..e465c27d 100644 --- a/cmk-update-agent.state +++ b/cmk-update-agent.state @@ -1 +1 @@ -{'host_secret': 'kwgdpsxglkabglrcselwgbxzgjdccindehyefyjejieztqoewmxmaenvqobhaovk', 'server': '192.168.0.99', 'site': 'realm', 'host_name': 'serviceraspi2.realm.local', 'protocol': 'http', 'user': 'caelebfi', 'last_check': 1653449677.5151227, 'installed_aghash': '62f22b645349caaa', 'last_update': 1652710558.1824903, 'last_error': None} +{'host_secret': 'kwgdpsxglkabglrcselwgbxzgjdccindehyefyjejieztqoewmxmaenvqobhaovk', 'server': '192.168.0.99', 'site': 'realm', 'host_name': 'serviceraspi2.realm.local', 'protocol': 'http', 'user': 'caelebfi', 'last_check': 1653496026.1491911, 'installed_aghash': '7cfb898f4c5e46d3', 'last_update': 1653466953.395605, 'last_error': None} diff --git a/systemd/system/check-mk-agent-async.service b/systemd/system/check-mk-agent-async.service deleted file mode 100644 index 2de4b171..00000000 --- a/systemd/system/check-mk-agent-async.service +++ /dev/null @@ -1,15 +0,0 @@ -# systemd service definition file -[Unit] -Description=Checkmk agent - Asynchronous background tasks -After=network.target - -[Service] -ExecStart=/usr/bin/check_mk_agent -Environment='MK_RUN_SYNC_PARTS=false' -Environment='MK_LOOP_INTERVAL=60' -Type=simple - -User=root - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/check-mk-agent.socket b/systemd/system/check-mk-agent.socket deleted file mode 100644 index 86290f70..00000000 --- a/systemd/system/check-mk-agent.socket +++ /dev/null @@ -1,11 +0,0 @@ -# systemd socket definition file -[Unit] -Description=Checkmk agent socket - -[Socket] -ListenStream=6556 -Accept=true -MaxConnectionsPerSource=3 - -[Install] -WantedBy=sockets.target diff --git a/systemd/system/check-mk-agent@.service b/systemd/system/check-mk-agent@.service deleted file mode 100644 index 02e05ebd..00000000 --- a/systemd/system/check-mk-agent@.service +++ /dev/null @@ -1,16 +0,0 @@ -# systemd service definition file -[Unit] -Description=Checkmk agent - -[Service] -# "-" path prefix makes systemd record the exit code, -# but the unit is not set to failed. -ExecStart=-/usr/bin/check_mk_agent -# this can fail if agent updater is being run by the async service at the same time -ExecStopPost=-/usr/bin/cmk-install-agent -Environment='MK_RUN_ASYNC_PARTS=false' -Type=oneshot - -User=root - -StandardInput=socket diff --git a/systemd/system/multi-user.target.wants/check-mk-agent-async.service b/systemd/system/multi-user.target.wants/check-mk-agent-async.service index 5fd71bcb..f6778f96 120000 --- a/systemd/system/multi-user.target.wants/check-mk-agent-async.service +++ b/systemd/system/multi-user.target.wants/check-mk-agent-async.service @@ -1 +1 @@ -/etc/systemd/system/check-mk-agent-async.service \ No newline at end of file +/lib/systemd/system/check-mk-agent-async.service \ No newline at end of file diff --git a/systemd/system/sockets.target.wants/check-mk-agent.socket b/systemd/system/sockets.target.wants/check-mk-agent.socket index ab7abbd1..0a38e3d9 120000 --- a/systemd/system/sockets.target.wants/check-mk-agent.socket +++ b/systemd/system/sockets.target.wants/check-mk-agent.socket @@ -1 +1 @@ -/etc/systemd/system/check-mk-agent.socket \ No newline at end of file +/lib/systemd/system/check-mk-agent.socket \ No newline at end of file diff --git a/systemd/system/timers.target.wants/cmk-update-agent.timer b/systemd/system/timers.target.wants/cmk-update-agent.timer new file mode 120000 index 00000000..d89e8b69 --- /dev/null +++ b/systemd/system/timers.target.wants/cmk-update-agent.timer @@ -0,0 +1 @@ +/lib/systemd/system/cmk-update-agent.timer \ No newline at end of file