ad8mustanggt wrote: > Can someone help me with the MYSQL command needed to delete all the events > for a specific device ID from the MYSQL database? Its our firewall and is > taking up around 40GB of disk space!! > > Any help would be greatly appreciated... Im sitting with only 88MB free on my > server [Exclamation]
To delete rows from the events database for a specific device, try something similar to the following: /usr/bin/mysql -D events -e "DELETE FROM status WHERE device LIKE 'deviceName'; That will delete all the current events and move them to event history. To delete the event history for the device, specify the 'history' table instead of the 'status' table. That *should* do it. Standard disclaimer: I'm not responsible for lost data, like if you leave off the WHERE clause to that statement. ;-) (Don't do that, unless you want to test the theory that you have good database backups ;-)) Don't just copy and paste the above command into an ssh session and hit enter...You may want to just go into the mysql interface (`mysql -u zenoss -p -D events`) and look around so you know what's going on if you're not familiar with the database structure, etc. --seth -------------------- m2f -------------------- Read this topic online here: http://community.zenoss.com/forums/viewtopic.php?p=15102#15102 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
