Skip to content

pheetr/grafana-router-asus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASUS router metrics in Grafana (via SNMP)

Config files and scripts for pulling ASUS router metrics into TIG stack via SNMP.

Grafana Dashboard - Router

Grafana Dashboard - Router - Wireless Clients

The implementation takes advantage of SNMP Extend to pull additional metrics (not covered by MIBs) through custom commands, as well as a shell script to pull wireless client metrics (second image) and push the data directly into InfluxDB.

Tested with ASUS RT-AX86U running Asuswrt-Merlin v386.1_2.

Pre-requisites

  1. Asuswrt-Merlin firmware installed on the router.
  2. SNMP enabled on router. (Menu: Administration -> SNMP)
  3. JFFS custom scripts and configs enabled on router. (Menu: Administration -> System -> Persistent JFFS2 partition -> Enable JFFS custom scripts and configs)
  4. Awareness of how to configure user scripts and scheduled tasks on router.
  5. TIG stack deployed.

Contents

  1. Router SNMP config append file to define SNMP Extend
  2. SNMP Extend shell scripts for pulling the following metrics on the router:
    • Connection count
    • Active connection count
    • Admin web session - source IP of active/last session
    • Admin web session - timestamp (returns a value when someone is logged in)
    • Internet connection status
    • JFFS partition usage (%)
    • Number of active SSH sessions
    • Number of processes running
    • Temperature - CPU
    • Temperature - 2.4 GHz Wireless Module
    • Temperature - 5 GHz Wireless Module
    • Wireless client count - 2.4 GHz
    • Wireless client count - 5 GHz
  3. Shell script for pulling wireless client metrics and pushing the data directly into InfluxDB (in-memory processing on router)
  4. Grafana dashboard config files (use Flux to query InfluxDB)
  5. Telegraf router SNMP config

Configuration notes

  • Individual (per-metric) scripts are being used for SNMP Extend so as to avoid commands being run unnecessarily when the OIDs are being queried.
  • The Telegraf config file I've based my config on is sourced from bretmlw. I've commented out everything that didn't return results for me, as well as things that I'm not planning on using near-term. I've also added comments to a number of OIDs from their respective MIBs for (hopefully) improved clarity.
  • The shell script for gathering wireless client metrics is based on mod_wifi_clients.sh from corgan2222's excellent extstats add-on.

About

ASUS Router Metrics in Grafana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages