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

tsa-plugin-grafana

v1.1.3

Published

A tsa-cli plugin to source data from Grafana.

Downloads

12

Readme

tsa-plugin-grafana

Grafana plugin for tsa.

Installation

npm i -g @tsa-tools/cli tsa-plugin-grafana

Obtain your authentication value.

Usage

With no configuration

tsa --plugin tsa-plugin-grafana --host my.grafana.host.com --auth abc123 --instance [east,west]-web-node[0{1-9},{10-20}] --domain .my.site.com --since 1d

Set some defaults to make repeat calls easier

tsa config --default plugin=tsa-plugin-grafana
tsa config --alias production=my.grafana.host.com
tsa config --default host=production
tsa config --default domain=.my.site.com
tsa config --default auth=abc123

Ah, that is easier

tsa --instance awesome-web-node --since 1d

Query multiple instances using template expansion

tsa --instance [east,west]-web-node[0{1-9},{10-20}]

Output looks like

web-node05: Min: 5 Max: 80 Mean: 36.60696517412935
web-node03: Min: 7 Max: 90 Mean: 39.6407960199005
web-node04: Min: 8 Max: 99 Mean: 40.99800995024876

Template Expansion

  • [] indicates a group to expand.
  • Within a group, separate expansions by ,
  • Within an expansion, use {num-num} to expand an integer range.

Examples

Input

[one,two,three]-thing[0{1-2},-special]

Produces

one-thing01
one-thing02
one-thing-special
two-thing01
two-thing02
two-thing-special
three-thing01
three-thing02
three-thing-special

Auth

  • Open Dev Tools in a browser and capture network traffic while expanding/changing metrics.
  • Look at the Cookie header on a request to query_range. One of the entries should set grafana_session.
  • Copy this value and pass it via --auth, or, run tsa config --default auth=value