Giter VIP home page Giter VIP logo

extstats's Introduction

πŸ‘‹ Hi there, I'm Stefan!

I’m an IoT Project Engineer, Developer, Tech enthusiast, IT professional, Photographer and Filmmaker.

  • πŸ”­ I’m currently working on ESP32 stuff, unraid, home automations
  • 🌱 I’m currently learning C#, ESP, Fusion360
  • πŸ‘― I’m looking to collaborate on cool and new Home Automation technics
  • πŸ“« How to reach me: mail me stefan[at]knaak.org

Stats

Latest activity

  1. πŸ—£ Commented on #142 in ESPresense/ESPresense
  2. πŸ—£ Commented on #158 in ESPresense/ESPresense
  3. πŸ—£ Commented on #157 in ESPresense/ESPresense
  4. πŸ—£ Commented on #155 in ESPresense/ESPresense
  5. πŸ—£ Commented on #154 in ESPresense/ESPresense

extstats's People

Contributors

corgan2222 avatar fedor-git avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

extstats's Issues

Polling data from router instead of running scripts on the router itself

I found this repo by crawling through the web looking for SNMP support for the AX88U as I have 3 of them in my house. I'm impressed by the work that has been done, but I'm not sure if I want to install this onto all my routers.

Have you thought about rewriting this as a service that polls the same data through SSH? One benefit would be that you could easily make it a docker container with a config-file where you specify each routers IP and then you wouldn't have to maintain the code in multiple places. Also I think it would be cleaner as you wouldn't have to mess with the router except from enabling SSH on LAN. Any thoughts about it? I don't see any reason why that shouldn't work and will try to see if I can start working on it soon as a proof of concept.

Unable to connect to influxdb!!

I have tried with a influxdb in docker, on my local machine & influxdb cloud but unable to connect. No error when creating db but when I test I get this.
showing Databases q=SHOW DATABASES
{"code":"unauthorized","message":"Unauthorized"}
Insert Test Data in DB router_exstats
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.7.1
X-Platform-Error-Code: unauthorized
Date: Sun, 18 Jun 2023 12:50:31 GMT
Content-Length: 48

{"code":"unauthorized","message":"Unauthorized"}
SHOW MEASUREMENTS from DB router_exstats
{"code":"unauthorized","message":"Unauthorized"}
SHOW SERIES from DB router_exstats
{"code":"unauthorized","message":"Unauthorized"}
Remove Test Database
{"code":"unauthorized","message":"Unauthorized"}

Add the grafana dashboard location to the documentation

Hello!
Love your project!
I'm running on my old and unsupported RT-AC56 (348.5), and after fixing the python3 dependency it started and looks quite ok for my needs (basic health, traffic).

I'm ashamed to admit that I spent way too much time looking for the grafana template. There should be a node/link in the main README :)

Most things seem to be working - even traffic per client - with the exception that I get mac addresses as names instead of the DNS name for static leases. Not sure if that is fixable or not.

Asus AC88U

Hi,
I have Asus AC88U with MerlinWRT, do I need to install python on the router? because it is not installed.

Started playing with this on my AX88 - some findings

Will be using this thread to tabulate some of the issues I have found. Great job in trying to put something like this together ( I had hacked getting node-exporter and some custom parsing in a text file, but this has a lot more info to it:

  1. opkg currently does not have python available. Had to install python3.
  2. pip also wasn't able to be installed, as the package is not python3-pip.
  3. When running the traffic export (toggle traffic analyzyer stats) to influx, I get an issue with export.py has the wrong command line variables --verify-ssl is no longer available:
usage: export_py.py [-h] -i [INPUT] [-d [DELIMITER]] [-s [SERVER]] [--port [PORT]] [-u [USER]] [-p [PASSWORD]] --dbname [DBNAME] [--create] [-m [METRICNAME]] [-tc [TIMECOLUMN]]
                    [-tf [TIMEFORMAT]] [-tz TIMEZONE] [--fieldcolumns [FIELDCOLUMNS]] [--tagcolumns [TAGCOLUMNS]] [-g] [-ssl] [-noverify] [-b BATCHSIZE]
export_py.py: error: unrecognized arguments: --verify_ssl

I updated the code in mod_trafficAnalyzer.sh

if [ "$EXTS_NOVERIFIY" = "true" ]; then
        SSL_VERIFY="--noverify"
fi

Issue with InfluxDB ping-auth-enabled configuration

When the InfluxDB configuration related to ping-auth-enabled is true the script cannot ping the database.

Ref. InfluxDB config:

  # Enables authentication on the /ping, /metrics, and deprecated /status
  # endpoints. This setting has no effect if auth-enabled is set to false.
  ping-auth-enabled = true

How to get the CPU temperature (AX88u)

Hi,
concerning the topic "how to get the CPU temperature" here is a way to do it on AX88u (here is a simplified Python function):

def getCpuTemp():
  f = open("/sys/class/thermal/thermal_zone0/temp")
  temp = f.read()
  f.close()
  return int(temp)/1000

Note: if you decide to implement it in Python you should add some error management to the above code depending on how you use it, e.g. in case the file is not there (in AX88u it should be always there, but on a different router it could be in another place or just be missing).

P.S.: I've seen other topics against the use of Python on the router due to higher resources usage, however the real point should not be to avoid the use of Python, but to try to avoid calling python scripts as you do with other binary executables in bash scripts (quote: β€œDon’t cross the streams.”).
Bash in itself is fast and light, however the burden starts to be heavy when you call multiple external executables in the script (even compiled binaries). Every single external script/command called involves, besides disk/cache access, allocating and running an additional process, if in a script you call many times external programs to perform small tasks the overhead is significant and it would probably be much more effective and efficient to run everything in a single Python (even better from byte-code) or Perl script.
To sum up:

  • Bash is fast and efficient al long as it doesn't run a lot of external commands (but its native functions are very limited so thus you need rely heavily on externals).
  • Perl is very fast in parsing files, but if you need to use additional perl libraries this would make more difficult to manage the dependencies on the router and it even might become significantly more resource intensive.
  • Python is fast and has a good number of native functions plus with the ability to run byte code so it's in game with the Perl scenario.

So if you can do it with native bash involving a very limited number of external commands in it, go for it. If you need a lot of external commands I'd say to consider Perl, which is very fast in parsing text and files. If you need Perl libraries I'd say to give it a shot with Python and its native features. Mostly the decision depends on how complex are the scripts and the hardware on which they will run.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.