Sign inSign up

asglab/sflow-go

By asglab

•Updated about 1 year ago

sflow-go is an application that collects sflow data and sends it to Kafka.

Image
Networking
Security
Monitoring & observability
0

520

asglab/sflow-go repository overview

sflow-go is an application that collects sflow data and sends it to Kafka.

https://github.com/ISS-Peak/sflow-go⁠ https://github.com/ISS-Peak/flowzen⁠

  • In the main branch, data is written to Kafka directly as raw bytes without converting to JSON, and the consumer processes it accordingly. However, in the JSON branch, the data is first converted to JSON before being written to Kafka.

In this code, we configure the behavior of the program using various environmental variables.

Environmental variables enable the program to run in different environments and allow users to change the behavior of the program. Here's an explanation of how these environmental variables are used:

PORT: This environmental variable, It determines which port the program will listen to sFlow data on. If this environmental variable is not specified or an error occurs, port 6343 is used by default.

BUFFER_SIZE: This environmental variable determines the socket buffer size of the program. The socket buffer size determines the amount of memory in which the network data stream will be stored.

If this environmental variable is not specified or an error occurs, 3000 bytes are used by default.

OS_UDP_BUFFER: Determines the size of the OS UDP buffer. If not specified or an error occurs, 2GB is used by default. If this value is bigger than the OS buffer size, it will be ignored, and the OS buffer size will be used.Packet drop may occur if the buffer size is too small. Format is byte.

KAFKA_TOPIC: This environmental variable determines the topic name to be used for Kafka communication.

KAFKA_BROKERS: This environmental variable determines the broker address to be used for Kafka communication.

IP: This environmental variable, Determines which IP address the program will listen to sFlow data on. Recommended(0.0.0.0)

Tag summary

Content type

Image

Digest

sha256:f7e834e44…

Size

9.7 MB

Last updated

about 1 year ago

docker pull asglab/sflow-go