Reputation: 3
I would like to know who is the last user to have logged into each VM and I haven't found any method in SoftLayer_Virtual_Guest that does it.
So one solution is to SSH into each VM and run a command such as last | head -n 1
. I would like to automate this task since I have several hundreds of VMs.
Is it possible to run a bash command on a VM using the API?
Any suggestion would be appreciated.
Thanks
Upvotes: 0
Views: 78
Reputation: 36
While the API does not directly support this you could take advantage of our post provisioning script to automate this for all new VM's. You could set up the script to email you logins on a daily or weekly basis.
https://knowledgelayer.softlayer.com/topic/provisioning-scripts
Upvotes: 1
Reputation: 4386
Sorry API does not have any method wich allows running bash commands.
Regards
Upvotes: 0