Skip to content

Commit

Permalink
NETOBSERV-906 Document json format (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak authored Mar 1, 2023
1 parent 04ae8b3 commit 4a46eb6
Show file tree
Hide file tree
Showing 9 changed files with 571 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,7 @@ else
cd ${CONSOLE} && source contrib/oc-environment.sh && ./bin/bridge -plugins netobserv-plugin=http://localhost:9001/ --plugin-proxy='{"services":[{"consoleAPIPath":"/api/proxy/plugin/netobserv-plugin/backend/","endpoint":"http://localhost:9001"}]}'
cd -
endif

.PHONY: generate-doc
generate-doc: ## Generate documentation of the flows JSON format
cd web && npm run generate-doc
11 changes: 11 additions & 0 deletions web/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# netobserv-plugin

## Interfaces

- [Record](interfaces/Record.md)
- [Labels](interfaces/Labels.md)
- [Fields](interfaces/Fields.md)

## Enumerations

- [FlowDirection](enums/FlowDirection.md)
17 changes: 17 additions & 0 deletions web/docs/enums/FlowDirection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Enumeration: FlowDirection

## Enumeration Members

### Ingress

**Ingress** = ``"0"``

Incoming traffic, from node observation point

___

### Egress

**Egress** = ``"1"``

Outgoing traffic, from node observation point
177 changes: 177 additions & 0 deletions web/docs/interfaces/Fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Interface: Fields

## Properties

### SrcAddr

**SrcAddr**: `string`

Source IP address (ipv4 or ipv6)

___

### DstAddr

**DstAddr**: `string`

Destination IP address (ipv4 or ipv6)

___

### SrcMac

**SrcMac**: `string`

Source MAC address

___

### DstMac

**DstMac**: `string`

Destination MAC address

___

### SrcK8S\_Name

`Optional` **SrcK8S\_Name**: `string`

Name of the source matched Kubernetes object, such as Pod name, Service name, etc.

___

### DstK8S\_Name

`Optional` **DstK8S\_Name**: `string`

Name of the destination matched Kubernetes object, such as Pod name, Service name, etc.

___

### SrcK8S\_Type

`Optional` **SrcK8S\_Type**: `string`

Kind of the source matched Kubernetes object, such as Pod, Service, etc.

___

### DstK8S\_Type

`Optional` **DstK8S\_Type**: `string`

Kind of the destination matched Kubernetes object, such as Pod name, Service name, etc.

___

### SrcPort

**SrcPort**: `number`

Source port

___

### DstPort

**DstPort**: `number`

Destination port

___

### SrcK8S\_OwnerType

`Optional` **SrcK8S\_OwnerType**: `string`

Kind of the source Kubernetes owner, such as Deployment, StatefulSet, etc.

___

### DstK8S\_OwnerType

`Optional` **DstK8S\_OwnerType**: `string`

Kind of the destination Kubernetes owner, such as Deployment, StatefulSet, etc.

___

### SrcK8S\_HostIP

`Optional` **SrcK8S\_HostIP**: `string`

Source node IP

___

### DstK8S\_HostIP

`Optional` **DstK8S\_HostIP**: `string`

Destination node IP

___

### SrcK8S\_HostName

`Optional` **SrcK8S\_HostName**: `string`

Source node name

___

### DstK8S\_HostName

`Optional` **DstK8S\_HostName**: `string`

Destination node name

___

### Proto

**Proto**: `number`

L4 protocol

___

### Packets

**Packets**: `number`

Number of packets in this flow

___

### Bytes

**Bytes**: `number`

Number of bytes in this flow

___

### TimeFlowStartMs

**TimeFlowStartMs**: `number`

Start timestamp of this flow, in milliseconds

___

### TimeFlowEndMs

**TimeFlowEndMs**: `number`

End timestamp of this flow, in milliseconds

___

### TimeReceived

**TimeReceived**: `number`

Timestamp when this flow was received and processed by the flow collector, in seconds
41 changes: 41 additions & 0 deletions web/docs/interfaces/Labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Interface: Labels

## Properties

### SrcK8S\_Namespace

`Optional` **SrcK8S\_Namespace**: `string`

Source namespace

___

### DstK8S\_Namespace

`Optional` **DstK8S\_Namespace**: `string`

Destination namespace

___

### SrcK8S\_OwnerName

`Optional` **SrcK8S\_OwnerName**: `string`

Source owner, such as Deployment, StatefulSet, etc.

___

### DstK8S\_OwnerName

`Optional` **DstK8S\_OwnerName**: `string`

Destination owner, such as Deployment, StatefulSet, etc.

___

### FlowDirection

**FlowDirection**: [`FlowDirection`](../enums/FlowDirection.md)

Flow direction from the node observation point
19 changes: 19 additions & 0 deletions web/docs/interfaces/Record.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Interface: Record

## Properties

### labels

**labels**: [`Labels`](Labels.md)

___

### key

**key**: `number`

___

### fields

**fields**: [`Fields`](Fields.md)
Loading

0 comments on commit 4a46eb6

Please sign in to comment.