Skip to content

1.3 CouchDB Sync

cloudtracer edited this page Dec 10, 2016 · 2 revisions

Save Your Data To CouchDB

ThreatPinch uses PouchDB to cache and keep history of all the request lookups, storing this data locally in your browser. PouchDB comes with awesome out of the box replication functionality with CouchDB. We don't know much about CouchDB right now other than we can push our data to it, but the multi-master replication model is intriguing and very inline with collecting and sharing threat data.

Step 1: Create a database in your CouchDB named "threatpinch"

Step 2: Enable CouchDB syncing in the Developers Options page by entering the URL of your CouchDB server. The URL would look something like this:

https://[USERNAME]:[PASSWORD]@mycouchdb.fqdn.com/threatpinch

That's all! Now all the data collected by the ThreatPinch plugin will be replicated to your CouchDB. ThreatPinch not only stores the normalized, cleaned data you define in the Lookup Requests, but if the data came from a REST API the entire JSON response is stored too. API requests are precious, cherish their limited usage by keeping them always.

By default, replication is set to occur every 30 minutes.

Clone this wiki locally