Forum Discussion

Wiehann_Kotze_3's avatar
Wiehann_Kotze_3
Icon for Nimbostratus rankNimbostratus
Aug 07, 2017

REST API call to set remote syslog server

I am trying to use the REST API to set the remote syslog details, but can't get the correct syntax. The config looks like this in tmsh.

 

root@(F5CBLB)(cfg-sync Standalone)(Active)(/Common)(tmos.sys.syslog) list sys syslog { remote-servers { remotesyslog1 { host 9.9.9.9 remote-port taep-as-svc } } }

 

Can anyone assist with the required REST call?

 

1 Reply

  • The following curl example is equivalent to

    modify sys syslog remote-servers add { sat { host 192.168.184.80 remote-port 514 }}
    .

    curl -sku admin: https:///mgmt/tm/sys/syslog \
     -H "Content-type: application/json" -X PATCH \
     -d'{"remoteServers":[ {"name":"sat","host":"192.168.184.80","remotePort":514} ]}'
    

    To list the remote servers, run the following (equivalent to

    tmsh list sys syslog remote-servers
    😞

    curl -sku admin: https:///mgmt/tm/sys/syslog?\$select=remoteServers