What's new

Monitoring the Asus RT-AC68U with the Telegraf agent Grafana and InfluxDB

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

wheel5up

New Around Here
I've successfully compiled the Telegraf agent on the RC-AC68U. I wrote a quick post about it here

TL;DR
opkg install go_nohf
opkg install git-http
opkg install file
cd /tmp/mnt/sda1/
mkdir telegraf
git clone https://github.com/influxdata/telegraf.git
opkg install make
export PATH=$PATH:/opt/bin/go/bin
export GOROOT=/opt/bin/go
mkdir /tmp/mnt/sda1/gopath
export GOPATH=/tmp/mnt/sda1/gopath/
dd if=/dev/zero of=/tmp/mnt/sda1/swapfile bs=1024 count=1048576
mkswap /tmp/mnt/sda1/swapfile
swapon /tmp/mnt/sda1/swapfile
mkdir /tmp/mnt/sda1/gotmp
export TMPDIR=/tmp/mnt/sda1/gotmp
mkdir /tmp/mnt/sda1/gocache
export GOCACHE=/tmp/mnt/sda1/gocache/
export LDFLAGS="-X main.version=1.16.1"
make telegraf
 
. I’ll look at cross compiling and write a follow up post if I can get that work.

Did you ever got to cross compiling? I have two routers (ac-86u which is aarch64, and a ac-3100 which is armv7) and 86u is a mesh node, I have not enabled entware there. Have to find a way to get telegraf going on both.
 
I haven't yet. I was shocked at how fast it compiled on my QNAP NAS (seemed like seconds). I think I'll enter an issue at entware and see if they will include it. If you do decide to follow the steps I've listed, just know it takes a long time to compile. I did it on my main router (I have RT-AC68U) and it took more than 24 hours. My biggest concern with x-compiling is the no_hf. I was going to try on a raspberry pi, but that has the hardware. I think the best route is to see if Entware will pick is up. I'm happy to ship you my binary as well.

We'll see...
 
Last edited:
One problem I see with telegraf repo is all their input/output plugins are part of main repo itself, and build process has to build the entire package. I am thinking about forking it and just keeping necessary bits. That should take care of both build time as well as final binary size. Its not like we are going to run a docker container or a dynatrace agent on our routers anytime soon.
 
I did notice the final binary was pretty large. It's also NOT stripped. I've forgotten more then I remember about compiling and using gcc, but I think you can provide an option to strip the binary.
# file /opt/bin/telegraf
/opt/bin/telegraf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=49BABB-XVFf1kXZWc15Y/dyCc9rBHf0-i-taoDZ9c/luDXymgN72F_n84p5EkE/Wl0xldqqQofLQSJH41TN, not stripped
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top