Skip to content

Commit

Permalink
files referring to ns1labs (#656)
Browse files Browse the repository at this point in the history
files referring to ns1labs (#656)
  • Loading branch information
manrodrigues authored Apr 5, 2023
1 parent 117671d commit 136ec82
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clean-runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
gh api -H "Accept: application/vnd.github.v3+json" /repos/ns1labs/pktvisor/actions/runners -q '.runners[] | {id,status,busy} | select((.busy == false) and (.status == "offline")) | {id} | .[]' --paginate | xargs -I {} gh api --method DELETE -H "Accept: application/vnd.github.v3+json" /repos/ns1labs/pktvisor/actions/runners/{}
gh api -H "Accept: application/vnd.github.v3+json" /repos/orb-community/pktvisor/actions/runners -q '.runners[] | {id,status,busy} | select((.busy == false) and (.status == "offline")) | {id} | .[]' --paginate | xargs -I {} gh api --method DELETE -H "Accept: application/vnd.github.v3+json" /repos/orb-community/pktvisor/actions/runners/{}
# - name: Clear cache
# uses: actions/github-script@v6
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
name: "CodeQL"

on:
#push:
# branches: [ "develop" ]
#pull_request:
# The branches below must be a subset of the branches above
# branches: [ "develop" ]

schedule:
#run 5 minutes after midnight daily
- cron: '5 0 * * *'
Expand Down Expand Up @@ -68,7 +64,6 @@ jobs:
# create conan config
CONAN_V2_MODE=1 conan config init
conan config set general.revisions_enabled=1
conan remote add ns1labs https://ns1labs.jfrog.io/artifactory/api/conan/ns1labs-conan
# add custom compiler settings for libc
python3 -c 'import yaml; p = "${{env.CONAN_USER_HOME}}/.conan/settings.yml"; d = yaml.safe_load(open(p)); d["compiler"]["gcc"]["libc"] = ["None", "glibc", "musl"]; yaml.safe_dump(d, open(p, "w"))'
# Create Conan host profile
Expand All @@ -92,7 +87,7 @@ jobs:
LDFLAGS=${{matrix.ldflags}}
EOF
# clone the repository, not sure if this needs to be done
git clone https://github.com/ns1labs/pktvisor.git
git clone https://github.com/orb-community/pktvisor.git
cd pktvisor
mkdir build && cd build
# configure and handle dependencies
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/debug_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ jobs:

- name: Build, push debug image + crashhandler
env:
IMAGE_NAME: ns1labs/pktvisor
IMAGE_NAME1: orbcommunity/pktvisor
IMAGE_NAME: orbcommunity/pktvisor
run: |
docker build . --file docker/Dockerfile.crashhandler --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} --tag ${{ env.IMAGE_NAME1 }}:${{ env.REF_TAG }}
docker build . --file docker/Dockerfile.crashhandler --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}
docker push -a ${{ env.IMAGE_NAME }}
docker push -a ${{ env.IMAGE_NAME1 }}
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ the [Network](src/handlers/net) and [DNS](src/handlers/dns) stream processors, a
### Docker

One of the easiest ways to get started with pktvisor is to use
the [public docker image](https://hub.docker.com/r/ns1labs/pktvisor). The image contains the collector
the [public docker image](https://hub.docker.com/r/orbcommunity/pktvisor). The image contains the collector
agent (`pktvisord`), the command line UI (`pktvisor-cli`) and the pcap and dnstap file analyzer (`pktvisor-reader`). When running
the container, you specify which tool to run.

1. *Pull the container*

```
docker pull ns1labs/pktvisor
docker pull orbcommunity/pktvisor
```

or use `ns1labs/pktvisor:latest-develop` to get the latest development version.
or use `orbcommunity/pktvisor:latest-develop` to get the latest development version.

2. *Start the collector agent*

Expand All @@ -75,7 +75,7 @@ _Note that this step requires docker host networking_ to observe traffic outside
that [currently only Linux supports host networking](https://docs.docker.com/network/host/):

```
docker run --net=host -d ns1labs/pktvisor pktvisord eth0
docker run --net=host -d orbcommunity/pktvisor pktvisord eth0
```

If the container does not stay running, check the `docker logs` output.
Expand All @@ -87,7 +87,7 @@ UI (`pktvisor-cli`) in the foreground, and exit when Ctrl-C is pressed. It conne
the built in REST API.

```
docker run -it --rm --net=host ns1labs/pktvisor pktvisor-cli
docker run -it --rm --net=host orbcommunity/pktvisor pktvisor-cli
```

### Linux Static Binary (AppImage, x86_64)
Expand Down Expand Up @@ -168,7 +168,7 @@ sudo setcap cap_net_raw,cap_net_admin=eip /<full_path>/pktvisord-x86_64
Current command line options are described with:

```
docker run --rm ns1labs/pktvisor pktvisord --help
docker run --rm orbcommunity/pktvisor pktvisord --help
```

or
Expand Down Expand Up @@ -320,7 +320,7 @@ If running in a Docker container, you must mount the configuration file into the
is on the host at `/local/pktvisor/agent.yaml`, you can mount it into the container and use it with this command:

```shell
docker run -v /local/pktvisor:/usr/local/pktvisor/ --net=host ns1labs/pktvisor pktvisord --config /usr/local/pktvisor/agent.yaml --admin-api
docker run -v /local/pktvisor:/usr/local/pktvisor/ --net=host orbcommunity/pktvisor pktvisord --config /usr/local/pktvisor/agent.yaml --admin-api
```


Expand All @@ -331,7 +331,7 @@ summarization, which is by default a sliding 5 minute time window. It can also c
host.

```
docker run --rm ns1labs/pktvisor pktvisor-cli -h
docker run --rm orbcommunity/pktvisor pktvisor-cli -h
```
```shell
Expand Down Expand Up @@ -367,7 +367,7 @@ using a tool such as [golang-dnstap](https://github.com/dnstap/golang-dnstap).
Both take many of the same options, and do all of the same analysis, as `pktvisord` for live capture. pcap files may include Flow capture data.

```
docker run --rm ns1labs/pktvisor pktvisor-reader --help
docker run --rm orbcommunity/pktvisor pktvisor-reader --help
```

```shell
Expand Down Expand Up @@ -404,7 +404,7 @@ You can use the docker container by passing in a volume referencing the director
output will contain the JSON summarization output, which you can capture or pipe into other tools, for example:
```
$ docker run --rm -v /pktvisor/src/tests/fixtures:/pcaps ns1labs/pktvisor pktvisor-reader /pcaps/dns_ipv4_udp.pcap | jq .
$ docker run --rm -v /pktvisor/src/tests/fixtures:/pcaps orbcommunity/pktvisor pktvisor-reader /pcaps/dns_ipv4_udp.pcap | jq .
[2021-03-11 18:45:04.572] [pktvisor] [info] Load input plugin: PcapInputModulePlugin dev.visor.module.input/1.0
[2021-03-11 18:45:04.573] [pktvisor] [info] Load handler plugin: DnsHandler dev.visor.module.handler/1.0
Expand Down Expand Up @@ -524,14 +524,14 @@ You can set the `instance` label by passing `--prom-instance ID`

If you are interested in centralized collection
using [remote write](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage), including to
cloud providers, there is a [docker image available](https://hub.docker.com/r/ns1labs/pktvisor-prom-write) to make this
cloud providers, there is a [docker image available](https://hub.docker.com/r/orbcommunity/pktvisor-prom-write) to make this
easy. See [centralized_collection/prometheus](centralized_collection/prometheus) for more.

Also see [getorb.io](https://getorb.io) for information on connecting pktvisor agents to the Orb observability platform.

### REST API

REST API documentation is available in [OpenAPI Format](https://app.swaggerhub.com/apis/ns1labs/pktvisor/3.0.0-oas3)
REST API documentation is available in [OpenAPI Format](https://app.swaggerhub.com/apis/orb-community/pktvisor/3.0.0-oas3)

Please note that the administration control plane API (`--admin-api`) is currently undergoing heavy iteration and so is
not yet documented. If you have a use case that requires the administration API, please [contact us](#contact-us) to
Expand All @@ -545,7 +545,7 @@ ingress and egress traffic:
```
docker run --rm --net=host -d \
--mount type=bind,source=/opt/geo,target=/geo \
ns1labs/pktvisor pktvisord \
orbcommunity/pktvisor pktvisord \
--geo-city /geo/GeoIP2-City.mmdb \
--geo-asn /geo/GeoIP2-ISP.mmdb \
-H 192.168.0.54/32,127.0.0.1/32 \
Expand Down
2 changes: 1 addition & 1 deletion RFCs/2022-06-23-307-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Summary

Pktvisord binary allows multiple [command line arguments](https://github.com/ns1labs/pktvisor#agent-usage) on its start up. Almost all the parameters can be passed to pktvisord
Pktvisord binary allows multiple [command line arguments](https://github.com/orb-community/pktvisor#agent-usage) on its start up. Almost all the parameters can be passed to pktvisord
via yaml configuration file. Config file can also be combined with command line arguments.

Moreover, the config file has a feature to allow setup of global configuration for specific handlers (`global_handler_config`).
Expand Down
2 changes: 1 addition & 1 deletion appimage/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEV_IMAGE ?= ns1labs/pktvisor:latest
DEV_IMAGE ?= orbcommunity/pktvisor:latest

# in dev mode we just use the latest image as the start point
ifneq ($(strip $(DEV_MODE)),)
Expand Down
2 changes: 1 addition & 1 deletion appimage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Because the build can take a while you may want to build the appimage from the l

You may also specify a custom image in dev mode by setting the env file `DEV_IMAGE=` to the image you wish to build on. Example:

`DEV_IMAGE="ns1labs/pktvisor:develop" DEV_MODE=t make pktvisor-x86_64.AppImage`
`DEV_IMAGE="orbcommunity/pktvisor:develop" DEV_MODE=t make pktvisor-x86_64.AppImage`


## Usage:
Expand Down
2 changes: 1 addition & 1 deletion appimage/pktvisor/TerminalEmulatorRequired.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This app needs to be run from a terminal to function correctly. See the docs at https://github.com/ns1labs/pktvisor for more details.
This app needs to be run from a terminal to function correctly. See the docs at https://github.com/orb-community/pktvisor for more details.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Scenario: Create a policy using admin permission with all handlers
## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with all handlers through a post request on the endpoint: `/api/v1/policies`
- Check our method `generate_pcap_policy_with_all_handlers` on [policies.py](../../features/steps/policies.py) in order to have examples of how to do it
- Make a get request to the same endpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
DNS:

## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with dns handler through a post request on the endpoint: `/api/v1/policies`
- Make a get request to the same endpoint

Expand All @@ -19,7 +19,7 @@ DNS:
NET:

## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with net handler through a post request on the endpoint: `/api/v1/policies`
- Make a get request to the same endpoint

Expand All @@ -34,7 +34,7 @@ DHCP:


## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with dhcp handler through a post request on the endpoint: `/api/v1/policies`
- Make a get request to the same endpoint

Expand All @@ -48,7 +48,7 @@ PCAP:


## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with pcap handler through a post request on the endpoint: `/api/v1/policies`
- Make a get request to the same endpoint

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Scenario: Create a policy without admin permission

## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net_interface>`
- Try to create a policy through a post request on the endpoint: `/api/v1/policies`
- Make a get request to the same endpoint

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Scenario: Remove a policy without admin permission

## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net_interface>`
- Try to remove the default policy through a DELETE request on the endpoint: `/api/v1/policies/{name_of_the_policy}`
- Make a get request to the same endpoint

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
All policies

## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Remove the default policy through a DELETE request on the endpoint: `/api/v1/policies/{name_of_the_policy}`
- Make a get request to the same endpoint

Expand All @@ -20,7 +20,7 @@ One policy


## Steps:
- Provide a pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord --admin-api <net_interface>`
- Provide a pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord --admin-api <net_interface>`
- Create a policy with all handlers through a post request on the endpoint: `/api/v1/policies`
- Check our method `generate_pcap_policy_with_all_handlers` on [policies.py](../../features/steps/policies.py) in order to have examples of how to do it
- Remove one of the running policies using a DELETE request on the endpoint: `/api/v1/policies/{name_of_the_policy}`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Scenario: Run multiple pktvisors instances using different ports

## Steps:
- Provide 1 pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord -p 10854 <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord -p 10854 <net>`


## Expected Result:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Scenario: Run multiple pktvisors instances using the same ports

## Steps:
- Provide 1 pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d ns1labs/pktvisor pktvisord <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net>`
- Provide 1 pktvisor instance using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net>`


## Expected Result:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Scenario: Run pktvisor instance using docker command
## Steps:
- Run docker using `docker run --net=host -d ns1labs/pktvisor pktvisord <net>`
- Run docker using `docker run --net=host -d orbcommunity/pktvisor pktvisord <net>`


## Expected Result:
Expand Down
2 changes: 1 addition & 1 deletion automated_tests/features/steps/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _read_configs():
configs['sudo'] = "True"
assert_that(configs.get('sudo_password'), not_none(), 'Sudo password was not provided!')
client = docker.from_env()
configs['pktvisor_docker_image'] = f"ns1labs/pktvisor:{configs.get('pktvisor_docker_image_tag', 'latest')}"
configs['pktvisor_docker_image'] = f"orbcommunity/pktvisor:{configs.get('pktvisor_docker_image_tag', 'latest')}"
try:
client.images.get(configs['pktvisor_docker_image'])
except ImageNotFound:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PKTVISOR_TAG=latest
FROM telegraf:1.16.2 as telegraf

FROM ns1labs/pktvisor:${PKTVISOR_TAG}
FROM orbcommunity/pktvisor:${PKTVISOR_TAG}

COPY --from=telegraf /usr/bin/telegraf /usr/local/bin/telegraf

Expand Down
14 changes: 7 additions & 7 deletions centralized_collection/prometheus/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Centralized Prometheus Collection

This directory contains resources for building a docker container aiding centralized prometheus collection. It is
published to Docker hub at https://hub.docker.com/r/ns1labs/pktvisor-prom-write
published to Docker hub at https://hub.docker.com/r/orbcommunity/pktvisor-prom-write

It combines pktvisord with the [Grafana Agent](https://github.com/grafana/agent) for collecting and sending metrics to
Prometheus through
Expand All @@ -16,30 +16,30 @@ Grafana installation (ID 14221).
Example:

```shell
docker pull ns1labs/pktvisor-prom-write
docker pull orbcommunity/pktvisor-prom-write
docker run -d --net=host --env PKTVISORD_ARGS="--prom-instance <INSTANCE> <INTERFACE>" \
--env REMOTE_URL="https://<REMOTEHOST>/api/prom/push" --env USERNAME="<USERNAME>" \
--env PASSWORD="<PASSWORD>" ns1labs/pktvisor-prom-write
--env PASSWORD="<PASSWORD>" orbcommunity/pktvisor-prom-write
```

Example with Geo enabled (assuming files are located in `/usr/local/geo`):

```shell
docker pull ns1labs/pktvisor-prom-write
docker pull orbcommunity/pktvisor-prom-write
docker run -d --mount type=bind,source=/usr/local/geo,target=/geo --net=host --env \
PKTVISORD_ARGS="--prom-instance <INSTANCE> --geo-city /geo/GeoIP2-City.mmdb --geo-asn /geo/GeoIP2-ISP.mmdb <INTERFACE>" \
--env REMOTE_URL="https://<REMOTEHOST>/api/prom/push" --env USERNAME="<USERNAME>" --env PASSWORD="<PASSWORD>" ns1labs/pktvisor-prom-write
--env REMOTE_URL="https://<REMOTEHOST>/api/prom/push" --env USERNAME="<USERNAME>" --env PASSWORD="<PASSWORD>" orbcommunity/pktvisor-prom-write
```

**PKTVISORD_ARGS optionally allows a semicolon delimited list of arguments to handle arguments such as bpf filters that may contain whitespace*

Example with Geo enabled and bpf filter (assuming files are located in `/usr/local/geo`):

```shell
docker pull ns1labs/pktvisor-prom-write
docker pull orbcommunity/pktvisor-prom-write
docker run -d --mount type=bind,source=/usr/local/geo,target=/geo --net=host --env \
PKTVISORD_ARGS="-b; port 53; --prom-instance; <INSTANCE>; --geo-city; /geo/GeoIP2-City.mmdb; --geo-asn; /geo/GeoIP2-ISP.mmdb; <INTERFACE>" \
--env REMOTE_URL="https://<REMOTEHOST>/api/prom/push" --env USERNAME="<USERNAME>" --env PASSWORD="<PASSWORD>" ns1labs/pktvisor-prom-write
--env REMOTE_URL="https://<REMOTEHOST>/api/prom/push" --env USERNAME="<USERNAME>" --env PASSWORD="<PASSWORD>" orbcommunity/pktvisor-prom-write
```

There are a several pieces of information you need to substitute above:
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@
<body>
<h1>pktvisor</h1>
<div class="app-desc">pktvisor summarizes data streams in real time and provides a clean, time-windowed HTTP interface and command line UI to the results</div>
<div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div>
<div class="app-desc">Contact Info: <a href="ns1labs@ns1.com">ns1labs@ns1.com</a></div>
<div class="app-desc">More information: <a href="https://orb.community/">https://orb.community/</a></div>
<div class="app-desc">Contact Info: <a href="info@netboxlabs.com">info@netboxlabs.com</a></div>
<div class="app-desc">Version: 3.0.0-oas3</div>

<div class="license-info">Apache 2.0</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/pktvisor-3.0.0-oas3-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ info:
version: 3.0.0-oas3
title: pktvisor
contact:
email: [email protected]
email: info@netboxlabs
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
Expand Down Expand Up @@ -205,4 +205,4 @@ components:
in:
type: object
out:
type: object
type: object

0 comments on commit 136ec82

Please sign in to comment.