Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Slip-Rizzo
Explorer
Jump to solution

mgmt_cli add host --batch fails with "Unrecognized parameter [name]"

Hello All,

First post, pardon my ignorance.

ENVIRONMENT:

FW1 build number:
This is Check Point Security Management Server R82 - Build 009
This is Check Point's software version R82 - Build 013
[SecurePlatform]
HOTFIX_GAIA_API_AUTOUPDATE
HOTFIX_R82_JUMBO_HF_MAIN Take: 60

WHAT:

I am trying to use mgmt_cli add host --batch to create 80 objects that are Shodan scanners.

I created a CSV files that looks like this:

# head shodan-hosts.csv
name,ip-address,comments
shodan-01,64.225.74.178,20260216
shodan-02,64.226.86.7,20260216
shodan-03,64.227.90.185,20260216
shodan-04,66.240.192.138,20260216
shodan-05,66.240.205.34,20260216
shodan-06,66.240.219.133,20260216
shodan-07,66.240.219.146,20260216
shodan-08,66.240.236.119,20260216
shodan-09,71.6.135.131,20260216

TERMINAL EXPERIENCE:

mgmt_cli add host --batch /tmp/shodan-hosts.csv
Username: 
Password:
Line 2: code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [name]"

Line 3: code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [name]"

Line 4: code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [name]"

... and so on for all 81 lines.

TSHOOTING I HAVE DONE:

I initially uploaded my CSV.  I also used the SMS's vi to create the file on the server. No luck.

vi set list to show any odd whitespace. All good.

added a blank line at the end of the csv as shown in some examples (e.g., https://support.checkpoint.com/results/sk/sk113078).  No luck.

Read/watched resources and I am not seeing what I am missing.

Assistance appreciated, thank you!

0 Kudos
1 Solution

Accepted Solutions
Alex-
MVP Silver
MVP Silver
9 Replies
_Val_
Admin
Admin

I think you are missing quote marks for the comments string. Try adding a simple host, not from CSV, but by manually typing the parameters. It will be clearer that's going wrong. Also, consult with the API guide: https://sc1.checkpoint.com/documents/latest/APIs/?#cli/add-host~v2.1%20

0 Kudos
Vincent_Bacher
MVP Silver
MVP Silver

Interesting:

[Expert@r82_10-lab-mgmt:0]# cat tst.txt
name,ip-address,comments
shodan-01,64.225.74.178,20260216
shodan-02,64.226.86.7,20260216
[Expert@r82_10-lab-mgmt:0]# mgmt_cli add host -d CMA_ZWO --batch tst.txt
Username: admin
Password:


---------------------------------------------
Time: [12:44:32] 17/2/2026
---------------------------------------------
"Publish operation"  succeeded  (100%)

 

 mgmt_cli -r true show  host -d CMA_ZWO name shodan-01
uid: "3a49859d-0be6-4134-92dc-41e739620a83"
name: "shodan-01"
type: "host"
domain:
  uid: "044c9978-2152-47c8-96a6-93ca58e7c17a"
  name: "CMA_ZWO"
  domain-type: "domain"
ipv4-address: "64.225.74.178"
and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
0 Kudos
_Val_
Admin
Admin

Well, it was a guess, and I missed. File format, maybe?

 

0 Kudos
Vincent_Bacher
MVP Silver
MVP Silver

What do you mean with file format? 

and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
0 Kudos
Alex-
MVP Silver
MVP Silver

dos2unix

Vincent_Bacher
MVP Silver
MVP Silver

On my end it worked even without dos2unix. Just copied the txt from here 🙂

and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
0 Kudos
_Val_
Admin
Admin

Where did you create your txt file? If on the host, dos2unix is not required. I guess that CSV was copied from a Windows machine, then format adjustment is highly recommended

 

0 Kudos
Vincent_Bacher
MVP Silver
MVP Silver

I copied it from this thread here 🙂
But yes author should try dos2unix.

and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
0 Kudos
Slip-Rizzo
Explorer

Good Day All,

THANK YOU everyone for your help/suggestions/time.  dos2unix got me over my hurdle (thx Alex).

TERMINAL EXPERIENCE:

[Expert@-CPM:0]# md5sum shodan-hosts.csv
e1a4f5569938eccaebfee0af07c058a5 shodan-hosts.csv
[Expert@-CPM:0]#
[Expert@-CPM:0]# ls -l shodan-hosts.csv
-rwx------ 1 admin users 3028 Feb 16 10:11 shodan-hosts.csv
[Expert@-CPM:0]#
[Expert@-CPM:0]# dos2unix shodan-hosts.csv
dos2unix: converting file shodan-hosts.csv to Unix format ...
[Expert@-CPM:0]#
[Expert@-CPM:0]# ls -l shodan-hosts.csv
-rwx------ 1 admin users 2944 Feb 17 07:55 shodan-hosts.csv
[Expert@-CPM:0]#
[Expert@-CPM:0]# md5sum shodan-hosts.csv
a9c350270a79a3e247bdeb3f193b73d5 shodan-hosts.csv
[Expert@-CPM:0]#
[Expert@-CPM:0]# mgmt_cli add host --batch ./shodan-hosts.csv
Username: 
Password: 


---------------------------------------------
Time: [07:58:25] 17/2/2026
---------------------------------------------
"Publish operation" in progress (10%)


---------------------------------------------
Time: [07:58:35] 17/2/2026
---------------------------------------------
"Publish operation" succeeded (100%)
[Expert@-CPM:0]#

 

Take Care

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Tue 24 Feb 2026 @ 04:30 PM (EST)

    Las Vegas: MDR/XMDR

    Wed 25 Feb 2026 @ 04:30 PM (MST)

    Tempe, AZ: MDR/MXDR

    Wed 11 Mar 2026 @ 12:00 PM (MDT)

    CheckMates Live Denver!
    CheckMates Events