Giter Site home page Giter Site logo

Comments (9)

smilebasti avatar smilebasti commented on July 18, 2024

Hi, thank you.

Do you see *** Data send *** after Measurement Time?

from npmgrafstats.

manustars avatar manustars commented on July 18, 2024

i don't see *** Data send ***.

i can set measurement time? the container runing arout 5 hours
and on Your external IP is: is blank.
and I didn't understand what I should put in the file monitoringips.txt.

for the wiki could you explain these parameters better? personally I didn't understand what they do exactly and if they are necessary to forward the data to influx
- REDIRECTION_LOGS= # set to TRUE or FALSE or ONLY
- INTERNAL_LOGS= # set to TRUE or FALSE or ONLY # IMPORTANT see below for more info about this feature
- MONITORING_LOGS= # set to TRUE or FALSE or ONLY # IMPORTANT see below for more info about this feature

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

Ok. The logs should look like:

**************** start *********************
Measurement-name: ReverseProxyConnections
United States
New York
New York
10013
-74.0
40.7157
US
Clouvider Limited
Outside IP:  194.33.ch.ch
Target IP:  192.168.ch.ch
Domain:  support.domain.de
Measurement Time:  2024-04-04T05:16:11+00:00
*************** data send ******************

This curl -s ifconfig.me/ip runs at the start. Are you able to run it manually? This should get your external ip. If yes try restarting the container and check if it now shows up.

The monitoringips.txt should include a list of ip's that should not get included in the stats. Such as Ips from Monitoringservices.

Redirection logs will only gather stats if you have a domain redirection set in npm. True will monitor it, False will exclude them and Only will only monitor redirections.

The same go's for internal logs. It will monitor or exclude logs from private ip's. 10.... 192.168.... Or 172...

And the same goes with the monitoring logs. It will only save logs from ip's that are listed in the monitoringips.txt file.

Can you show us your logs and the docker command?

from npmgrafstats.

manustars avatar manustars commented on July 18, 2024

i see this log
npmGrafStats: v2.4.1
Startup: lets get the logs send them to influx
Only Reverse-Proxy Logs activated
Your external IP is:
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.5 called: ha.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.5 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.5 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 10.0.1.99 called: cloud.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com
Internal IP-Source: 192.168.30.254 called: stream.mydomain.com

i run curl -s ifconfig.me/ip on docker consolle (portainer) but non see any output

and this my compose
version: '3'
services:
npmgraf:
image: smilebasti/npmgrafstats
container_name: npmstats
environment:
- INFLUX_HOST=10.0.1.251:8686 # use host IP
- INFLUX_BUCKET=npmgrafstats
- INFLUX_ORG=Home
- INFLUX_TOKEN=mytoken
- REDIRECTION_LOGS=true # set to TRUE or FALSE or ONLY
- INTERNAL_LOGS=false # set to TRUE or FALSE or ONLY # IMPORTANT see below for more info about this feature
- MONITORING_LOGS=false # set to TRUE or FALSE or ONLY # IMPORTANT see below for more info about this feature
volumes:
- /home/rancher/NPM/data/logs:/logs
- /home/rancher/GEOLITE:/geolite

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

The logs only include private IPs.
Please test setting INTERNAL_LOGS=TRUE.

As i only see private IPs you will not see anything on the map but the other stats will be.

from npmgrafstats.

manustars avatar manustars commented on July 18, 2024

I'm starting to wonder if it's key sensitive, don't want 'true' but 'TRUE'. now the dashboard seems to be working, my map is completely empty and I don't know if it reads my public IP correctly

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

Yes it is case-sensitive. (maybe we should change that :)).

Can you please check your npm logs if there are other ip's then private ones (10...., 192.168... or 172.16-32...)?
If yes, i need to check and implement a different way to get the external ip.

Private IPs are not routeable on the internet, so no location is associated to it and nothing is displayed on the map.

from npmgrafstats.

manustars avatar manustars commented on July 18, 2024

I probably won't see the traffic coming from outside, I have a slightly different configuration. I am listening to port 443 on WAN for the VPN is in the VPN server I have the portshare that forwards non-VPN traffic to npm in DMZ, so the traffic is internal

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

Ok interesting setup.

So no map is shown. You can try to forward the external ip.

But as it now seems to work i will close this issue.

from npmgrafstats.

Related Issues (20)

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.