Skip to content

Instantly share code, notes, and snippets.

#connect cluster('demo12.westus.kusto.windows.net').database('Datasets')
https://demo12.westus.kusto.windows.net
// 1. Count of events, ~165M
nyc_taxi
| count
// 2. Show random pickups
@cosh
cosh / prometheus.yml
Created July 19, 2019 07:36
Remote read and write config for Prometheus
# my global config
global:
scrape_interval: 1m # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 1m # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
@cosh
cosh / ddl.kql
Created July 19, 2019 07:25
DDL for prometheus to ADX
//Table for raw data and the corresponding mapping
.create table RawData (d: dynamic)
.create table RawData ingestion json mapping "RawDataMapping" '[{ "column" : "d", "datatype" : "dynamic", "path" : "$"}]'
//Table for the remote_read endpoint (optimized for quering time series and labels.
.create table SearchExplosion (ts: datetime, label: dynamic, timeseries: dynamic, value: real)
//Update policy RawData -> SearchExplosion
.create function Update_SearchExplosion()
{
@cosh
cosh / gist:85127995da16f2709809
Created September 1, 2014 11:12
cassandra cluster on google compute engine cluster
Datacenter: ZONE1
=================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 10.240.162.97 1.63 GB 256 2.0% 4f340452-bff4-4868-8f7a-be3b5e1afdb3 RAC1
UN 10.240.178.204 1.74 GB 256 2.1% c64b07c2-fb2a-4b50-ab84-814de4c6ed2a RAC1
UN 10.240.155.137 1.79 GB 256 2.2% 9cedb73c-ea1b-4b1b-9300-98bf78eb3762 RAC1
UN 10.240.159.76 1.73 GB 256 2.1% 2d20c83d-1eee-4063-a4da-4404954e3f47 RAC1
UN 10.240.83.151 1.78 GB 256 2.2% 876088a5-bc9e-41a4-83ea-8c6a9e722867 RAC1
@cosh
cosh / gist:5e7446398579da80bbde
Last active August 29, 2015 14:05
cassandra benchmark on google compute engine
{\"totalCassandraClientCalls\":100000,\"totalStatements\":10000000,\"clientCallsPerSecond\":151.76885641078067,\"statementsPerSecond\":15176.885641078068,\"meanlatency_clientCall\":38.13840072274,\"medianlatency_clientCall\":263.21751,\"ninetyFiveTh_clientCall\":12.440169,\"ninetyNineTh_clientCall\":130.07639799999998,\"elapsed_ms\":658896.0,\"benchmarkHostName\":\"bench-node-eu0101\",\"errors\":[],\"additionalInformation\":null}' | cat >> ~/benchresults.txt ", "delta": "0:00:00.011744", "end": "2014-09-01 10:27:22.993000", "rc": 0, "start": "2014-09-01 10:27:22.981256", "stderr": "", "stdout": ""}
{\"totalCassandraClientCalls\":100000,\"totalStatements\":10000000,\"clientCallsPerSecond\":150.63453639965792,\"statementsPerSecond\":15063.453639965794,\"meanlatency_clientCall\":37.44866236647,\"medianlatency_clientCall\":15.516015,\"ninetyFiveTh_clientCall\":187.79799799999998,\"ninetyNineTh_clientCall\":4.8996319999999995,\"elapsed_ms\":663858.0,\"benchmarkHostName\":\"bench-node-eu0102\",\"errors\":[],\"addit