cancel
Showing results for 
Search instead for 
Did you mean: 

how to send logs from TG585v7 to syslog server ?

starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

how to send logs from TG585v7 to syslog server ?

I have a PN TG585v7 (8.2.6.5). I would like to transmit its logs in real-time to a server on my network.
I can do it one-shot from the CLI like this

{admin}=> systemlog send hist=enabled dest=10.255.255.255

However I would like to do it in real-time. I've searched and found this but I am not having any success.
Does anyone know how to do this ?
5 REPLIES 5
npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: how to send logs from TG585v7 to syslog server ?

This may help:
http://npr.me.uk/telnet.html#syslog
If you're hoping for SNMP type reports you'll be disappointed, R8 firmware for that router doesn't have a SNMP server.
IIRC  R7 firmware may have a SNMP server.
starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

Re: how to send logs from TG585v7 to syslog server ?

Thanks, although I don't have a "syslog" command:

{admin}=>help
Following commands are available :
help            : Displays this help information
menu            : Displays menu
?                : Displays this help information
exit            : Exits this shell.
..              : Exits group selection.
saveall          : Saves current configuration.
ping            : Send ICMP ECHO_REQUEST packets.
traceroute      : Send ICMP/UDP packets to trace the ip path.
Following command groups are available :
firewall        service        connection      cwmp            dhcp           
dns            dsd            dyndns          eth            atm           
config          debug          env            expr            hostmgr       
ids            igmp            interface      ip              ipqos         
label          language        mbus            memm            mlp           
nat            ppp            pptp            script          sntp           
software        statecheck      system          systemlog      tls           
upgrade        upnp            user            wireless        xdsl           
{admin}=>
npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: how to send logs from TG585v7 to syslog server ?

Quote from: starfry
Thanks, although I don't have a "syslog" command:

In that case I think you're out of luck with that router, or you could try a earlier R7 firmware to see if that runs a SNMP server.
As suggested in your link, you could try a telnet script to periodically request the log, with the command you have, but I suspect that will keep reproducing a lot of the same information each time it's run.
You can find details of using a windows telnet scrip here:
http://npr.me.uk/scripting.html
If using linux, have a look at using "spawn" and "netcat" (nc), I've used those commands successfully in the past for telnet scripts run on a Raspberry Pi.
starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

Re: how to send logs from TG585v7 to syslog server ?

Hi, thanks. I've done a fair bit of telnet scripting for this router already (see here if you're interested).
My rationale for doing this was to get to the bottom of some spontaneous reboots but the local log doesn't seem to persist across reboots despite my trying. I can get the ad-hoc method to work fine but it requires messing about and won't help capture those final messages prior to a reboot.
Maybe it's time to change routers. I have a tp-link td-w8961 that I can swap in. I've been reluctant so far after investing so much effort in getting to the bottom of how much of the speedtouch works, despite it being so bad in many respects.
starfry
Rising Star
Posts: 303
Thanks: 23
Fixes: 2
Registered: ‎14-09-2007

Re: how to send logs from TG585v7 to syslog server ?

Well I've played around a bit more today. The "systemlog send" method that I described before sends the entire log but it does so without line breaks. This requires a bit of messing around on the server to store the log cleanly. I do, however, now have a listener set up that dumps whatever the router sends into the systemd journal. I can use a timer or cron job to kick the router (via telnet) into sending the current log and then flushing.
I'd still be interested in knowing if there is a proper way to configure the router to send to a syslog server in real time. Any PN staffers (or anyone else!) know the answer to this?