- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Max file size to import in Command Line
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max file size to import in Command Line
I am trying to create a many hosts using command line scripting, as there is a limit when pasting the commands I am using the open file feature. The problem is when selected the message "The file is too big and cannot be loaded" is presented. Does anybody know what is the size limit I can import in?? It seems it is not very large at all, not really helpful. I had to split my file in ten smaller parts. The original file's size is 99kb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe its 64 kb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anything more than a few hundred lines will probably fail.
Further, making that many changes without a publish will take a long time and/or fail.
Better to use mgmt_cli to do this as described here: https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solut...
You will likely have to break the file up into several chunks if you use this approach.
You might see better performance (and be able to do more objects at once) using add objects-batch in R80.40 and above: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-objects-batch~v1.6%20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, indeed, I had to discard about 1900 changes because Smartconsole fail to publish the changes due to disconnection to Smart-1.
I will try to use instead CSV files, haven't done this option in the past.
But what is worth to mention in the SKs is the max limits to import. I have to create near 3,000 hosts to block because out financial authorities suggest to do it as they have been detected to use port scanning tools.
Even with such options to add hosts as a CSV batch or clish, will take a while to do the work and still, need to find out the limits in order to avoid failures. Is there any command to publish changes in clish mode? This will help to do so, I think.
Thanks for your answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right, yes, it is a lot of work. This is what TAC gave me back in December 2020 and I did it few times and works really well. Again, not a script, but I like this method.
--->To add address-range via API:
mgmt_cli add address-range --batch address-ranges_full.csv
#cat address-ranges_full.csv
name,ip-address-first,ip-address-last
range1,10.0.0.0,10.0.0.100
---> To add a network via API:
mgmt_cli add network --batch networks.csv
#cat networks.csv
name,subnet,subnet-mask
network1,10.10.10.0,255.255.255.0
network2,20.20.20.0,255.255.255.0
network3,30.30.30.0,255.255.255.0
---> To add a host
mgmt_cli add host --batch test.csv
#cat test.csv
name,ip-address
obj1,192.168.1.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How fast is this option against clish commands? Does it accept more "lines" too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked my notes and see back in Feb 2021 I did it in my lab with 3255 lines and worked fine, no issues. I dont know if there is a limit, first, cause I never asked and second, customer only needed about 450 entries : - )
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3255 lines?, works for me.
Thanks for your feedback!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any time, happy to help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the sk I meant to send. This does not mention any limits anywhere that I can see.
How to import multiple objects into the R8x.x Management database using a .csv file (checkpoint.com)
