Disable Software RAID Monitor (mdmonitor)
An XCCDF Rule
Description
The mdmonitor
service is used for monitoring a software RAID array; hardware
RAID setups do not use this service.
The mdmonitor
service can be disabled with the following command:
$ sudo systemctl mask --now mdmonitor.service
Rationale
If software RAID monitoring is not required, there is no need to run this service.
- ID
- xccdf_org.ssgproject.content_rule_service_mdmonitor_disabled
- Severity
- Low
- References
- Updated
Remediation - Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
Remediation - OS Build Blueprint
[customizations.services]
disabled = ["mdmonitor"]
Remediation - Ansible
- name: Block Disable service mdmonitor
block:
- name: Disable service mdmonitor
block:
Remediation - Puppet
include disable_mdmonitor
class disable_mdmonitor {
service {'mdmonitor':
enable => false,
ensure => 'stopped',
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'mdmonitor.service'
"$SYSTEMCTL_EXEC" disable 'mdmonitor.service'