https://github.com/spacebro/bro-recorder
record and playback a serie of spacebro events
https://github.com/spacebro/bro-recorder
Last synced: 8 months ago
JSON representation
record and playback a serie of spacebro events
- Host: GitHub
- URL: https://github.com/spacebro/bro-recorder
- Owner: spacebro
- Created: 2018-09-26T13:51:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T16:58:02.000Z (over 7 years ago)
- Last Synced: 2025-01-21T21:46:29.419Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bro-rercorder
Utility for recording and playback a serie of spacebro events.
### Usage
bro-rercorder is meant to be used as is. You install it, provide a custom configuration file and run it.
##### Install
```sh
$ git clone git@github.com:spacebro/bro-rercorder.git
$ cd bro-rercorder/
$ npm i
```
##### Eventually use custom settings
```sh
$ cp settings/settings.default.js settings/settings.js
$ vim settings/settings.js
```
### Run
##### Record
Stop recording by `ctrl+c`, `SIGTERM`, or by sending a `bro-recorder-stop` event to the channel.
```sh
$ node record.js
```
##### Plaback
```sh
$ node play.js
```
You can override the `settings.json` file with CLI args like so:
```sh
$ node play.js --play.filepath /path/to/my/file.json
```
### Settings
```js
{
"verbose": false, // does bro-rercorder logs everything or not
"record": {
"events": ["*"],
// an array of event names to listen to. you can use a wildcard,
// but bro-recorder won't be able to write the event name in the file
"folder": "./library", // path the folder where you want to write your files
"filename": "bro-recorder", // name of the file (no extension, bro-record will append '.json')
"overwrite": false
// if set to false, bro-recorder will add a timestamp to the filename
// so you can keep versions of your recording. if not, bro-recorder will simply overwrite the file.
},
"play": {
"filepath": "./library/bro-recorder.json", // path to the recording file
"loop": false // wether to loop the record or not
},
"spacebro": {
"host": "127.0.0.1", // host of your spacebro server
"port": 8888, // port of your spacebro server
"channelName": "bro-record" // channel name you want to use (optionnal)
}
}
```