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

@vectraai/kibana-vc

v0.2.5

Published

This is a CLI tool that: * Source controls Kibana default dashboards * Fetching remote Kibana state * Deploying new Kibana state

Downloads

3

Readme

Kibana-dashboard

This is a CLI tool that:

  • Source controls Kibana default dashboards
  • Fetching remote Kibana state
  • Deploying new Kibana state

Notes

  • Customers would be able to create their own dashboards and new deployment won't affect them
  • All the changes customers do on a default Vectra's dashboards would be overwritten when deploying
  • If customers want to modify Vectra's dashboard and keep the changes, they will need to clone them. It is easy to do with Kibana, just click Save and tick create new Dashboard. That will actually clone the dashboard and all the future deployments won't affect cloned Dashboards. Cloned Dashboard won't receive any updates

Installation

npm i -g @vectraai/kibana-vc

Usage

Run kibana-vc --help for a usage explanation

kibana-vc --help

  Usage: kibana-vc [options] [command]

  Options:

    -V, --version                     output the version number
    -h, --help                        output usage information

  Commands:

    deploy [options] <stateFilePath>

Fetch

Run kibana-vc fetch --help for a fetch explanation

kibana-vc fetch --help

  Usage: fetch [options]

  Options:

    -h, --host [url]                 ElasticSearch host (default: http://127.0.0.1)
    -p, --port [port]                ElasticSearch port (default: 9200)
    -i, --kibanaIndex [kibanaIndex]  Kibana Index (default: .kibana)
    -P, --pretty-print               Pretty Print output
    -h, --help                       output usage information

getting the state of the target kibana and writing into the stdout We can redirect to a file

kibana-vc fetch > somefilename.json

Fetch command generates a file ready to be deployed. We keep track of the category, certainty, description, threat fields in config.notification for searches on account of Vectra provided searches Objects of type config are ignored by this tool.

Fetch by id

Run kibana-vc fetch_ids --help for an explanation

kibana-vc fetch_ids --help

 Usage: fetch_ids [options]

  Options:

    -h, --host [url]                 ElasticSearch host (default: http://127.0.0.1)
    -p, --port [port]                ElasticSearch port (default: 9200)
    -i, --kibanaIndex [kibanaIndex]  Kibana Index (default: .kibana)
    -I, --id [id]                    Individual ids to fetch (default: )
    -h, --help                       output usage information

In short: kibana-vs fetch_ids --id "some-id" --id "some-other-id" will return a json array with the objects from ES if found If no id is specified, it'll return the entire kibana state

Deploy

Run kibana-vc deploy --help for a deploy explanation

kibana-vc deploy --help

  Usage: deploy [options] <stateFilePath>

  Options:

    -h, --host [url]                 ElasticSearch host (default: http://127.0.0.1)
    -p, --port [port]                ElasticSearch port (default: 9200)
    -i, --kibanaIndex [kibanaIndex]  Kibana Index (default: .kibana)
    --dry-run                        don't make any changes to anything
    --force-update                   force update of kibana state (default: false)
    -h, --help                       output usage information

Examples

Get the state from the remote running Elastic Search. kibana-vc fetch -h "ELASTIC_HOST" > ${pathToStateFile}

Deploy to localhost kibana-vc deploy ${pathToStateFile}

Deploy to remote running ES

kibana-vc deploy -h "ELASTIC_HOST" ${pathToStateFile}

Objects of type config are ignored by this tool. We update records based on a checksum of the _source object and the description field in config.notification if one is present

Kibana state file

State file is a json document that represent Kibana state. We are getting it from "Dev" Kibana and version controling it using git (TODO). Example statefile with initial Kibana is located in src/__tests__/fixtures/kibana_initial_state.json

Dev infrastructure

Run docker-compose up to spin up local kibana + elasticsearch

TODO:

  • Support S3 as a state storage
  • Write statefile in kibana index in a special document for kibana-vc. That way we can track state more easily and be independent of customers changes
  • More verbose diff (like tf does)
  • Fully featured dryRun with initialization support
  • Version Control with git
  • Fetch Remote State
  • Support Multiple config files
  • Support Multiple Kibana versions