> For the complete documentation index, see [llms.txt](https://docs.netcap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.netcap.io/v0.4.1/metrics.md).

# Metrics

## Introduction

Netcap now support exporting prometheus metrics about its go runtime, the collection process and the audit records itself. This feature can be used with the **net.export** tool.

## Configuration

Metrics are served by default on **127.0.0.1:7777/metrics**. Configure a prometheus instance to scrape it:

```yaml
# reference: https://prometheus.io/docs/prometheus/latest/configuration/configuration/

global:
  scrape_interval: 15s
  scrape_timeout: 15s
  #evaluation_interval: 15s

scrape_configs:
  # process_ metrics
  - job_name: netcap
    metrics_path: /metrics
    scheme: http
    static_configs:
      - targets:
        - 127.0.0.1:7777
```

## Usage

Export a PCAP dumpfile and serve metrics .

```
$ net.export -r 2017-09-19-traffic-analysis-exercise.pcap
```

Capture and export traffic live from the named interface:

```
$ net.export -iface en0
```

Export a specific audit record file:

```
$ net.export -r HTTP.ncap.gz
```

Export all audit record files in the current directory:

```
$ net.export .
```

## Overview Dashboard Preview

![Grafana Dashboard Overview](/files/-LqkPRu3NbjO2GXz3Jei)

## TCP Dashboard Preview

![Grafana Dashboard TCP](/files/-LqkPRu5fN9Ey985AMOD)

## HTTP Dashboard Preview

![Grafana Dashboard HTTP](/files/-LqkPRu7v-GhYWl_OOHq)
