This custom emnify plugin facilitates with the extraction and download of PCAP files based on PCAP Parser / IMSI-based Observability.
It is built as a Grafana app plugin, to package the two required plugins:
- PCAP Extractor data source
- PCAP Download button panel
This plugin also requires the PCAP Extractor Step Function to be deployed.
The data source shall be configured for automated deployment using Grafana provisioning:
datasources:
- name: 'PCAP Extractor'
type: 'emnify-pcapextractor-datasource'
jsonData:
s3Bucket: my-pcap-extractor
stepFunctionArn: arn:aws:states:us-onfire-1:12345678912:stateMachine:my-pcap-extractorRequired IAM permissions
- Step Functions
states:DescribeStateMachinestates:StartExecution
- S3
s3:GetObject
- Query PCAP data, make sure that results include columns
source_fileandsource_packet_number. - Add a panel of type
PCAP download. - Configure the panel and pick the
emnify-pcap-extractordata source that should be available after successful provisioning.
| Panel appearance | Panel configuration |
|---|---|
![]() |
![]() |
-
Install dependencies
npm install
-
Build plugin in development mode and run in watch mode
npm run dev
-
Build plugin in production mode
npm run build
-
Run the tests (using Jest)
# Runs the tests and watches for changes, requires git init first npm run test # Exits after running all the tests npm run test:ci
-
Spin up a Grafana instance and run the plugin inside it (using Docker)
npm run server
-
Run the E2E tests (using Playwright)
# Spins up a Grafana instance first that we tests against npm run server # If you wish to start a certain Grafana version. If not specified will use latest by default GRAFANA_VERSION=11.3.0 npm run server # Starts the tests npm run e2e
-
Run the linter
npm run lint # or npm run lint:fix

