How can I retrieve data from the router and send it to Splunk?
In general, data is not retrieved from routers. Instead, the router is configured to send data to a syslog receiver (syslog-ng, rsyslog, etc). A universal forwarder typically sends the data from there to Splunk.