Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
VFO
Explorer

Detect and remove Duplicate Objects

Hello

On our SMS object database we have more than 4000 duplicates objects (same IP or network with different names).
We would like to clean our database
- Detect duplicate object
- Replace duplicate object with one object
- Remove duplicate object
with API or with any way that can allow some script or automation.

Example

Name

IP

Comment

HostBadname_1.1.1.1

1.1.1.1

To be replaced by HostGoodname_1.1.1.1

HostGoodname_1.1.1.1

1.1.1.1

Good one

 

 

 

NetworkBadName.10.10.10.0.24

10.10.10.0/24

To be replaced by NetworkGoodName.10.10.10.0.24

NetworkGoodName.10.10.10.0.24

10.10.10.0/24

Good one

 

Is there any specific tools, method which can allow this ?

 

Thanks

VRO

0 Kudos
3 Replies
the_rock
Legend
Legend

You can use script from below link, though I just tested it on latest R81.10 jhf 66 mgmt server and it failed:

https://community.checkpoint.com/t5/API-CLI-Discussion/Find-host-objects-that-share-the-same-IP-addr...

VFO
Explorer

Thank the-rock

I finally found another way to identify my duplicate objects, not very clean, but it work.

I use the API "mgmt_cli set network -b myfile" to change the name on all my objects, and when there is a line error it means there is a duplicate object : "- message: "More than one object named 'HostGoodname_1.1.1.1' exists."

Now I am looking for a way to replace duplicate bad object with good object automatically

 

VRO

 

 

0 Kudos
Henrik_Noerr1
Advisor

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events