Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Gix-L
New Contributor

Rename FortiProxy based on FortiManager name (CLI/TCL?)

Hello,

 

I'm a bit newbie in Forti environment, but I'm trying to rename the appliance name with the "Device Name" entered in FortiManager:

 

 
 

2025-10-09_12h29_52.png

 

 

I thought about CLI:

config system global
    set hostname ${Hostname}
end

but for sure ${Hostname} is unknown

 

 

 

I thought about TCL:

#!
puts [exec_ondb "/adom/FortiProxy/device/." "
config system global
    set hostname XXX
end
" "# "]

But with what replace XXX ?

 

Maybe there is another easy solution?

 

Thanks in advance

1 REPLY 1
singhl
Staff
Staff

In this case Jinja variables for Device database will be best. See this guide for list of variables.

You can create a cli template with type jinja and use config script like this:


config system global
set hostname {{DVMDB.name}}
end


Here DVMDB.name is "Device Name" in the Device manager.

Regards,
Lovepreet

Lovepreet Singh
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors