diff --git a/.etckeeper b/.etckeeper index 4fe9e03a..de72d284 100755 --- a/.etckeeper +++ b/.etckeeper @@ -69,7 +69,6 @@ mkdir -p './systemd/user' mkdir -p './udev/hwdb.d' mkdir -p './udev/rules.d' mkdir -p './wireguard' -mkdir -p './xinetd.d' maybe chmod 0755 '.' maybe chmod 0700 '.etckeeper' maybe chmod 0600 '.gitignore' @@ -398,10 +397,13 @@ maybe chmod 0644 'calendar/default' maybe chmod 0770 'check_mk' maybe chmod 0640 'check_mk/logwatch.cfg' maybe chmod 0640 'check_mk/mk_inventory.cfg' +maybe chmod 0640 'check_mk/mk_mongodb.cfg' maybe chmod 0640 'check_mk/mk_redis.cfg' maybe chmod 0640 'check_mk/mysql.cfg' maybe chmod 0644 'check_mk/mysql.local.cfg' maybe chmod 0640 'check_mk/nginx_status.cfg' +maybe chmod 0644 'check_mk/super-server.cfg' +maybe chmod 0644 'check_mk/xinetd-service-template.cfg' maybe chmod 0644 'checkinstallrc' maybe chmod 0644 'chkrootkit.conf' maybe chmod 0755 'clamav' @@ -4700,9 +4702,6 @@ maybe chmod 0644 'systemd/resolved.conf' maybe chmod 0755 'systemd/system' maybe chmod 0644 'systemd/system.conf' maybe chmod 0644 'systemd/system/amavisd-milter.service' -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/clamav-daemon.service.d' maybe chmod 0644 'systemd/system/clamav-daemon.service.d/extend.conf' maybe chmod 0755 'systemd/system/clamav-daemon.socket.d' @@ -4761,4 +4760,3 @@ maybe chmod 0644 'wgetrc' maybe chmod 0700 'wireguard' maybe chmod 0755 'xdg' maybe chmod 0755 'xdg/systemd' -maybe chmod 0770 'xinetd.d' diff --git a/check_mk/mk_mongodb.cfg b/check_mk/mk_mongodb.cfg new file mode 100644 index 00000000..fe3c15de --- /dev/null +++ b/check_mk/mk_mongodb.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. + +[MONGODB] 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/group b/group index 4e4769c6..6ff2d2c8 100644 --- a/group +++ b/group @@ -77,3 +77,4 @@ nginx:x:126: redis:x:127: mongodb:x:129: _rspamd:x:130: +cmk-agent:x:997: diff --git a/group- b/group- index 2ea579a8..4e4769c6 100644 --- a/group- +++ b/group- @@ -76,3 +76,4 @@ morty:x:998: nginx:x:126: redis:x:127: mongodb:x:129: +_rspamd:x:130: diff --git a/gshadow b/gshadow index 02868cf6..181cf372 100644 --- a/gshadow +++ b/gshadow @@ -77,3 +77,4 @@ nginx:!:: redis:!:: mongodb:!:: _rspamd:!:: +cmk-agent:!:: diff --git a/gshadow- b/gshadow- index f738f273..02868cf6 100644 --- a/gshadow- +++ b/gshadow- @@ -76,3 +76,4 @@ morty:!:: nginx:!:: redis:!:: mongodb:!:: +_rspamd:!:: diff --git a/passwd b/passwd index a775b0de..453bcd9b 100644 --- a/passwd +++ b/passwd @@ -49,3 +49,4 @@ nginx:x:118:126:nginx user,,,:/nonexistent:/bin/false redis:x:119:127::/var/lib/redis:/bin/false mongodb:x:122:129::/var/lib/mongodb:/bin/false _rspamd:x:123:130:rspamd spam filtering system,,,:/var/lib/rspamd:/bin/false +cmk-agent:x:997:997:Checkmk agent system user:/var/lib/cmk-agent:/bin/false diff --git a/passwd- b/passwd- index 6e61f9a8..a775b0de 100644 --- a/passwd- +++ b/passwd- @@ -48,4 +48,4 @@ morty:x:998:998:Privacy-respecting metasearch engine:/usr/local/morty:/bin/bash nginx:x:118:126:nginx user,,,:/nonexistent:/bin/false redis:x:119:127::/var/lib/redis:/bin/false mongodb:x:122:129::/var/lib/mongodb:/bin/false -_rspamd:x:123:130::/var/lib/rspamd:/bin/false +_rspamd:x:123:130:rspamd spam filtering system,,,:/var/lib/rspamd:/bin/false 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 90ab8692..00000000 --- a/systemd/system/check-mk-agent@.service +++ /dev/null @@ -1,14 +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 -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/multi-user.target.wants/cmk-agent-ctl-daemon.service b/systemd/system/multi-user.target.wants/cmk-agent-ctl-daemon.service new file mode 120000 index 00000000..52fc1846 --- /dev/null +++ b/systemd/system/multi-user.target.wants/cmk-agent-ctl-daemon.service @@ -0,0 +1 @@ +/lib/systemd/system/cmk-agent-ctl-daemon.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