Here you can find a few examples of monitoring NATS Streaming channels:
sum(nss_chan_subs_pending_count{channel="foo"}) by (client_id)
| import 'dotenv/config'; | |
| import { NestFactory } from '@nestjs/core'; | |
| import * as repl from 'repl'; | |
| import * as Logger from 'purdy'; | |
| const LOGGER_OPTIONS = { | |
| indent: 2, | |
| depth: 1, | |
| }; | 
| mkdir ~/docker | |
| chmod 777 ~/docker | |
| # Create network to all containers | |
| docker network create dockernet | |
| # Mongo | |
| docker run -v ~/docker/mongo/data:/data/db -p 27017:27017 --name mongodb --network dockernet -d mongo | |
| # CouchDB | 
| FROM ubuntu:latest | |
| RUN apt-get update | |
| RUN apt-get install -y --no-install-recommends apt-utils build-essential sudo git | |
| RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo | |
| USER docker | 
| require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); }); | 
| #!/bin/bash | |
| set -e | |
| CURRENT_NAME="CurentName" | |
| CURRENT_OTP="current_name" | |
| NEW_NAME="NewName" | |
| NEW_OTP="new_name" | 
| var udp = require('dgram'); | |
| // --------------------creating a udp server -------------------- | |
| // creating a udp server | |
| var server = udp.createSocket('udp4'); | |
| // emits when any error occurs | |
| server.on('error',function(error){ | |
| console.log('Error: ' + error); | 
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import random | |
| import sys | |
| EMPTY = ' ' | |
| WALL = '#' | |
| AGENT = 'o' | 
| # Retorna dados sobre o pregão | |
| http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDados.asp?CodDado=IBOV,ticker&CA=undefined | |
| # Retorna ações e seus últimos valores negociados | |
| http://www.bmfbovespa.com.br/Pregao-OnLine/ExecutaAcaoCarregarDados.asp?CodDado=Ticker | |
| # Retorna o histórico do dia de um papel | |
| http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDadosPapeis.asp?CodDado=petr4 | |
| # Retorna dados de um papel |