Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newrelic-experimental/nri-ss
https://github.com/newrelic-experimental/nri-ss
nrlabs nrlabs-odp observability-data
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/newrelic-experimental/nri-ss
- Owner: newrelic-experimental
- License: apache-2.0
- Created: 2021-06-25T14:50:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-25T21:37:30.000Z (over 3 years ago)
- Last Synced: 2024-04-16T19:00:40.117Z (9 months ago)
- Topics: nrlabs, nrlabs-odp, observability-data
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![New Relic Experimental header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Experimental.png)](https://opensource.newrelic.com/oss-category/#new-relic-experimental)
# nri-ss
Publish metrics from [iproute2's](https://wiki.linuxfoundation.org/networking/iproute2) `ss` ([Socket Statistics](https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/misc/ss.c)) command which is the modern replacement for `netstat`.
`iproute2` and `ss` _should_ be preinstalled on most current Linux distributions.
## Installation
1. Place the `nri-ss` executable in `/var/db/newrelic-infra/custom-integrations/`
2. Place `nri-ss-definition.yml` in `/var/db/newrelic-infra/custom-integrations/`
3. Place `nri-ss-config.yml` in `/etc/newrelic-infra/integrations.d/`## Configuration
- `resolve` : boolean (true | false). If true attemp to resolve host ip addresses to names
- _IMPORTANT_ : if `resolve` is `true` then filters _must_ use host names. If `resolve` is `false` then filters must use host ip addresses.
- `filter` : a _properly_ formatted `ss` filter string. No validation is performed, test from the command line directly with `ss`
- No filter (empty filter) retrieves all available metrics
- Examples
- `'( dst 1.2.3.4 )'` show only metrics where the destination host is ip address `1.2.3.4` (`resolve: false`)
- `'( dst www.google.com )'` show only metrics where the distination host is `www.google.com` (`resolve: true`)
- `'( dst www.google.com:https )'` show only metrics where the distination host is `www.google.com` and the port is 443 (`resolve: true`)
- `'( dst 1.2.3.4 or dst 5.6.7.8 )'` show only metrics where the destination host is ip address `1.2.3.4` _or_ the destination host is ip address `5.6.7.8` (`resolve: false`)
- Filters can be quite complex, perform an Internet search on `ss filter examples` to learn more
- `ss_args` : command line arguments to `ss`, the default is `-iot`## Trouble shooting
- Try your filter from the command line `ss -iot `## Building
```bash
# Create your root dir
# cd to your root dir
export GOPATH=`pwd`
mkdir -p src/github.com/newrelic/
cd `src/github.com/newrelic/
git clone
cd nri-ss
govendor fetch +
make
```## Metrics
`"eventType": "SocketStatisticsSample"`
```
ts show string "ts" if the timestamp option is setsack show string "sack" if the sack option is set
ecn show string "ecn" if the explicit congestion notification option is set
ecnseen
show string "ecnseen" if the saw ecn flag is found in received packetsfastopen
show string "fastopen" if the fastopen option is setcong_alg
the congestion algorithm name, the default congestion algorithm is "cubic"wscale::
if window scale option is used, this field shows the send scale factory and receive scale factoryrto:
tcp re-transmission timeout value, the unit is millisecondbackoff:
used for exponential backoff re-transmission, the actual re-transmission timeout value is icsk_rto << icsk_backoffrtt:/
rtt is the average round trip time, rttvar is the mean deviation of rtt, their units are millisecondato:
ack timeout, unit is millisecond, used for delay ack modemss:
max segment sizecwnd:
congestion window sizepmtu:
path MTU valuessthresh:
tcp congestion window slow start thresholdbytes_acked:
bytes ackedbytes_received:
bytes receivedsegs_out:
segments sent outsegs_in:
segments receivedsend bps
egress bpslastsnd:
how long time since the last packet sent, the unit is millisecondlastrcv:
how long time since the last packet received, the unit is millisecondlastack:
how long time since the last ack received, the unit is millisecondpacing_rate bps/bps
the pacing rate and max pacing ratercv_space:
a helper variable for TCP internal auto tuning socket receive buffer
```## Support
New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.
>We encourage you to bring your experiences and questions to the [Explorers Hub](https://discuss.newrelic.com) where our community members collaborate on solutions and new ideas.
## Contributing
We encourage your contributions to improve nri-ss! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].
**A note about vulnerabilities**
As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).
## License
nri-ss is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.
>[If applicable: nri-ss also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.]