VPXD logs contains the following error messages related to the SchedulerTask launched for the respective triggered alarm action:
In the /var/log/vmware/vpxd/vpxd.log you may see similar entries:/bin/sudo_command_wrapper.sh: line <line_number>: <script_path>: Permission denied
/bin/sudo_command_wrapper.sh: line <line_number>: exec: <script_path>: cannot execute: Permission denied
vim.event.AlarmScriptFailedEvent
error type event under the Monitor tab with message "Alarm <alarm_name> on <managed_object_name> did not complete script
"Date Time:
MM/DD/YYYY, HH:MM:SS AM/PM
Type:
Error
Target:
<VMName>
Description:
Alarm 'AlarmName' on <VMName> did not complete script:
Event Type Description:
The vCenter Server logs this event if an error occurs while running a script after an alarm triggers.
Possible Causes:
There was an error running the script Action: Fix the script or failure condition
Related events:
There are no related events.
vCenter Server 8.0 U3e and above versions
vCenter Server 7.0 U3v and above versions
alarms_script
" which doesn't have vpxd privileges.root
/vpxd
privileges. Change the owner of the script to user 'alarms_script
' by following below steps :
chown alarms_script:root <script file path>
chown alarms_script:root /tmp/alarmtest.sh
root@<hostname> [ /tmp ]# ls -lrt | grep alarm
-rwx------ 1 alarms_script root 62 Apr 3 08:59 alarmtest.sh
alarms_script
" has. If for some reason the alarm scripts need to be executed with vpxd or higher privileges, it can be temporarily allowed by the following way, but only until these scripts are redesigned to be executed in a non-vpxd fashion, since continuing to do this will not implement the security enhancements done in the release.
alarmtest.sh
into another file (e.g. root_alarmtest.sh
)alarmtest.sh
to only invoke the command "sudo <absolute_path_to_root_alarmscript> <arguments_to_root_alarmscript>
" and make sure that alarmtest.sh
has the correct OS permission as indicated above.root_alarmtest.sh
to the sudoers
file like so:
/etc/sudoers
alarms_script ALL= NOPASSWD: <absolute_path_to_root_alarmscript> <arguments>
"