Blog 2: Automate Asset Deletion from Inventory in Qualys (Cloud Agent module)
Introduction:
Problem Statement:
- As per business requirement, due to multiple factors, like formatting system, hardware fail or software fail, employee left the job, etc. factors, we need to remove asset record from inventory.
- Daily we get mails from Desktop team to remove stale entries from inventory.
o we daily copy the asset-name or NetBIOS name,
o search in Qualys portal,
o if asset found we take delete action & we acknowledge to the desktop team.
o if asset not found we acknowledge to the desktop team
- This is daily routine task & we get at least minimum 10 different mails with different senders.
- So the difficulty is, to open each mail, while working on focussed task & this mails used to divert our mind from current ongoing task.
- And we’ve to open portal, delete asset, close the window, and inform the team about execution.
Solution:
- The objective is the automate this deletion activity to save time, efforts & to stay away from distractions.
- Develop automation bot, which will continuously monitor the mail with keyword in requested mail subject or body.
- Once it detects expected mail, automation bot will:
o create array of asset(s) from given list,
o carry that hostname(s) to Qualys portal via API,
o validate asset name(s) by searching it in inventory,
o once it found searched assets in result, it’ll notify us,
o then, portal will request for asset deletion &
o then, it’ll delete it.
- Once asset gets deleted, bot will respond deletion status on mail for acknowledgement.
- Before deploying into production, we’ve to perform testing to check accuracy of bot operation.
- Sharing below, flow of Automation bot lifecycle.
- This is how entire automation flow for bot application can be built & will execute.
Technology Requirements:
1. Outlook
2. Outlook API (for integration)
3. Python
4. Qualys
5. Qualys API (for integration)




Comments
Post a Comment