Applicable to:
- SolusVM
Question
How to list SolusVM VPS that were removed at a specific date?
Answer
It is not possible to filter logs by date in SolusVM interface.
However, it is possible to get this information from SolusVM database:
-
Access SolusVM Master node over SSH.
-
Execute commands below to:
List VPS removal from Administrator log:# echo "select vserverid, action, adminid, FROM_UNIXTIME(date) from adminlog where FROM_UNIXTIME(date) like '%2021-11-21%' and action like '%Deleted%';" | awk -F: '{ system("MYSQL_PWD='"'"'" $3 "'"'"' mysql -u " $2 " "$1) }' /usr/local/solusvm/includes/solusvm.conf
replace 2021-11-21 with the necessary date.
List VPS removal from API log:# echo "select apifrom, apiaction, apimessage, FROM_UNIXTIME(apidate) from apilog where FROM_UNIXTIME(apidate) like '%2021-11-21%' and apiaction like '%terminate%'" | awk -F: '{ system("MYSQL_PWD='"'"'" $3 "'"'"' mysql -u " $2 " "$1) }' /usr/local/solusvm/includes/solusvm.conf
replace 2021-11-21 with the necessary date.
Comments
0 commentsPlease sign in to leave a comment.