Skip to content
View moh53n's full-sized avatar

Block or report moh53n

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. bazz bazz Public

    Some scripts for the Reverse engineered (old) api of CafeBazaar

    Python 39 3

  2. weBGP weBGP Public

    BGP insight tool

    Python 18 1

  3. tools tools Public

    Python 25

  4. FitBridge FitBridge Public

    A simple script to sync Gadgetbridge exported data to Google Fit

    Python 12

  5. Add Forwarded packet count to node-e... Add Forwarded packet count to node-exporter netstat
    1
    By default, node exporter supports collecting netstat info, but not all of it. When you run `netstat -s` there are lots of useful information which are not present in the node-exporter's netstat info.  
    2
    The statistics in `netstat -s` come from two sources, `/proc/net/netstat` and `/proc/net/snmp`. node-exporter also uses these two sources, but does not collect all of its information. [It uses a regex](https://github.com/prometheus/node_exporter/blob/b6227af54b20d147463e1672a3e8bfca47fa10ee/collector/netstat_linux.go#L39) to filter and collect some of these stats.  
    3
    Like me, you may need to collect one of these unexported metrics. In my case, I needed `forwarded` or to be more accurate, `ForwDatagrams` which indicates the number of forwarded packets. It's useful when you're running a software router and want to keep track of it in prometheus and grafana.  
    4
    Fortunately, there is a way to change the regex and select which statistics you want to collect without changing the node-exporter source code.  
    5
    In my case, I just had to add `Ip_ForwDatagrams` to the default regex and pass it as the following argument: