I am not a Linux guru by any means nor am I that good at action scripts. I know enough to get myself in trouble That being said, I have Splunk servers that are load-balanced so before patching three of them I need to run /usr/share/heartbeat/hb_standby. I believe I should be using a task so correct me if I am incorrect.
I have a very simple task
// Enter your action script here
if {name of operating system contains “Linux”}
run /usr/share/heartbeat/hb_standby
endif
I have no idea if it really runs. The way I know it runs at the console is the response comes back as “Going Standby [all]” on the console. It sates it completes on the Linux server but I also ran it against a windows server and it states that it completed. I would assume with the if statement it should not apply to the windows server and fail or not relavent.
I also have to run this command with elevated privileges. I would assume that I would need to pass the creds in the action script or create an script to run on the linux server.
Any help is appreciated.