# How to collect metrics on gl.inet routers

**URL:** <https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066>\
**Category:** Router\
**Created:** [April 11, 2022, 2:32pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066 "2022-04-11T14:32:17Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![drio](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/drio/32/4720_2.png) [@drio](https://forum.gl-inet.com/u/drio)\
**Post date:** [April 11, 2022, 2:32pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/1 "2022-04-11T14:32:17Z")

</div>

Hi there,

I want to be able to collect metrics in my routers: GL-AR750S and mango. By metrics I mean: cpu loads, temperature, network interface metrics, etc…

I typically do this on a regular unix box via telegraf (for influxdb) or collectd. Then I visualize things with grafana.

What is the recommended way to achieve this with gl.inet routers?

-drd

---

<div class="post-metadata">

**Author:** ![beniamin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/beniamin/32/4794_2.png) [@beniamin](https://forum.gl-inet.com/u/beniamin)\
**Post date:** [April 11, 2022, 5:33pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/2 "2022-04-11T17:33:51Z")

</div>

Give me a few hours and I will give you my grafana my collect d config and my HTTP Prometheus exporter.

---

<div class="post-metadata">

**Author:** ![drio](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/drio/32/4720_2.png) [@drio](https://forum.gl-inet.com/u/drio)\
**Post date:** [April 11, 2022, 5:46pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/3 "2022-04-11T17:46:12Z")

</div>

Cool. Please let me know how and what package you install on the router.

Thank you!

---

<div class="post-metadata">

**Author:** ![beniamin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/beniamin/32/4794_2.png) [@beniamin](https://forum.gl-inet.com/u/beniamin)\
**Post date:** [April 11, 2022, 5:58pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/4 "2022-04-11T17:58:36Z")

</div>

##install collectd on router

```auto
opkg update
opkg install collectd-mod-ethstat collectd-mod-ipstatistics collectd-mod-irq collectd-mod-load collectd-mod-ping collectd-mod-powerdns collectd-mod-sqm collectd-mod-thermal collectd-mod-wireless collectd-mod-iptables
opkg install luci-app-statistics

```

##install iptmon on router

```auto
VERSION=0.1.6
wget https://github.com/oofnikj/iptmon/releases/download/v${VERSION}/iptmon_${VERSION}-1_all.ipk -O iptmon_${VERSION}-1_all.ipk
opkg install ./iptmon_${VERSION}-1_all.ipk

```

##Config luci\_statistics on router  
Copy my config file "luci\_statistics" to /etc/config/

file -\> ([config statistics 'collectd' option BaseDir '/var/run/collectd' option Inc - Pastebin.com](https://pastebin.com/YYzvFFmR))  
(update the export location to your server ip where prom/collect-export is located.)

--------------------Server side setup-----------------------------------------------  
##Install Grafana, Promethesus, Prom/collect-exporter on Docker. You also need to configure Prometheus to scrape the collectd exporter.

> **[GitHub - Einsteinish/Docker-Compose-Prometheus-and-Grafana: Prometheus-Grafana with Docker-compose](https://github.com/Einsteinish/Docker-Compose-Prometheus-and-Grafana)**
>
> Prometheus-Grafana with Docker-compose

> **[prom/collectd-exporter - Docker Image](https://hub.docker.com/r/prom/collectd-exporter/)**

## 

Import my grafana dashboard  
File -\> (pastebin: [{ "\_\_inputs": [{ "name": "DS\_VPS", "label": "VPS", - Pastebin.com](https://pastebin.com/ZBvz8nxy))

 ![OpenWRT](https://forum-static.gl-inet.com/original/2X/6/638a61a57c8f91d5f14ea44f74be4074df5c6289.png)

---

<div class="post-metadata">

**Author:** ![drio](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/drio/32/4720_2.png) [@drio](https://forum.gl-inet.com/u/drio)\
**Post date:** [April 11, 2022, 6:14pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/5 "2022-04-11T18:14:47Z")

</div>

Thank you.  
I saw a similar post online but run into this issue when trying to install the packages (see below).  
Any idea how to solve this?

```auto
root@GL-AR750S:~# opkg update
Downloading https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ath79/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_packages
Downloading https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ath79/glinet/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_private
Downloading https://fw.gl-inet.com/releases/v19.07.8/kmod-3.0/ath79/nand/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_kmod
root@GL-AR750S:~# opkg install luci-app-statistics
Installing luci-app-statistics (git-21.189.23240-7b931da-1) to root...
Downloading https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ath79/packages/luci-app-statistics_git-21.189.23240-7b931da-1_all.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-app-statistics:
 * collectd
 * collectd-mod-rrdtool
 * collectd-mod-iwinfo
 * collectd-mod-cpu
 * collectd-mod-memory
 * collectd-mod-interface
 * collectd-mod-load
 * collectd-mod-network
 * opkg_install_cmd: Cannot install package luci-app-statistics.

```

---

<div class="post-metadata">

**Author:** ![beniamin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/beniamin/32/4794_2.png) [@beniamin](https://forum.gl-inet.com/u/beniamin)\
**Post date:** [April 11, 2022, 6:41pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/6 "2022-04-11T18:41:59Z")

</div>

I’ll be honest, I’m not familiar with that error. Probably need to see if @alzhao can help. Maybe those sub packages aren’t available for your device?

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [April 11, 2022, 9:28pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/7 "2022-04-11T21:28:05Z")

</div>

You can try installing each of the **collectd** \* packages individually, then try installing the **luci-app-statistics** package again.

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![beniamin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/beniamin/32/4794_2.png) [@beniamin](https://forum.gl-inet.com/u/beniamin)\
**Post date:** [April 11, 2022, 10:21pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/8 "2022-04-11T22:21:15Z")

</div>

That would make sense. I updated my notes above to include running collects first.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [April 12, 2022, 1:59am UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/10 "2022-04-12T01:59:21Z")

</div>

The collectd package is missing. Here is a temp solution for you.

Edit `/etc/opkg/distfeeds.conf`. Added package from openwrt, comment out first line

```auto
#src/gz glinet_packages https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ath79/packages
src/gz glinet_private https://fw.gl-inet.com/releases/v19.07.8/packages-3.0/ath79/glinet
src/gz glinet_kmod https://fw.gl-inet.com/releases/v19.07.8/kmod-3.0/ath79/nand
src/gz openwrt_packages https://downloads.openwrt.org/releases/19.07.8/packages/mips_24kc/packages/
src/gz openwrt_luci https://downloads.openwrt.org/releases/19.07.8/packages/mips_24kc/luci/
src/gz openwrt_base https://downloads.openwrt.org/releases/19.07.8/packages/mips_24kc/base/

```

Then you can install luci-app-statistics.

After reboot router it works.

---

<div class="post-metadata">

**Author:** ![wcs2228](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/wcs2228/32/6112_2.png) [@wcs2228](https://forum.gl-inet.com/u/wcs2228)\
**Post date:** [April 12, 2022, 3:05am UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/11 "2022-04-12T03:05:28Z")

</div>

I am able to install the **collectd** package on my GL-AR750S running Firmware 3.201 without changing the _/etc/opkg/distfeeds.conf_ file:

 ![image](https://forum-static.gl-inet.com/original/2X/0/097e078019a67f3165b2303595d1b4efd84933fd.png)

It seems to be missing in Firmware 3.211.

_I do not work for and I do not have formal association with GL.iNet_

---

<div class="post-metadata">

**Author:** ![drio](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/drio/32/4720_2.png) [@drio](https://forum.gl-inet.com/u/drio)\
**Post date:** [April 14, 2022, 12:45pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/12 "2022-04-14T12:45:55Z")

</div>

I decided to take the nuclear option.  
I setup a pi in bridge mode for the interface I want to monitor. Now I can monitor everything using whatever software I want.  
Not ideal but it is going to give me more flexibility.

Thank you all for your replies.  
-drd

---

<div class="post-metadata">

**Author:** ![beniamin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/beniamin/32/4794_2.png) [@beniamin](https://forum.gl-inet.com/u/beniamin)\
**Post date:** [April 14, 2022, 2:24pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/13 "2022-04-14T14:24:44Z")

</div>

Interesting, do you have a link to a tutorial?

---

<div class="post-metadata">

**Author:** ![drio](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/drio/32/4720_2.png) [@drio](https://forum.gl-inet.com/u/drio)\
**Post date:** [April 14, 2022, 2:57pm UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/14 "2022-04-14T14:57:28Z")

</div>

Sure this covers everything: [Router - Community Help Wiki](https://help.ubuntu.com/community/Router).

And here are my notes. Basically we are setting up two network interfaces on a raspberry pi to work in bridge mode. That means all packets entering either of the interfaces will be sent to the other device.  
The interesting thing is that you have access to the bridge device (br0) and you can inspect and do whatever you want with those packets.

```auto
# For testing manually
 sudo apt install bridge-utils
 sudo ifconfig eth1 0.0.0.0
 sudo ifconfig eth2 0.0.0.0
 sudo brctl addbr bridge0
 sudo brctl addif bridge0 eth1
 sudo brctl addif bridge0 eth2
 sudo ifconfig bridge0 up

# To make it permanent:
$ sudo cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:

source /etc/network/interfaces.d/*

# This is the new part
auto br0
iface br0 inet static
    address 0.0.0.0
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    bridge-ports eth1 eth2

```

I do not set an ip address because I have another interface (eth0, the one that comes with the pi) connected to another network so I can ssh into the box using that interface. I also have the wlan0 interface setup for redundancy.

Once all is setup you just need to power the pi and connect ethernet cables to the right places: one coming from your router(gl-inet device) and another one coming from the your network switch.

Let me know if that makes sense.

---

<div class="post-metadata">

**Author:** ![bruce](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bruce/32/35649_2.png) [@bruce](https://forum.gl-inet.com/u/bruce)\
**Post date:** [October 29, 2025, 4:16am UTC](https://forum.gl-inet.com/t/how-to-collect-metrics-on-gl-inet-routers/21066/16 "2025-10-29T04:16:59Z")

</div>


