### Download and run Node.js quickstart service Source: https://grafana.com/docs/beyla/latest/quickstart/nodejs Download the Node.js service files and install dependencies to start the service. ```bash curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/nodejs/package.json curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/nodejs/quickstart.js npm install && npm start ``` -------------------------------- ### Run example script Source: https://grafana.com/docs/agent/latest/flow/tutorials/collecting-prometheus-metrics This command downloads and executes a setup script for Grafana Agent, Mimir, and Grafana using Docker Compose. Ensure Docker is installed and running. ```bash curl https://raw.githubusercontent.com/grafana/agent/main/docs/sources/flow/tutorials/assets/runt.sh -O && bash ./runt.sh agent.river ``` -------------------------------- ### Helm Installation Output Example Source: https://grafana.com/docs/helm-charts/tempo-distributed/next/get-started-helm-charts This is an example of the output you can expect after a successful Helm installation of Tempo. It includes deployment details and installed components. ```bash > helm -n tempo-test install tempo grafana-community/tempo-distributed -f custom.yaml W0210 15:02:09.901064 8613 warnings.go:70] spec.template.spec.topologySpreadConstraints[0].topologyKey: failure-domain.beta.kubernetes.io/zone is deprecated since v1.17; use "topology.kubernetes.io/zone" instead W0210 15:02:09.904082 8613 warnings.go:70] spec.template.spec.topologySpreadConstraints[0].topologyKey: failure-domain.beta.kubernetes.io/zone is deprecated since v1.17; use "topology.kubernetes.io/zone" instead W0210 15:02:09.906932 8613 warnings.go:70] spec.template.spec.topologySpreadConstraints[0].topologyKey: failure-domain.beta.kubernetes.io/zone is deprecated since v1.17; use "topology.kubernetes.io/zone" instead W0210 15:02:09.929946 8613 warnings.go:70] spec.template.spec.topologySpreadConstraints[0].topologyKey: failure-domain.beta.kubernetes.io/zone is deprecated since v1.17; use "topology.kubernetes.io/zone" instead W0210 15:02:09.930379 8613 warnings.go:70] spec.template.spec.topologySpreadConstraints[0].topologyKey: failure-domain.beta.kubernetes.io/zone is deprecated since v1.17; use "topology.kubernetes.io/zone" instead NAME: tempo LAST DEPLOYED: Fri May 31 15:02:08 2024 NAMESPACE: tempo-test STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: *********************************************************************** Welcome to Grafana Tempo Chart version: 1.10.1 Tempo version: 2.6.1 *********************************************************************** Installed components: * ingester * distributor * querier * query-frontend * compactor * memcached ``` -------------------------------- ### Example output of kubectl get all Source: https://grafana.com/docs/grafana/v13.1/setup-grafana/installation/kubernetes Sample output showing the status of pods, services, deployments, and replicasets for a Grafana installation. ```text NAME READY STATUS RESTARTS AGE pod/grafana-69946c9bd6-kwjb6 1/1 Running 0 7m27s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/grafana LoadBalancer 10.5.243.226 1.120.130.330 3000:31171/TCP 7m27s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/grafana 1/1 1 1 7m29s NAME DESIRED CURRENT READY AGE replicaset.apps/grafana-69946c9bd6 1 1 1 7m30s ``` -------------------------------- ### Configure gateway readiness probe path Source: https://grafana.com/docs/enterprise-logs/latest/setup/gel-helm-reference Sets the HTTP GET path for the gateway readiness probe. ```yaml "/ ``` -------------------------------- ### Configure bloomPlanner affinity Source: https://grafana.com/docs/enterprise-logs/latest/setup/gel-helm-reference Example configuration for implementing hard node anti-affinity for bloom-planner pods. ```yaml affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - bloom-planner topologyKey: "kubernetes.io/hostname" ``` -------------------------------- ### Configure compactor affinity Source: https://grafana.com/docs/enterprise-logs/latest/setup/gel-helm-reference Example configuration for setting hard node anti-affinity for compactor pods. ```yaml Hard node anti-affinity ``` -------------------------------- ### Ingress Hosts Definition Source: https://grafana.com/docs/enterprise-logs/latest/setup/gel-helm-reference Example of the hosts list configuration for the ingress resource. ```yaml [ "loki.example.com" ] ``` -------------------------------- ### Configure Hard Node Anti-Affinity Source: https://grafana.com/docs/enterprise-logs/latest/setup/gel-helm-reference Example configuration for setting hard node anti-affinity on gateway pods. ```yaml gateway: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - gel-gateway topologyKey: kubernetes.io/hostname ``` -------------------------------- ### Get Setup Data JSON Response Source: https://grafana.com/docs/k6/latest/reference/k6-rest-api Example JSON response for the setup data. It shows the structure of the setup data, including any custom data defined. ```json { "data": { "type": "setupData", "id": "default", "attributes": { "data": { "a": 1 } } } } ``` -------------------------------- ### Configure GET Helm chart values Source: https://grafana.com/docs/enterprise-traces/latest/setup/helm-chart A comprehensive example of a values.yaml file for a GET installation, including MinIO storage, multitenancy, and gateway settings. ```yaml # Specify the global domain for the cluster (in this case just local cluster mDNS) global: clusterDomain: "cluster.local" # Enable the Helm chart for GET installation # Configure the Helm chart for a Grafana Enterprise Traces installation. # We set the latest GET version as the image tag (2.8.4). enterprise: enabled: true image: tag: v2.8.4 # Enable multitenancy for GET (required) multitenancyEnabled: true # MinIO storage configuration # The installs a separate MinIO service/deployment into the same cluster and namespace as the GET install. # Note: MinIO should not be used for production environments. minio: enabled: true mode: standalone rootUser: grafana-tempo rootPassword: supersecret buckets: # Bucket for traces storage if enterprise.enabled is true - requires license. This is where all trace span information is stored. - name: enterprise-traces policy: none purge: false # Admin client bucket if enterprise.enabled is true - requires license. This is where tenant and administration information is stored. - name: enterprise-traces-admin policy: none purge: false # Changed the mc (the MinIO CLI client) config path to '/tmp' from '/etc' as '/etc' is only writable by root and OpenShift will not permit this. configPathmc: "/tmp/minio/mc/" storage: # Specifies traces storage location. # Uses the MinIO bucket configured for trace storage. trace: backend: s3 s3: access_key: "grafana-tempo" secret_key: "supersecret" bucket: "enterprise-traces" endpoint: "tempo-minio:9000" insecure: true # Specifies administration data storage location. # Uses the MinIO bucket configured for admin storage. admin: backend: s3 s3: access_key_id: "grafana-tempo" secret_access_key: "supersecret" bucket_name: "enterprise-traces-admin" endpoint: "tempo-minio:9000" insecure: true # Specifies which trace protocols to accept by the gateway. # Note: GET's Enterprise gateway will only accept OTLP over gRPC or HTTP. traces: otlp: http: enabled: true grpc: enabled: true # Configure the distributor component to log all received spans. distributor: config: log_received_spans: enabled: true # Specify the license. This is the base64 license text you have received from your Grafana Labs representative. license: contents: | LICENSEGOESHERE ``` -------------------------------- ### Initialize Go project Source: https://grafana.com/docs/learning-paths/build-dashboard-sdk/setup-project Commands to create a directory, initialize a Go module, install the SDK, and create the main entry file. ```bash mkdir my-dashboards && cd my-dashboards ``` ```bash go mod init my-dashboards ``` ```bash go get github.com/grafana/grafana-foundation-sdk/go@latest ``` ```bash touch main.go ``` -------------------------------- ### Quick vSphere Configuration Example Source: https://grafana.com/docs/agent/latest/static/configuration/integrations/integrations-next/vsphere-config A minimal example demonstrating how to configure the `vsphere_configs` integration, including essential connection details and autoscrape settings. ```yaml integrations: vsphere_configs: - vsphere_url: https://127.0.0.1:8989/sdk vsphere_user: user vsphere_password: pass request_chunk_size: 256 collect_concurrency: 8 instance: vsphere autoscrape: enable: true metrics_instance: default metrics: wal_directory: /tmp/grafana-agent-wal server: log_level: debug ``` -------------------------------- ### Sample Application Deployment Output Source: https://grafana.com/docs/loki/latest/get-started/quick-start/tutorial Example output indicating the successful startup of the sample application's containers. ```console ✔ Container greenhouse-websocket_service-1 Started 0.7s ✔ Container greenhouse-db-1 Started 0.7s ✔ Container greenhouse-user_service-1 Started 0.8s ✔ Container greenhouse-bug_service-1 Started 0.8s ✔ Container greenhouse-plant_service-1 Started 0.8s ✔ Container greenhouse-simulation_service-1 Started 0.7s ✔ Container greenhouse-main_app-1 Started 0.7s ``` -------------------------------- ### Clone and Open xk6-quickstart Repository Source: https://grafana.com/docs/k6/latest/extensions/create/quickstart Clone the repository to your local machine and open it in Visual Studio Code. This setup is necessary to begin developing your k6 extension. ```bash git clone https://github.com/USER/xk6-quickstart.git code xk6-quickstart ``` -------------------------------- ### Install and Run Netdata Source: https://grafana.com/docs/k6/latest/results-output/real-time/netdata Use the kickstart script to easily download and run Netdata on your system. This command fetches and executes the installation script. ```bash bash <(curl -Ss https://my-netdata.io/kickstart.sh) ``` -------------------------------- ### Tempo CLI Example List Blocks Source: https://grafana.com/docs/tempo/latest/operations/tempo_cli Example of listing blocks for a tenant, specifying a configuration file. ```bash tempo-cli list blocks -c ./tempo.yaml single-tenant ``` -------------------------------- ### Get Response Body as ArrayBuffer Source: https://grafana.com/docs/k6/latest/javascript-api/k6-browser/response/body This example demonstrates how to navigate to a URL and retrieve the response body as an ArrayBuffer using `res.body()`. It includes basic setup for a k6 browser test and proper page handling. ```javascript import { browser } from 'k6/browser'; export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium', }, }, }, }, }; export default async function () { const page = await browser.newPage(); try { const res = await page.goto('https://test.k6.io/'); const body = await res.body(); // Refer to https://github.com/grafana/k6/issues/2440 on decoding the body to a string. } finally { await page.close(); } } ``` -------------------------------- ### Example configuration settings Source: https://grafana.com/docs/grafana/v13.1/setup-grafana/configure-grafana Sample configuration sections used to demonstrate environment variable mapping. ```ini # default section instance_name = ${HOSTNAME} [security] admin_user = admin [auth.google] client_secret = 0ldS3cretKey [plugin.grafana-image-renderer] rendering_ignore_https_errors = true [feature_toggles] newNavigation = true ``` -------------------------------- ### Install or upgrade GET with Helm Source: https://grafana.com/docs/enterprise-traces/latest/setup/helm-chart Use this command to install or upgrade the GET deployment using a custom configuration file. ```shell helm -n enterprise-traces install tempo grafana/tempo-distributed --version 1.48.1 -f custom.yaml ``` -------------------------------- ### Get preceding siblings with Selection.prevAll() Source: https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-prevall Use Selection.prevAll() to find all preceding sibling elements of an element, starting from the element itself and moving backward through the DOM tree. This example demonstrates finding all preceding siblings of an element with the class 'third-item'. ```javascript import { parseHTML } from 'k6/html'; import { sleep } from 'k6'; export default function () { const content = `