Comment Form

Type the following word in the box above (case-sensitive): hypotenuse

You are replying to:

2017.03.01 @ 22:56:10 MRTG for TP-Link Archer c7

The Wirecutter has recommended the Archer C7 wireless router for a couple years now. I happen to have two of them, although one is only functioning as a wireless access point. After reading about the hacked also-popular Netgear R6400 router, I decided I should get something to monitor my broadband internet connection and give me some pretty graphs. I went in search of various tools, and it seems good 'ol MRTG is still one of the better options out there. However, the Archer C7 doesn't support SNMP which means some other means is needed to get the traffic info to chart it. There are folks with solutions using upnpc to gather the data, but this means running a tool which dumps to text, then another tool to parse that text into to feed it into MRTG. That seemed too inefficient for me, so I kept looking and found this python tool for fetching data via upnp and feeding it straight into MRTG. It was designed nicely to be extendable with only a little effort. I used upnpc to find the port and initial xml data for the Archer c7, then with a bit of investigation the right values to plug in and a few test runs of the script showed it getting reasonable looking data back from the router. I was able to communicate with the original author and push my changes upstream for others to use. Given the router's popularity, perhaps you are interested in making it work. Below is the important stuff from my mrtg.cfg:

# external program for retrieving data
Target[archerc7]: `/usr/local/bin/ -t archer_c7 -h -p 1900`

# size of graph area
XSize[archerc7]: 500
YSize[archerc7]: 200

Options[archerc7]: growright,nobanner,logscale

MaxBytes1[archerc7]: 39321600
MaxBytes2[archerc7]: 13108000
WithPeak[archerc7]: wmy

Title[archerc7]: Traffic TP-Link Archer C7
PageTop[archerc7]: <H1>Home Internet Usage</H1>
PageFoot[archerc7]: <HR><BR>ng-upnp2mrtg - Monitoring Archer c7