Closed gmeszaros closed 4 years ago
sudo -u nagios /usr/local/lib/nagios/plugins/check_contrail_status_controller.py 5.1
sudo: sorry, you are not allowed to preserve the environment
CRITICAL: Could not get contrail-status. return code: 1 cmd: export CONTRAIL_STATUS_CONTAINER_NAME=contrail-status-controller-nrpe ; sudo -E contrail-status output: b''
Duplicate of #138
File that fails: files/plugins/check_contrail_status_controller.py at: output = subprocess.check_output("export CONTRAIL_STATUS_CONTAINER_NAME=contrail-status-controller-nrpe ; sudo -E contrail-status", shell=True).decode('UTF-8')
sudo -E tries to preserve the environment, but that is not allowed.
way around:
usermod -aG docker nagios