Skip to content

Instantly share code, notes, and snippets.

View ivanahuckova's full-sized avatar

Ivana Huckova ivanahuckova

View GitHub Profile
{
"__inputs": [
{
"name": "DS_GRAFANACLOUD-OBIRDABILITY-LOGS",
"label": "grafanacloud-obirdability-logs",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
},

Resources for cold plunges monitoring using Google Sheets and Grafana

You can find here

{
"__inputs": [
{
"name": "DS_COLD-PLUNGE-FORM",
"label": "cold-plunge-form",
"description": "",
"type": "datasource",
"pluginId": "grafana-googlesheets-datasource",
"pluginName": "Google Sheets"
}
@ivanahuckova
ivanahuckova / dashboard.json
Last active November 23, 2023 12:41
Loki test variables dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@ivanahuckova
ivanahuckova / logsAPIs.md
Last active August 2, 2023 13:58
logs APIs

aliases:

  • ../../../plugins/add-support-for-log-queries/ description: Add features to log queries in Explore. keywords:
  • grafana
  • plugins
  • plugin
  • queries
  • explore queries
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
import { of } from 'rxjs';
import { map, toArray, mergeMap, delay, catchError } from 'rxjs/operators';
describe('subscribe & assert testing in RxJS', () => {
it('should compare each emitted value', () => {
const source$ = of(1,2,3)
const final$ = source$.pipe(map(value => value * 10))
// array with expected values
const expected = [10, 20, 30]

Elasticsearch

Elasticsearch API that we use in Grafana

/_msearch POST

Multi search API. Executes several searches with a single API request.

Query parameters that we add:

import { TestScheduler } from 'rxjs/testing';
import { map, concatWith, take, delay } from 'rxjs/operators';
import { from, of, catchError, interval } from 'rxjs';
describe('Marble testing', () => {
let testScheduler;
beforeEach(() => {
testScheduler = new TestScheduler((actual, expected) => {
expect(actual).toEqual(expected);
const express = require('express');
const cors = require('cors');
const faker = require('faker');
const app = express();
const data = [];
for (let i = 0; i < 200000; i++) {
let firstName = faker.name.firstName();