assets' delete script
Updated: 23 May 2010 | 4 comments
Hi,
I'm writting a script to delete all the vulnerabilities and cve's for all the assets, and only some assets of the database.
What I've done is:
1. connect to database
2. delete all from asset_cve_map table.
3. delete all from asset_vulnerability_map table.
4. delete the assets I need from assets table.
5. release the conection to the database.
But it seems that this is not the same process which SSIM does. ¿Does anyone know if I'm missing something?
Discussion Filed Under:
Comments
I'm still working to delete
I'm still working to delete the assets from SSIM data base automatically.
It seems that there's some kind of block that doesn't allow me to do that. Every time I delete the data base (now I'm using asset_removal_tool.jar) the following times I launch a collector it doesn't add assets until I restart the system (stopall.sh and startall.sh).
It's there any tested way to do something similar to the data base?
Thank you.
Asset deletion and creation
Hi Belen,
Last week I ran several tests for Nessus Collector and SEP State Collector, I was importing around 8000 Assets, then deleting them in the GUI (5000 at time) and re-running the collector import and had no problems at all.
Do you have the option to test a collector like SEP State to create asset population and delete them? See if oyu get same behaviour ?
Laurent
Asset deletion and creation
Yes, deleting assets with GUI works fine. I'm trying to automate the process of deleting with a script, so it can be launched, before the collector, on days with no one working at the office. I've tried stopping the connections to the data base, but it doesn't work either. I don't know if there's a restriction to work with the data base.
Here's the script I created:
-------------------------------------------------
#!/bin/sh -x
cd /opt/Symantec/Tools/AssetRemoval/;
echo `date` "Starting assets delete...";
#stop connections to DB
db2 connect to SESA;
db2 quiesce database immediate force connections;
db2 unquiesce database;
db2 quit;
java -jar /opt/Symantec/Tools/AssetRemoval/assets_removal_tool.jar > /opt/Symantec/Tools/AssetRemoval/deleteAssets.log 2>&1;
#check for errors
grep SEVERE /opt/Symantec/Tools/AssetRemoval/deleteAssets.log;
if [ 0 -eq $? ];
then echo "ERROR - Se han producido errores en el borrado de activos.";
fi;
--------------------------------------------------
Thanks.
Hey, I have checked and when
Hey,
I have checked and when you use this tool you only need to restart the asset service.
Laurent
Would you like to reply?
Login or Register to post your comment.