For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

NetCap chart configuration

You can configure NetCap using Helm chart configurable parameters. Such configuration allows you to:

  • Configure NATS connectivity, including server URL, user credentials, cluster name, and JetStream domain name
  • Define the stream’s source and destination
    • Memif socket and targets
    • NATS: subject, server URL override, mode (jetstream or pubsub)
    • PCAP file options: file prefix, rotation options (maximum number of packets, time, or size), and file compression
  • Deploy Prometheus services for metrics capturing
  • Configure RClone as a side-container for PCAP transferring

General configuration

These are the general parameters that you can configure:

NetCap Collector configuration

You can configure NetCap Collector with these chart configuration parameters:

You can reload the NetCap Collector configuration at runtime. The configuration is stored in a ConfigMap. When you apply a new configuration, the ConfigMap content is updated inside the NetCap pod. It can take up to 1 minute for changes to propagate. NetCap checks the local file at regular intervals. If the content has changed since the last update, NetCap parses the new configuration and restarts the affected threads to apply the changes.

See the NetCap Collector configuration example that creates four threads, one for each pair of source and destination:

yaml

In the example above, traffic from the target pgw-pfcp is saved to a PCAP file and sent to NATS. The PCAP file is stored in the NetCap Collect pod, in the location specified in the local.prefix field. Each PCAP file can hold 100,000 packets; a new file is created once this limit is reached. Rotation is enabled, so only two files will be kept. When the limit is reached, the older file is deleted. This means that traffic is collected continuously, but data is lost after 200,000 packets. NATS messages are sent with the subject:

text

The NATS URL is defined in the global configuration netcapCollector.nats.dataNATS.url as nats://cdm-local.cennso-system:4222.

Target sgi is sent only through NATS to NetCap Sink.

The last target, cgw-apn, is saved only to the local disk. The PCAP file is stored in the NetCap Collector pod at the location specified by the local.prefix field. It will collect up to 100,000 packets; after that, traffic will not be saved.

You can copy a PCAP file from the pod to an external machine for further analysis. For example, you can use this command:

bash

NetCap Sink configuration

You can configure NetCap Sink with these chart configuration parameters:

See the NetCap Sink configuration example that creates one thread for fetching the PCAP data from NATS to the .pcapng file:

yaml

NetCap Sink has JetStream management enabled, so it will create a JetStream named pcaps-test-cluster with the following settings:

  • Messages sent to the subject pcaps.test-cluster.> will be stored in the stream.
  • The maximum size for stored messages is 1 GiB (1,073,741,824 bytes).

The source is configured to use NATS in the JetStream mode, which means that NetCap Sink creates a durable NATS consumerOpens in a new tab. This allows the Sink to fetch all stored messages from the NATS server, even if the NetCap Sink is offline. In the pubsub mode, the Sink can only fetch messages sent while it is online, so any previous data is lost.

The source.nats.name is used to identify the HTTP endpoint attachment. The name must be unique in the NetCap Sink configuration; otherwise, only the first matching source will be used when attaching with Wireshark. To live-debug the PCAPs, use Wireshark:

bash

The destination is of file type, typically used to store PCAPs sent over NATS to a file.