npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bbdtools

v1.0.4

Published

Prototype tools for dev-ops to use to identify and diagnose issues with Destinations:

Downloads

2

Readme

Destination Tools

Prototype tools for dev-ops to use to identify and diagnose issues with Destinations:

  • Keen
  • DynamoDb
  • BigTable

Pre-Requisites

This application requires node.js version 11 or greater, and yarn if you want to install from the repository.

Installation

You can install from the repository and use locally.

# clone the repository
git clone [email protected]:bitbrew/destination-tools
cd desination-tools

# install dependencies
yarn

# run
./bin/dtools ls

You can also install an application from npm:

# installs 'globally' i.e. for node to run from the command line
npm i -g bbdtools

# run
dtools ls

Usage

Configuration

You can change the following parameters:

  • Redis Hostname and Port
  • Number of Kafka partitions in destination topics
# ordered 3 parameters, host, port and partitions
dtools config 127.0.0.1 6379 50

Example output:

Successfully changed configuration to:
Number of partitons: 50
Redis host:          127.0.0.1
Redis port:          6379

List all destinations

dtools ls

Example output:

destinationId                         closed  open  retrying  clearing  cancelled
------------------------------------  ------  ----  --------  --------  ---------
02838e3e-e1c5-434b-b91a-d03abffbbfce  50      0     0         0         0
3eeb7885-ee2a-46de-b6e1-98b202e1a486  0       50    0         0         0
86a6c111-7de6-4421-934d-81ea4fce43ee  0       1     1         49        0

Get destination status

dtools status 3eeb7885-ee2a-46de-b6e1-98b202e1a486

Example output:

Total sent records:               0
Current queued batches (queued):  125
Current queued records (rqueued): 125

Details

ptn  state  sent  retry  queued  rqueued  offset
---  -----  ----  -----  ------  -------  ------
0    Open         ✔      2       2        2
1    Open         ✔      2       2        2
2    Open         ✔      2       2        2
3    Open         ✔      2       2        2
4    Open         ✔      2       2        2
5    Open         ✔      2       2        2

Get a retry batch from a partition

dtools retry 3eeb7885-ee2a-46de-b6e1-98b202e1a486 44

Example output:

{
  "retryBatch": {
    "dipId": {
      "destinationId": "3eeb7885-ee2a-46de-b6e1-98b202e1a486",
      "partition": 44
    },
    "tenantId": "kafka-fill",
    "records": [
      {
        "eventId": "304dd66c-30e5-4e52-af8c-86c97f08f867",
        "messageId": "985c52fc-9154-4b13-a41b-d44c97e6e25a",
        "deviceId": "0000001000",
        "ruleId": "rule-id",
        "ingestionTimestamp": "2019-03-19T14:09:54.000Z",
        "payload": "{\"payload\":\"KknPvQvQV3yDklUaoztwbspMtYC3EGTzgvvkKJWJVxZc0lSWsWxSapwkTayfn0P488WX301FZEikA4OZ8FkTdiiSj7COqO9qNDi2\"}"
      }
    ],
    "retryCount": 32,
    "liveSendAt": "2019-03-19T14:12:52.000Z",
    "retryAfter": "2019-03-19T19:28:21.000Z"
  }
}

List pod assigned to partition

dtools pods

Example output

sender  ptn  pod
------  ---  --------------------------------------------------
Dynamo  0    dynamo-db-sender-v1-18-0-snapshot-5d98c55d84-dpznk
Dynamo  1    dynamo-db-sender-v1-18-0-snapshot-5d98c55d84-dpznk
Dynamo  2    dynamo-db-sender-v1-18-0-snapshot-5d98c55d84-dpznk
Dynamo  3    dynamo-db-sender-v1-18-0-snapshot-5d98c55d84-dpznk
Dynamo  4    dynamo-db-sender-v1-18-0-snapshot-5d98c55d84-dpznk
...