How to deploy telegraf on Android

Is there a way to install (deploy) Telegraf on Android tablet ?
I would like to use the TICK to monitor Android tablets fleets. In official documentation I did not read how to do?
What do you suggest to monitor android devices with TICK?
Regards,

1 Like

I’ve never tried installing Telegraf on an Android device, if you get it working please let us know what was required. I would love to add an Android package.

1 Like

Is this still something you’re interested in?

I just deployed telegraf to two instances of a generic Android device, and here’s what I found:

  • Simply extracting the telegraf binary from the armhf package works fine.

  • You need to be root. There’s very little you can do without root, since it seems that some paths are hardcoded (either in telegraf, or in go). In particular, /var/run/utmp must be present, or the host will appear offline and only some system stats will be collected.

  • DNS is also mildly problematic. AFAICT go cannot detect resolvers on android (https://stackoverflow.com/a/25789946/228534), so you must provide /etc/resolv.conf if your influxdb endpoint is named (not IP).

  • On the utmp front, creating an empty file and running chmod 000 /var/run/utmp works best, since the n_users stat is not likely to be useful on android anyway. This requires remounting the root partition in rw mode (mount -o rw,remount /), and creating the entire hierarchy of /var/run.

  • There’s no systemd equivalent, but that’s likely a problem that can be solved by whatever fleet management software is in use, provided it can run commands as root.