Pushing metrics with telegram fail

Following my techno lust to explore something new

Primary goal

Ease of use, push openwrt metrics to service providers on inet instead of maintaining homelan solutions.

HighLevelDesign

Able to push openwrt metrics with telegraf to service providers InfluxDB v2 and Grafana on top.

Findings

Suggested route for timeseries db InfluxDBv2 is to use telegraf which is a formadible size ~60MB binary and does not comply with most package builds in openwrt which are mean and lean.
Think with InfluxDBv2 they dropped older collectd,opentsb protocols so telegraf is becoming somewhat of the new std to push data. From the influxdb perspective that is :woozy_face:

Telegraf does provide mipsel/mips tarball @ https://github.com/influxdata/telegraf/releases

Did ran in this issue mentioned @ OpenWrt & Telegraf
Then tried mipsel build but throws an Illegal instruction

Then found this @ https://github.com/influxdata/telegraf/pull/6153
pekindenis reported in with an asus RT-N10 and confirmed it working. :smiley:
Ok cool, my arch is similar so thought this might work then.

Tried the mentioned 1.12.0 build but again confronted with illegal instruction while running telegram binary

My arch

system type		: Broadcom BCM4716
machine			: Asus RT-N16
processor		: 0
cpu model		: MIPS 74Kc V4.0
BogoMIPS		: 239.61
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 64
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp dsp2
Options implemented	: tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases vint perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

Got crosscompiletoolchain ready but failed to execute on telegraf build as there a couple of unknowns to move forward.

Q1 are their any who succeeded on this arch to run telegraf
Q2 maybe when crosscompiling and with some depencies less a slimmer build can be made but to me this seems an daunting task. Did crosscompile often back in the day but still I see lots of "new" go dependencies I got no clue off
Q3 Is this telegraf binary ever going to run my arch as the binary is currently massive. Someone confirmed it work and that is even on a arch with even less resources available.

Any other thoughts

Telegraf elf

readelf -h  telegraf.mipsel 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x80378
  Start of program headers:          52 (bytes into file)
  Start of section headers:          276 (bytes into file)
  Flags:                             0x50001004, cpic, o32, mips32
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         13
  Section header string table index: 3
--- 
readelf -h  telegraf.mips
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x80230
  Start of program headers:          52 (bytes into file)
  Start of section headers:          276 (bytes into file)
  Flags:                             0x50001004, cpic, o32, mips32
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         13
  Section header string table index: 3

Switched to other setup which just works

  • setup free plan grafana cloud
  • prometheus node-exporter on router
  • prometheus on router

teaser

https://doemijdiemetriekmaar.grafana.net/dashboard/snapshot/DnAr7divIPQNizab85fmOnssdOOoB528