- Products
- Learn
- Local User Groups
- Partners
- More
Policy Insights and Policy Auditor in Action
19 November @ 5pm CET / 11am ET
Access Control and Threat Prevention Best Practices
Watch HereOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hi,
while adding networks via API (R81.10) i see following warning.
mgmt_cli add network name Network_10.1.0.0 subnet 10.1.0.0 subnet-mask 255.255.248.0
code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 10.1.0.0/255.255.248.0"
mgmt_cli publish -s id.txt
"Publish operation" succeeded (100%)
tasks:
- task-id: "01234567-89ab-cdef-a85f-a4014fae5873"
task-name: "Publish operation"
status: "succeeded"
progress-percentage: 100
suppressed: false
task-details:
- publishResponse:
numberOfPublishedChanges: 0
mode: "async"
revision: "fc3a7509-1d60-442a-9b3d-77f9b096be31"
mgmt_cli publish -s id.txt
This warning is more an error because the object will not be added.
The warning is correct from the logic. Another object with the same 'content' exists.
In SmartConsole. I would simply click ok and ignore this warning.
How to ignore this via API ?
2.
It looks like that the mgmt_cli command has some issue in terms of amount of objects.
What is the best approach to add ~1000 objects like hosts or networks?
TXS, Regards
You pass ignore-warnings true to the API call.
For adding objects in bulk, you should use the batch operations instead.
For example: https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-objects-batch~v1.9%20
Another consideration is to ensure you “publish” every 100 operations or so.
You pass ignore-warnings true to the API call.
For adding objects in bulk, you should use the batch operations instead.
For example: https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-objects-batch~v1.9%20
Another consideration is to ensure you “publish” every 100 operations or so.
Hi
tried now the batch approach via these call but still get validation error.
mgmt_cli add network --batch /tmp/test3.csv ignore-warnings true ignore-errors true -s id.txt
mgmt_cli publish -s id.txt
[test3.csv]
name,subnet,mask-length,tags,set-if-exists,color,comments,groups
NET-192.168.1.0,192.168.1.0,24,false,red,Net1,PRIVATE1
NET-192.168.2.0,192.168.2.0,24,false,red,Net1,PRIVATE1
NET-192.168.3.0,192.168.3.0,24,false,red,Net1,PRIVATE1
Results in
Line 2: code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 192.168.1.0/255.255.255.0"
Line 3: code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 192.168.2.0/255.255.255.0"
Line 4: code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 192.168.3.0/255.255.255.0"
Any tipp is welcome
Regards
Could it be, you already have the same networks defined?
Val, I'm pretty sure he does.
However there is an option to proceed with these warnings to te best of my knowledge.
But the CLI command only tells us about `--ignore-errors true` as valid option:
[--ignore-errors] {true|false}
Ignore errors and continue execution when executing commands from parameters file. See (--batch).
Default {false}
Environment variable: MGMT_CLI_IGNORE_ERRORS
For now yo can use the option '--ignore-erros true'
Hi,
yes some network are already defined. But it is definetely with a different object-name. However, via SmartConsole it is not an issue.
Regards
Well, it isn't in the sense that you have to validate that the duplication is not an issue. but --ignore-warnings doen't work or R80.20
[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true add network name Mgmt_NET subnet 192.168.198.0 subnet-mask 255.255.255.0
---------------------------------------------
Time: [16:29:57] 9/10/2023
---------------------------------------------
"Publish operation" in progress (10%)
---------------------------------------------
Time: [16:30:08] 9/10/2023
---------------------------------------------
"Publish operation" succeeded (100%)
[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0
code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 192.168.198.0/255.255.255.0"
Executed command failed. Changes are discarded.
[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli -r true --ignore-warnings true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0
Error: The parameters of --ignore-warnings command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.
[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli --ignore-warnings true -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0
Error: The parameters of --ignore-warnings command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.
[Expert@LAB-NLLAB1VP-CPSMS-MGMT:0]# mgmt_cli --ignore-errors true -r true add network name NET-MGMT subnet 192.168.198.0 subnet-mask 255.255.255.0
code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network has the same IP 192.168.198.0/255.255.255.0"
Ignore errors is turned on. Publishing changes despite of command execution errors.
---------------------------------------------
Time: [16:32:27] 9/10/2023
---------------------------------------------
"Publish operation" succeeded (100%)
The batch API calls do not support using ignore-warnings true...at least directly.
You have to add this to the CSV file (ignore-warnings to the header, true to the value for each row).
That did the trick. Great. Thanks.
And it works with huge number of networks.
name,subnet,mask-length,set-if-exists,color,comments,groups,ignore-warnings
NET-192.168.1.0,192.168.1.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.2.0,192.168.2.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.3.0,192.168.3.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.4.0,192.168.4.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.5.0,192.168.5.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.6.0,192.168.6.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.7.0,192.168.7.0,24,true,red,Net1,PRIVATE1,true
NET-192.168.8.0,192.168.8.0,24,true,red,Net1,PRIVATE1,true
Thanks
Regards
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 25 | |
| 12 | |
| 10 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 |
Wed 26 Nov 2025 @ 12:00 PM (COT)
Panama City: Risk Management a la Parrilla: ERM, TEM & Meat LunchWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 26 Nov 2025 @ 12:00 PM (COT)
Panama City: Risk Management a la Parrilla: ERM, TEM & Meat LunchAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY