For Fortinet, make sure you setup a Raw UDP input in Graylog. On the Fortinet side of things, you can tweak the syslog destination port using the following commands :
config log syslogd setting
set status enable
set port XXXX
where XXXX is the UDP port number for the Raw UDP input in Graylog