Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

Deleting large number of flow sources

 

Information

 

Summary:

Possibilities on how to delete a large number of flow sources in Flowmon OS. Can be applied to other objects (profiles, alerts,...) as well.

Environment:

Product: Flowmon OS

Version: Any

Platform: Any

Question/Problem Description:

How can I delete a large number of flow sources?

Steps to Reproduce:  
Error Message:  
Defect Number:  
Enhancement Number:  
Cause:  
Resolution:

There is no batch delete option in the GUI but it is possible to use REST API to do batch operations.

Example of deleting flow sources via SSH with curl:

  1. Obtain an access token
    curl https://localhost/resources/oauth/token -k -d grant_type=password -d client_id=invea-tech -d username=admin -d password=admin
    Replace username and password fields with your desired GUI user details.
    Sample response:
    {
    "access_token":"e6a7b08c56326685a56c572718e02db33ae1363e9104d93baaa790de8eab0dc1",
    "expires_in":86400,
    "token_type":"bearer",
    "refresh_token":"998adfa95793197eca0b1118efd736cbf410c7ffe753d1067d0d36e37da0c17e"
    }
  2. List all flow sources
    curl -G -k https://localhost/rest/fmc/sources?interfaces=false -H "Authorization: bearer <access_token>"
    Replace <access_token> with the token obtained in step 1.
    The request returns JSON with all flow sources (ID, IP, name,...).
    Sample response:
    [{
    "id":124,
    "ip":"127.0.0.1",
    "name":"127.0.0.1 (localhost, NetFlow-port2055)",
    "hostname":"localhost",
    "internalId":"127.0.0.1|p2055|0"
    }]
  3. Delete desired IDs
    curl -X DELETE -k https://localhost/rest/fmc/sources/<ID1>  -H "Authorization: bearer <access_token>"
    curl -X DELETE -k https://localhost/rest/fmc/sources/<ID2>  -H "Authorization: bearer <access_token>"
    ...
    Replace <ID> with the ID obtained in step 2 and <access_token> with the token obtained in step 1.
Workaround:  
Notes:  

Was this article helpful?
0 out of 0 found this helpful

Comments