diff --git a/.editorconfig b/.editorconfig index 12808c50..72e61c1b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,7 +19,3 @@ trim_trailing_whitespace = false [*.{yml,yaml}] indent_size = 2 - -[{Makefile,**.mk}] -# Use tabs for indentation (Makefiles require tabs) -indent_style = tab diff --git a/.env.sample b/.env.sample index 2be663dc..9cce0552 100644 --- a/.env.sample +++ b/.env.sample @@ -2,10 +2,7 @@ KEYPAIR=generated-p2p-secret NATS_URL=nats://localhost:4222 NATS_ADMIN_PASS=generated-secret -NATS_PUBLIC_PASS=temp-public-pass -SURREALDB_URL=127.0.0.1:8000 -SURREALDB_USER=root -SURREALDB_PASS=root +NATS_SYSTEM_PASS=generated-secret USE_ELASTIC_LOGGING=false USE_METRICS=true PUBLISHER_MAX_THREADS=16 diff --git a/.github/actions/docker-publish/action.yaml b/.github/actions/docker-publish/action.yaml index 480c1f14..36645e1d 100644 --- a/.github/actions/docker-publish/action.yaml +++ b/.github/actions/docker-publish/action.yaml @@ -52,9 +52,10 @@ runs: username: ${{ inputs.username }} password: ${{ inputs.password }} logout: false + - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: | ${{ inputs.image }} @@ -62,8 +63,10 @@ runs: type=ref,event=branch type=sha,prefix= type=semver,pattern={{raw}} + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Build and push the image to ghcr.io uses: docker/build-push-action@v6 id: publish @@ -73,10 +76,24 @@ runs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} build-args: ${{ inputs.build-args }} cache-from: type=gha cache-to: type=gha,mode=max + - id: imageOutput shell: bash run: |- echo "imageUrl=${{ fromJSON(steps.publish.outputs.metadata)['image.name'] }}" >> $GITHUB_OUTPUT + + - name: Build Summary + shell: bash + run: |- + echo "---" >> $GITHUB_STEP_SUMMARY + echo "### Docker Build Summary ๐Ÿณ" >> $GITHUB_STEP_SUMMARY + echo "| Detail | Value |" >> $GITHUB_STEP_SUMMARY + echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY + echo "| Image | \`${{ inputs.image }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Tags | \`$(echo ${{ steps.meta.outputs.tags }} | tr '\n' ' ')\` |" >> $GITHUB_STEP_SUMMARY + echo "| Digest | \`${{ steps.publish.outputs.digest }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Image ID | \`${{ steps.publish.outputs.imageid }}\` |" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index afb3d3e7..61a4577c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -187,6 +187,25 @@ jobs: - name: Install dependencies run: cargo fetch + test-helm: + needs: install-deps + name: Test Helm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: "latest" + + - name: Install helm unittest plugin + run: | + helm plugin install https://github.com/helm-unittest/helm-unittest.git + + - name: Run Helm unit tests + run: | + make helm-test + test: needs: install-deps name: Test ${{ matrix.package }} @@ -200,7 +219,6 @@ jobs: matrix: package: # - fuel-data-parser - # - fuel-indexer - fuel-streams - fuel-streams-core - fuel-streams-macros @@ -223,14 +241,14 @@ jobs: - name: Start Nats run: | - make start/nats + make start-nats - name: Run tests - run: make test PROFILE=ci PACKAGE=${{ matrix.package }} + run: make test PACKAGE=${{ matrix.package }} PROFILE=ci - name: Stop Nats if: always() - run: make stop/nats + run: make stop-nats build: needs: install-deps @@ -347,6 +365,8 @@ jobs: contains(github.event.head_commit.message, 'ci(release): Preparing')) || github.event_name == 'workflow_dispatch' needs: + - test + - test-helm - build runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/cleanup_artifacts.yaml b/.github/workflows/cleanup_artifacts.yaml index d7b8a281..2b1d4911 100644 --- a/.github/workflows/cleanup_artifacts.yaml +++ b/.github/workflows/cleanup_artifacts.yaml @@ -37,7 +37,6 @@ jobs: # Debug information echo "Repository Owner: ${REPO_OWNER}" echo "Repository Name: ${REPO_NAME}" - make cleanup_artifacts \ REPO_OWNER="${REPO_OWNER}" \ REPO_NAME="${REPO_NAME}" \ diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index a46ffa36..74f5167e 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -27,19 +27,16 @@ jobs: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 - - name: Build and push Fuel publisher image + + - name: Get short SHA + id: sha + run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Build and push Docker (${{ steps.sha.outputs.short_sha }}) uses: ./.github/actions/docker-publish id: publish-fuel-streams-nats with: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} image: ghcr.io/fuellabs/fuel-streams-publisher - dockerfile: docker/fuel-streams-publisher.Dockerfile - - name: Build and push fule ws streams image - uses: ./.github/actions/docker-publish - id: publish-fuel-ws-nats - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - image: ghcr.io/fuellabs/fuel-streams-ws - dockerfile: docker/fuel-streams-ws.Dockerfile + dockerfile: cluster/docker/fuel-streams-publisher.Dockerfile diff --git a/.github/workflows/helm_publish.yaml b/.github/workflows/helm_publish.yaml index 452cb385..932d54f6 100644 --- a/.github/workflows/helm_publish.yaml +++ b/.github/workflows/helm_publish.yaml @@ -1,43 +1,88 @@ -name: Build and publish Helm Chart +name: Build and Publish Helm Chart on: workflow_dispatch: + inputs: + chart: + description: "Select the Helm chart to deploy" + required: true + type: choice + options: + - fuel-streams-publisher + - fuel-streams push: branches: - main paths: - cluster/charts/fuel-streams-publisher/Chart.yaml - - cluster/charts/fuel-streams-ws/Chart.yaml - - cluster/charts/fuel-nats/Chart.yaml + - cluster/charts/fuel-streams/Chart.yaml permissions: contents: read jobs: helm-release: - name: Build Helm Chart + name: Build Helm Charts runs-on: ubuntu-latest if: | + github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && github.event.action == 'published') || - github.ref == 'refs/heads/main' || github.event_name == 'pull_request' + github.ref == 'refs/heads/main' || + github.event_name == 'pull_request' permissions: contents: read packages: write - strategy: - matrix: - chart: - - fuel-streams-publisher - - fuel-streams-ws - - fuel-nats steps: - name: Check out code uses: actions/checkout@v4 - - name: Helm Dependencies Update For fuel-nats + - name: Determine charts to process + id: charts run: | - cd cluster/charts/${{ matrix.chart }} && helm dependency update + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "charts=${{ github.event.inputs.chart }}" >> $GITHUB_OUTPUT + else + echo "charts=fuel-streams-publisher fuel-streams" >> $GITHUB_OUTPUT + fi + + - name: Validate Chart Names + run: | + for chart in ${{ steps.charts.outputs.charts }}; do + if [ ! -d "cluster/charts/$chart" ]; then + echo "Error: Chart '$chart' does not exist." + exit 1 + fi + done + + - name: Helm Dependencies Update + run: | + set -e + for chart in ${{ steps.charts.outputs.charts }}; do + echo "Updating dependencies for $chart" + helm dependency update cluster/charts/$chart + done + + - name: Get chart versions + id: versions + run: | + publisher_version=$(awk '/^version:/ {print $2}' cluster/charts/fuel-streams-publisher/Chart.yaml) + streams_version=$(awk '/^version:/ {print $2}' cluster/charts/fuel-streams/Chart.yaml) + echo "publisher_version=$publisher_version" >> $GITHUB_OUTPUT + echo "streams_version=$streams_version" >> $GITHUB_OUTPUT + + - name: "Build chart: [fuel-streams-publisher v${{ steps.versions.outputs.publisher_version }}]" + if: contains(steps.charts.outputs.charts, 'fuel-streams-publisher') + uses: bsord/helm-push@v4.1.0 + with: + useOCIRegistry: true + registry-url: oci://ghcr.io/fuellabs/helmcharts + username: ${{ github.repository_owner }} + access-token: ${{ secrets.GITHUB_TOKEN }} + force: true + chart-folder: ./cluster/charts/fuel-streams-publisher - - name: Package and Push Charts + - name: "Build chart: [fuel-streams v${{ steps.versions.outputs.streams_version }}]" + if: contains(steps.charts.outputs.charts, 'fuel-streams') uses: bsord/helm-push@v4.1.0 with: useOCIRegistry: true @@ -45,4 +90,20 @@ jobs: username: ${{ github.repository_owner }} access-token: ${{ secrets.GITHUB_TOKEN }} force: true - chart-folder: ./cluster/charts/${{ matrix.chart }} + chart-folder: ./cluster/charts/fuel-streams + + - name: Build Summary + run: |- + echo "### Helm Charts Build Summary ๐Ÿ“Š" >> $GITHUB_STEP_SUMMARY + echo "| Chart | Version | Status |" >> $GITHUB_STEP_SUMMARY + echo "|-------|---------|--------|" >> $GITHUB_STEP_SUMMARY + + for chart in ${{ steps.charts.outputs.charts }}; do + version="" + if [ "$chart" = "fuel-streams-publisher" ]; then + version="${{ steps.versions.outputs.publisher_version }}" + elif [ "$chart" = "fuel-streams" ]; then + version="${{ steps.versions.outputs.streams_version }}" + fi + echo "| $chart | $version | โœ… Published |" >> $GITHUB_STEP_SUMMARY + done diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 1e8cb9f9..4dbc4f19 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -26,9 +26,7 @@ jobs: echo "$1=${!1:-$2}" >> $GITHUB_ENV echo "$1=${!1:-$2}" >> .env } - set_env_var "NATS_URL" "nats://127.0.0.1:4222" - set_env_var "NATS_ADMIN_PASS" "default_pass" - set_env_var "NATS_PUBLIC_PASS" "temp-public-pass" + set_env_var "NATS_ADMIN_PASS" "null" - name: Install toolchain uses: dtolnay/rust-toolchain@master diff --git a/.github/workflows/update_deps.yaml b/.github/workflows/update_deps.yaml index 2edcfea4..17f444b7 100644 --- a/.github/workflows/update_deps.yaml +++ b/.github/workflows/update_deps.yaml @@ -43,7 +43,11 @@ jobs: toolchain: stable - name: Update Cargo Dependencies - run: cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log + run: | + cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log + if [ ! -s cargo_update.log ]; then + echo "No updates found" > cargo_update.log + fi - name: Cargo audit dependencies uses: actions-rs/audit-check@v1.2.0 @@ -106,9 +110,9 @@ jobs: title: ${{ env.PR_TITLE }} body: | ${{ env.PR_MESSAGE }} - '```txt' + ```txt $(cat cargo_update.log) - '```' + ``` branch: cargo_update labels: dependencies env: diff --git a/.gitignore b/.gitignore index 7fdbbb55..e44210bb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ profile.json coverage/ docs/ **/**/charts/**.tgz -values-publisher-env.yaml +values-publisher-secrets.yaml diff --git a/.typos.toml b/.typos.toml index ead5340b..97819a36 100644 --- a/.typos.toml +++ b/.typos.toml @@ -4,7 +4,6 @@ extend-exclude = [ "crates/fuel-streams-publisher/README.md", "crates/fuel-streams-publisher/src/elastic.rs", "crates/fuel-streams-ws/README.md", - "crates/fuel-indexer/*", "docker/chain-config", "docker/monitoring", "cluster", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90df9089..3c46c7e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,11 @@ Most projects under the umbrella of data systems are written in Rust, so we pref - [Make](https://www.gnu.org/software/make/) - [Pre-commit](https://pre-commit.com/#install) - [NodeJS](https://nodejs.org/en/download/) +- [PNPM](https://pnpm.io/installation) +- [NATS](https://nats.io/download/) +- [Tilt](https://docs.tilt.dev/install.html) +- [Minikube](https://minikube.sigs.k8s.io/docs/start/) +- [Kubernetes](https://kubernetes.io/) ## ๐Ÿ“Ÿ Setting up @@ -27,17 +32,36 @@ Now, install the necessary tools to ensure code quality and standards. Use Make make setup ``` +After setup, you'll need to create the environment configuration. First, make sure you have an Infura API key: + +1. Go to [Infura](https://infura.io/) and create an account +2. Create a new project +3. Copy your project ID (API key) + +Then run the environment setup command: + +```sh +make create-env +``` + +The script will prompt you to enter your Infura API key and will automatically: + +- Generate a new keypair for P2P communication +- Create a `.env` file from the template +- Configure the environment with your Infura key and the generated keypair + You can check the [./scripts/setup.sh](./scripts/setup.sh) file to see what is being installed on your machine. ## ๐Ÿ“‚ Project Structure -Here's a brief overview of the project's directory structure: +Here's an overview of the project's directory structure: - `crates/`: Contains the main Rust crates for the project -- `benches/`: Benchmarking code -- `docker/`: Docker-related files -- `helm/`: Helm charts for Kubernetes deployment -- `scripts/`: Utility scripts +- `benches/`: Benchmarking code and performance tests +- `tests/`: Integration and end-to-end tests +- `examples/`: Example code and usage demonstrations +- `cluster/`: Kubernetes cluster configuration and deployment files +- `scripts/`: Utility scripts for setup, deployment, and maintenance ## ๐Ÿ“‡ Code conventions @@ -76,19 +100,41 @@ This is a general rule used for commits. When you are creating a PR, ensure that To make your life easier, here are some commands to run common tasks in this project: -| Command | Description | -| ---------------- | ----------------------------------------------------- | -| `make build` | Build the project with default settings | -| `make clean` | Clean the build artifacts and release directory | -| `make dev-watch` | Run the project in development mode with auto-reload | -| `make dev` | Run the project in development mode | -| `make fmt` | Format the code and Markdown files | -| `make install` | Fetch the project dependencies using `cargo fetch` | -| `make lint` | Perform linting checks on the code and Markdown files | -| `make run` | Run the built executable using `cargo run --release` | -| `make setup` | Run the setup script located at `./scripts/setup.sh` | -| `make test` | Run all tests in the project | -| `make coverage` | Generate code coverage reports | +| Command | Description | +| ------------------------ | ----------------------------------------------------- | +| `make install` | Fetch the project dependencies using `cargo fetch` | +| `make setup` | Run the setup script located at `./scripts/setup.sh` | +| `make create-env` | Create environment configuration file | +| `make fmt` | Format the code and Markdown files | +| `make lint` | Perform linting checks on the code and Markdown files | +| `make test` | Run all tests in the project | +| `make test-watch` | Run tests in watch mode | +| `make clean` | Clean the build artifacts | +| `make dev-watch` | Run the project in development mode with auto-reload | +| `make bench` | Run benchmarks for the project | +| `make audit` | Run security audit on dependencies | +| `make audit-fix` | Fix security vulnerabilities in dependencies | +| `make version` | Show current version | +| `make bump-version` | Bump project version | +| `make load-test` | Run load tests | +| `make run-publisher` | Run the publisher with custom configuration | +| `make run-mainnet-dev` | Run publisher in mainnet dev mode | +| `make run-testnet-dev` | Run publisher in testnet dev mode | +| `make validate-env` | Validate environment setup | +| `make cleanup-artifacts` | Clean up old artifacts on Github | + +## ๐Ÿš€ Running Local Cluster + +The project includes support for running a local Kubernetes cluster using [Minikube](https://minikube.sigs.k8s.io/docs/start/) for development and testing. Here's a quick guide to get started: + +1. Setup Minikube cluster: + +```sh +make minikube-setup +make minikube-start +``` + +For detailed information about the necessary tools to install, cluster configuration, deployment options, and troubleshooting, please refer to the [Cluster Documentation](./cluster/README.md). ## ๐Ÿงช Running Tests @@ -98,22 +144,12 @@ To run all tests in the project, use: make test ``` -For running specific tests or test modules, you can use the standard Cargo test command: +For running specific tests or test modules, you can use: ```sh -cargo test [test_name_or_module] +make test PACKAGE= ``` -## ๐Ÿ“Š Code Coverage - -To generate code coverage reports, use: - -```sh -make coverage -``` - -This will generate coverage reports for different packages in the project. You can find the configuration for coverage analysis in the `tarpaulin.toml` file. - ## ๐Ÿ“ฌ Open a Pull Request 1. Fork this repository and clone your fork. diff --git a/Cargo.lock b/Cargo.lock index c13f954d..28cf46f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,15 +224,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "addr" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93b8a41dbe230ad5087cc721f8d41611de654542180586b315d9f4cf6b72bef" -dependencies = [ - "psl-types", -] - [[package]] name = "addr2line" version = "0.24.2" @@ -343,19 +334,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "ammonia" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab99eae5ee58501ab236beb6f20f6ca39be615267b014899c89b2f0bc18a459" -dependencies = [ - "html5ever", - "maplit", - "once_cell", - "tendril", - "url", -] - [[package]] name = "android-tzdata" version = "0.1.1" @@ -426,27 +404,12 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "any_ascii" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea50b14b7a4b9343f8c627a7a53c52076482bd4bdad0a24fd3ec533ed616cc2c" - [[package]] name = "anyhow" version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" -[[package]] -name = "approx" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" -dependencies = [ - "num-traits", -] - [[package]] name = "approx" version = "0.5.1" @@ -471,18 +434,6 @@ dependencies = [ "triomphe", ] -[[package]] -name = "argon2" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" -dependencies = [ - "base64ct", - "blake2", - "cpufeatures", - "password-hash", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -495,15 +446,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - [[package]] name = "asn1-rs" version = "0.6.2" @@ -555,18 +497,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.18" @@ -587,19 +517,6 @@ dependencies = [ "zstd-safe", ] -[[package]] -name = "async-executor" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "slab", -] - [[package]] name = "async-graphql" version = "7.0.11" @@ -762,12 +679,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.83" @@ -1460,19 +1371,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bcrypt" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65938ed058ef47d92cf8b346cc76ef48984572ade631927e9937b5ffc7662c7" -dependencies = [ - "base64 0.22.1", - "blowfish", - "getrandom", - "subtle", - "zeroize", -] - [[package]] name = "bech32" version = "0.9.1" @@ -1541,21 +1439,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -1592,19 +1475,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "blake3" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -1623,16 +1493,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blowfish" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" -dependencies = [ - "byteorder", - "cipher", -] - [[package]] name = "borsh" version = "1.5.3" @@ -1831,15 +1691,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" -[[package]] -name = "castaway" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" -dependencies = [ - "rustversion", -] - [[package]] name = "cc" version = "1.2.2" @@ -1851,63 +1702,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cedar-policy" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d91e3b10a0f7f2911774d5e49713c4d25753466f9e11d1cd2ec627f8a2dc857" -dependencies = [ - "cedar-policy-core", - "cedar-policy-validator", - "itertools 0.10.5", - "lalrpop-util", - "ref-cast", - "serde", - "serde_json", - "smol_str", - "thiserror 1.0.69", -] - -[[package]] -name = "cedar-policy-core" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2315591c6b7e18f8038f0a0529f254235fd902b6c217aabc04f2459b0d9995" -dependencies = [ - "either", - "ipnet", - "itertools 0.10.5", - "lalrpop", - "lalrpop-util", - "lazy_static", - "miette", - "regex", - "rustc_lexer", - "serde", - "serde_json", - "serde_with", - "smol_str", - "stacker", - "thiserror 1.0.69", -] - -[[package]] -name = "cedar-policy-validator" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e756e1b2a5da742ed97e65199ad6d0893e9aa4bd6b34be1de9e70bd1e6adc7df" -dependencies = [ - "cedar-policy-core", - "itertools 0.10.5", - "serde", - "serde_json", - "serde_with", - "smol_str", - "stacker", - "thiserror 1.0.69", - "unicode-security", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -2243,12 +2037,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - [[package]] name = "convert_case" version = "0.4.0" @@ -2844,19 +2632,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "data-encoding" version = "2.6.0" @@ -3001,12 +2776,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "deunicode" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" - [[package]] name = "diff" version = "0.1.13" @@ -3068,16 +2837,6 @@ dependencies = [ "dirs-sys 0.3.7", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -3123,21 +2882,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "dmp" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaa1135a34d26e5cc5b4927a8935af887d4f30a5653a797c33b9a4222beb6d9" -dependencies = [ - "urlencoding", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "document-features" version = "0.2.10" @@ -3177,16 +2921,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" -[[package]] -name = "earcutr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79127ed59a85d7687c409e9978547cffb7dc79675355ed22da6b66fd5f6ead01" -dependencies = [ - "itertools 0.11.0", - "num-traits", -] - [[package]] name = "ecdsa" version = "0.14.8" @@ -3330,15 +3064,6 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -3354,12 +3079,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "endian-type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" - [[package]] name = "enr" version = "0.10.0" @@ -3588,7 +3307,7 @@ dependencies = [ "serde_json", "thiserror 1.0.69", "tokio", - "tokio-tungstenite 0.20.1", + "tokio-tungstenite", "tracing", "tracing-futures", "url", @@ -3748,12 +3467,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "float_next_after" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" - [[package]] name = "fnv" version = "1.0.7" @@ -3796,12 +3509,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "fst" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" - [[package]] name = "fuel-asm" version = "0.56.0" @@ -3840,7 +3547,8 @@ dependencies = [ [[package]] name = "fuel-core" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfb756e0278c7c63e25adf42ede0e56bf51e7a8de565452f8345bb6cdd45960" dependencies = [ "anyhow", "async-graphql", @@ -3898,7 +3606,8 @@ dependencies = [ [[package]] name = "fuel-core-bin" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75dd0a5d0512e90c466fad5bb6b84a971258d6bbf1e49ce6c95fd2c6f9c12d33" dependencies = [ "anyhow", "clap 4.5.23", @@ -3925,7 +3634,8 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85352d00503d5e9a353d1fdacf68400a626cbf84b30e8b1040dd30d1377e02c5" dependencies = [ "anyhow", "bech32", @@ -3944,7 +3654,8 @@ dependencies = [ [[package]] name = "fuel-core-client" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a10ccde16fd926137070d3baa77a1096c2ff6cdca26d14177139c16e59e697d" dependencies = [ "anyhow", "base64 0.22.1", @@ -3968,7 +3679,8 @@ dependencies = [ [[package]] name = "fuel-core-compression" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae37e003e024e00948ab26dcfbc44d5b79b19a5555c404ef3ae71947cfdcce1" dependencies = [ "anyhow", "fuel-core-types 0.40.2", @@ -3982,7 +3694,8 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a45e582b19ab2302440ce29ad7430b64555f3e2f163783c96c0139c66bff764" dependencies = [ "anyhow", "fuel-core-chain-config", @@ -3994,7 +3707,8 @@ dependencies = [ [[package]] name = "fuel-core-database" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673f9e4c9f3de4b9d04e115bfe8fbb775aed81eb22b85b3012002b34b6eff8d5" dependencies = [ "anyhow", "derive_more 0.99.18", @@ -4005,7 +3719,8 @@ dependencies = [ [[package]] name = "fuel-core-executor" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "407281e584b718535d46edb2704d7329bafae79f9025779b286da8e0b9156d4b" dependencies = [ "anyhow", "fuel-core-storage", @@ -4019,7 +3734,8 @@ dependencies = [ [[package]] name = "fuel-core-gas-price-service" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42fa1f066694472d16533a93a8701cbe0f2843f1766bb1579b11c514ccc5cda5" dependencies = [ "anyhow", "async-trait", @@ -4044,7 +3760,8 @@ dependencies = [ [[package]] name = "fuel-core-importer" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7508fc20703913ab71e0bf0756c1820d44d5ef164b0bd242be063252012395a" dependencies = [ "anyhow", "derive_more 0.99.18", @@ -4060,7 +3777,8 @@ dependencies = [ [[package]] name = "fuel-core-metrics" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cc7ee152dae8ad4c3ae745298fdf85951bea564d2cb5730e60ebde954f6e72" dependencies = [ "once_cell", "parking_lot", @@ -4075,7 +3793,8 @@ dependencies = [ [[package]] name = "fuel-core-p2p" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "821abc2b77de5d5c02c2477a5f32acab188cc0d334986369819520a1a1a1d75b" dependencies = [ "anyhow", "async-trait", @@ -4108,7 +3827,8 @@ dependencies = [ [[package]] name = "fuel-core-poa" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27a5924a88e1ed267c843cf8dca09bb98f1e27c0141784faa0d482fb2ddae0fe" dependencies = [ "anyhow", "async-trait", @@ -4126,7 +3846,8 @@ dependencies = [ [[package]] name = "fuel-core-producer" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193f19f8b0981426c241e463819dd061613bb448d6ce58e0f16b2128afa38f20" dependencies = [ "anyhow", "async-trait", @@ -4141,7 +3862,8 @@ dependencies = [ [[package]] name = "fuel-core-relayer" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd72db8cc1a967ea763c42e2c89360972141c53060a33601cc42d6fc7d9cf74" dependencies = [ "anyhow", "async-trait", @@ -4165,7 +3887,8 @@ dependencies = [ [[package]] name = "fuel-core-services" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7a397314000b0e09dac97b020b4ee40204ab9de4e8f458f2f4812be9da3ec62" dependencies = [ "anyhow", "async-trait", @@ -4181,7 +3904,8 @@ dependencies = [ [[package]] name = "fuel-core-shared-sequencer" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73706fe7e0b161ec99fbc8662f6dad16a1ddcaf1dbedc87dbe9495a7b2ed5b1" dependencies = [ "anyhow", "async-trait", @@ -4205,7 +3929,8 @@ dependencies = [ [[package]] name = "fuel-core-storage" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4ee0bb50989c14e87104f79da550c2bd4303a141157bd453646450a8abafa9" dependencies = [ "anyhow", "derive_more 0.99.18", @@ -4228,7 +3953,8 @@ dependencies = [ [[package]] name = "fuel-core-sync" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0336d71f9070add9c5f726b4d107066928d468f3f552ee27ff4e480e756a187" dependencies = [ "anyhow", "async-trait", @@ -4244,7 +3970,8 @@ dependencies = [ [[package]] name = "fuel-core-txpool" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567839af63e7b1ba261423b3d4b0f15cbe53332a0d1ee0521f473394fd928bb8" dependencies = [ "anyhow", "async-trait", @@ -4280,7 +4007,8 @@ dependencies = [ [[package]] name = "fuel-core-types" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12856dc5d6939c9ca341dd3a277fb40978bb78463da6d168dee771d2a3b810e" dependencies = [ "anyhow", "bs58", @@ -4298,7 +4026,8 @@ dependencies = [ [[package]] name = "fuel-core-upgradable-executor" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7b9b99dbf4b20f5385057c07e2d10d3472485b42b611db3468ec10c72ac4764" dependencies = [ "anyhow", "derive_more 0.99.18", @@ -4315,7 +4044,8 @@ dependencies = [ [[package]] name = "fuel-core-wasm-executor" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5928427dabaad4036a3983700ea7f14d1d1ef715edf1f2170823cde111ddf65f" dependencies = [ "anyhow", "fuel-core-executor", @@ -4410,25 +4140,13 @@ dependencies = [ [[package]] name = "fuel-gas-price-algorithm" version = "0.40.2" -source = "git+https://github.com/fuellabs/fuel-core?branch=release/v0.40.2#ab12fb6772ca8a01b39203de8736933d2e17d3f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6075dc31c41077ec1d988a6cbd9435850b16f7920952f2ce225c7f1fb128739a" dependencies = [ "serde", "thiserror 1.0.69", ] -[[package]] -name = "fuel-indexer" -version = "0.0.13" -dependencies = [ - "anyhow", - "dotenvy", - "fuel-streams-core", - "futures", - "serde", - "surrealdb", - "tokio", -] - [[package]] name = "fuel-merkle" version = "0.56.0" @@ -4776,16 +4494,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - [[package]] name = "futures" version = "0.3.31" @@ -4851,10 +4559,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ - "fastrand", "futures-core", - "futures-io", - "parking", "pin-project-lite", ] @@ -4931,15 +4636,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fuzzy-matcher" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" -dependencies = [ - "thread_local", -] - [[package]] name = "fxhash" version = "0.2.1" @@ -4961,50 +4657,10 @@ dependencies = [ ] [[package]] -name = "geo" -version = "0.28.0" +name = "getrandom" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f811f663912a69249fa620dcd2a005db7254529da2d8a0b23942e81f47084501" -dependencies = [ - "earcutr", - "float_next_after", - "geo-types", - "geographiclib-rs", - "log", - "num-traits", - "robust", - "rstar", - "serde", - "spade", -] - -[[package]] -name = "geo-types" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f47c611187777bbca61ea7aba780213f5f3441fd36294ab333e96cfa791b65" -dependencies = [ - "approx 0.5.1", - "arbitrary", - "num-traits", - "rstar", - "serde", -] - -[[package]] -name = "geographiclib-rs" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e5ed84f8089c70234b0a8e0aedb6dc733671612ddc0d37c6066052f9781960" -dependencies = [ - "libm", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -5373,20 +5029,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "html5ever" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "http" version = "0.2.12" @@ -6030,15 +5672,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.12.1" @@ -6140,37 +5773,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax 0.8.5", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" -dependencies = [ - "regex-automata 0.4.9", -] - [[package]] name = "language-tags" version = "0.3.2" @@ -6195,15 +5797,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" -[[package]] -name = "lexicmp" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378d131ddf24063b32cbd7e91668d183140c4b3906270635a4d633d1068ea5d" -dependencies = [ - "any_ascii", -] - [[package]] name = "libc" version = "0.2.167" @@ -6789,18 +6382,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linfa-linalg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e7562b41c8876d3367897067013bb2884cc78e6893f092ecd26b305176ac82" -dependencies = [ - "ndarray", - "num-traits", - "rand", - "thiserror 1.0.69", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -6913,12 +6494,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - [[package]] name = "mach2" version = "0.4.2" @@ -6928,26 +6503,6 @@ dependencies = [ "libc", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "markup5ever" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" -dependencies = [ - "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "match_cfg" version = "0.1.0" @@ -7019,45 +6574,12 @@ dependencies = [ "libc", ] -[[package]] -name = "miette" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" -dependencies = [ - "miette-derive", - "once_cell", - "thiserror 1.0.69", - "unicode-width 0.1.14", -] - -[[package]] -name = "miette-derive" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -7233,7 +6755,7 @@ version = "0.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" dependencies = [ - "approx 0.5.1", + "approx", "matrixmultiply", "num-complex", "num-rational", @@ -7254,15 +6776,6 @@ dependencies = [ "rand", ] -[[package]] -name = "nanoid" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" -dependencies = [ - "rand", -] - [[package]] name = "native-tls" version = "0.2.12" @@ -7299,35 +6812,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "approx 0.4.0", - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", -] - -[[package]] -name = "ndarray-stats" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af5a8477ac96877b5bd1fd67e0c28736c12943aba24eda92b127e036b0c8f400" -dependencies = [ - "indexmap 1.9.3", - "itertools 0.10.5", - "ndarray", - "noisy_float", - "num-integer", - "num-traits", - "rand", -] - [[package]] name = "netlink-packet-core" version = "0.7.0" @@ -7393,21 +6877,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "nibble_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" -dependencies = [ - "smallvec", -] - [[package]] name = "nix" version = "0.26.4" @@ -7440,15 +6909,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -[[package]] -name = "noisy_float" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978fe6e6ebc0bf53de533cd456ca2d9de13de13856eda1518a285d7705a213af" -dependencies = [ - "num-traits", -] - [[package]] name = "nom" version = "7.1.3" @@ -7597,27 +7057,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "object_store" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6da452820c715ce78221e8202ccc599b4a52f3e1eb3eedb487b680c81a8e3f3" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "futures", - "humantime", - "itertools 0.13.0", - "parking_lot", - "percent-encoding", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - [[package]] name = "oid-registry" version = "0.7.1" @@ -7826,29 +7265,12 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "password-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-clean" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" - [[package]] name = "pbkdf2" version = "0.12.2" @@ -7857,8 +7279,6 @@ checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac 0.12.1", - "password-hash", - "sha2 0.10.8", ] [[package]] @@ -7959,85 +7379,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.90", - "unicase", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", - "unicase", -] - -[[package]] -name = "pico-args" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" - [[package]] name = "pin-project" version = "1.1.7" @@ -8216,12 +7557,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "predicates" version = "2.1.5" @@ -8635,18 +7970,6 @@ dependencies = [ "unsigned-varint 0.8.0", ] -[[package]] -name = "quick_cache" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55a1aa7668676bb93926cd4e9cdfe60f03bb866553bcca9112554911b6d3dc" -dependencies = [ - "ahash 0.8.11", - "equivalent", - "hashbrown 0.14.5", - "parking_lot", -] - [[package]] name = "quinn" version = "0.11.6" @@ -8715,17 +8038,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "radix_trie" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" -dependencies = [ - "endian-type", - "nibble_vec", - "serde", -] - [[package]] name = "rand" version = "0.8.5" @@ -8813,12 +8125,6 @@ dependencies = [ "yasna", ] -[[package]] -name = "reblessive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffead9d0a0b45f3e0bc063a244b1779fd53a09d2c2f7282c186a016b1f10a778" - [[package]] name = "redox_syscall" version = "0.5.7" @@ -8839,26 +8145,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "ref-cast" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "regalloc2" version = "0.9.3" @@ -9002,7 +8288,6 @@ dependencies = [ "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -9024,7 +8309,6 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "webpki-roots 0.26.7", "windows-registry", @@ -9040,32 +8324,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "revision" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f53179a035f881adad8c4d58a2c599c6b4a8325b989c68d178d7a34d1b1e4c" -dependencies = [ - "chrono", - "geo", - "regex", - "revision-derive", - "roaring", - "rust_decimal", - "uuid", -] - -[[package]] -name = "revision-derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0ec466e5d8dca9965eb6871879677bef5590cf7525ad96cae14376efb75073" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "rfc6979" version = "0.3.1" @@ -9183,44 +8441,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rmp" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmpv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" -dependencies = [ - "num-traits", - "rmp", -] - -[[package]] -name = "roaring" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395b0c39c00f9296f3937624c1fa4e0ee44f8c0e4b2c49408179ef381c6c2e6e" -dependencies = [ - "bytemuck", - "byteorder", - "serde", -] - -[[package]] -name = "robust" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" - [[package]] name = "rocksdb" version = "0.21.0" @@ -9240,17 +8460,6 @@ dependencies = [ "archery", ] -[[package]] -name = "rstar" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" -dependencies = [ - "heapless 0.8.0", - "num-traits", - "smallvec", -] - [[package]] name = "rtnetlink" version = "0.13.1" @@ -9269,16 +8478,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "rust-stemmers" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" -dependencies = [ - "serde", - "serde_derive", -] - [[package]] name = "rust_decimal" version = "1.36.0" @@ -9319,15 +8518,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_lexer" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" -dependencies = [ - "unicode-xid", -] - [[package]] name = "rustc_version" version = "0.4.1" @@ -9377,7 +8567,6 @@ version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ - "log", "once_cell", "ring 0.17.8", "rustls-pki-types", @@ -9503,15 +8692,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - [[package]] name = "same-file" version = "1.0.6" @@ -9586,18 +8766,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" -dependencies = [ - "password-hash", - "pbkdf2", - "salsa20", - "sha2 0.10.8", -] - [[package]] name = "sct" version = "0.7.1" @@ -9736,15 +8904,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-content" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e255eaf9f3814135df4f959c9f404ebb2e67238bae0ed412da10518d0629e7c9" -dependencies = [ - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.15" @@ -9771,7 +8930,6 @@ version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "indexmap 2.7.0", "itoa", "memchr", "ryu", @@ -9979,7 +9137,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" dependencies = [ - "approx 0.5.1", + "approx", "num-complex", "num-traits", "paste", @@ -10004,12 +9162,6 @@ dependencies = [ "time", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" @@ -10034,43 +9186,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smol_str" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -dependencies = [ - "serde", -] - -[[package]] -name = "snafu" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" -dependencies = [ - "doc-comment", - "snafu-derive", -] - -[[package]] -name = "snafu-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - [[package]] name = "snow" version = "0.9.6" @@ -10113,18 +9228,6 @@ dependencies = [ "sha1", ] -[[package]] -name = "spade" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f5ef1f863aca7d1d7dda7ccfc36a0a4279bd6d3c375176e5e0712e25cb4889" -dependencies = [ - "hashbrown 0.14.5", - "num-traits", - "robust", - "smallvec", -] - [[package]] name = "spin" version = "0.5.2" @@ -10172,19 +9275,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "stacker" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "windows-sys 0.59.0", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -10203,24 +9293,12 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a3fe7c28c6512e766b0874335db33c94ad7b8f9054228ae1c2abd47ce7d335e" dependencies = [ - "approx 0.5.1", + "approx", "nalgebra", "num-traits", "rand", ] -[[package]] -name = "storekey" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c42833834a5d23b344f71d87114e0cc9994766a5c42938f4b50e7b2aef85b2" -dependencies = [ - "byteorder", - "memchr", - "serde", - "thiserror 1.0.69", -] - [[package]] name = "streams-tests" version = "0.0.13" @@ -10239,32 +9317,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - [[package]] name = "strsim" version = "0.10.0" @@ -10373,142 +9425,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" -[[package]] -name = "surrealdb" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee57d04ccd8ec9d51c635a12996085abfe73e86adc05d363b16ee47191ddef1f" -dependencies = [ - "arrayvec", - "async-channel", - "bincode", - "chrono", - "dmp", - "futures", - "geo", - "indexmap 2.7.0", - "path-clean", - "pharos", - "reblessive", - "reqwest 0.12.9", - "revision", - "ring 0.17.8", - "rust_decimal", - "rustls 0.23.19", - "rustls-pki-types", - "semver", - "serde", - "serde-content", - "serde_json", - "surrealdb-core", - "thiserror 1.0.69", - "tokio", - "tokio-tungstenite 0.23.1", - "tokio-util", - "tracing", - "trice", - "url", - "uuid", - "wasm-bindgen-futures", - "wasmtimer", - "ws_stream_wasm", -] - -[[package]] -name = "surrealdb-core" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f24702939c38dee448eb3958ffdc4d9b37aad84122fef3bcc712488213bf1f" -dependencies = [ - "addr", - "ahash 0.8.11", - "ammonia", - "any_ascii", - "argon2", - "async-channel", - "async-executor", - "async-graphql", - "base64 0.21.7", - "bcrypt", - "bincode", - "blake3", - "bytes", - "castaway", - "cedar-policy", - "chrono", - "ciborium", - "dashmap", - "deunicode", - "dmp", - "fst", - "futures", - "fuzzy-matcher", - "geo", - "geo-types", - "hex", - "ipnet", - "jsonwebtoken 9.3.0", - "lexicmp", - "linfa-linalg", - "md-5", - "nanoid", - "ndarray", - "ndarray-stats", - "num-traits", - "num_cpus", - "object_store", - "pbkdf2", - "pharos", - "phf", - "pin-project-lite", - "quick_cache", - "radix_trie", - "rand", - "rayon", - "reblessive", - "regex", - "revision", - "ring 0.17.8", - "rmpv", - "roaring", - "rust-stemmers", - "rust_decimal", - "scrypt", - "semver", - "serde", - "serde-content", - "serde_json", - "sha1", - "sha2 0.10.8", - "snap", - "storekey", - "strsim 0.11.1", - "subtle", - "surrealdb-derive", - "thiserror 1.0.69", - "tokio", - "tracing", - "trice", - "ulid", - "unicase", - "url", - "uuid", - "vart", - "wasm-bindgen-futures", - "wasmtimer", - "ws_stream_wasm", -] - -[[package]] -name = "surrealdb-derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacdb4c58b9ebef0291310afcd63af0012d85610d361f3785952c61b6f1dddf4" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "symbolic-common" version = "12.12.3" @@ -10808,28 +9724,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - [[package]] name = "termcolor" version = "1.4.1" @@ -11102,22 +9996,6 @@ dependencies = [ "webpki-roots 0.25.4", ] -[[package]] -name = "tokio-tungstenite" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" -dependencies = [ - "futures-util", - "log", - "rustls 0.23.19", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.1", - "tungstenite 0.23.0", - "webpki-roots 0.26.7", -] - [[package]] name = "tokio-util" version = "0.7.13" @@ -11126,7 +10004,6 @@ checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", - "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -11429,17 +10306,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "trice" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3aaab10ae9fac0b10f392752bf56f0fd20845f39037fec931e8537b105b515a" -dependencies = [ - "js-sys", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "triomphe" version = "0.1.14" @@ -11483,27 +10349,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "tungstenite" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.2.0", - "httparse", - "log", - "rand", - "rustls 0.23.19", - "rustls-pki-types", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.24.0" @@ -11546,30 +10391,12 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "ulid" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f903f293d11f31c0c29e4148f6dc0d033a7f80cebc0282bea147611667d289" -dependencies = [ - "getrandom", - "rand", - "serde", - "web-time", -] - [[package]] name = "unarray" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicase" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" - [[package]] name = "unicode-bidi" version = "0.3.17" @@ -11591,22 +10418,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-script" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" - -[[package]] -name = "unicode-security" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4ddba1535dd35ed8b61c52166b7155d7f4e4b8847cec6f48e71dc66d8b5e50" -dependencies = [ - "unicode-normalization", - "unicode-script", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -11718,7 +10529,6 @@ checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", - "wasm-bindgen", ] [[package]] @@ -11757,12 +10567,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "vart" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c92195d375eb94995afddeedfd7f246796eb60b85f727c538e42222c4c9b2d3" - [[package]] name = "vcpkg" version = "0.2.15" @@ -11889,19 +10693,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmparser" version = "0.212.0" @@ -12121,19 +10912,6 @@ dependencies = [ "wit-parser", ] -[[package]] -name = "wasmtimer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ed9d8b15c7fb594d72bfb4b5a276f3d2029333cd93a932f376f5937f6f80ee" -dependencies = [ - "futures", - "js-sys", - "parking_lot", - "pin-utils", - "wasm-bindgen", -] - [[package]] name = "web-sys" version = "0.3.74" diff --git a/Cargo.toml b/Cargo.toml index 29ba56d0..a731d93d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,24 +33,13 @@ clap = { version = "4.5", features = ["derive", "env"] } dotenvy = "0.15" displaydoc = "0.2" futures = "0.3" -fuel-core-bin = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2", features = [ - "p2p", - "relayer", - "rocksdb", -] } -fuel-core = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2", features = [ - "p2p", - "relayer", - "rocksdb", -] } -fuel-core-client = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2" } -fuel-core-importer = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2" } -fuel-core-storage = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2" } -fuel-core-types = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2", features = [ - "test-helpers", - "serde", -] } -fuel-core-services = { git = "https://github.com/fuellabs/fuel-core", branch = "release/v0.40.2" } +fuel-core-bin = { version = "0.40.2", features = ["p2p", "relayer", "rocksdb"] } +fuel-core = { version = "0.40.2", features = ["p2p", "relayer", "rocksdb"] } +fuel-core-client = { version = "0.40.2" } +fuel-core-importer = { version = "0.40.2" } +fuel-core-storage = { version = "0.40.2" } +fuel-core-types = { version = "0.40.2", features = ["test-helpers", "serde"] } +fuel-core-services = { version = "0.40.2" } futures-util = "0.3" itertools = "0.13" mockall = "0.13" diff --git a/Makefile b/Makefile index 321572f4..937e3fb6 100644 --- a/Makefile +++ b/Makefile @@ -1,89 +1,28 @@ # ------------------------------------------------------------ -# Core Variables (Simple Assignment) +# Variables # ------------------------------------------------------------ -PACKAGE := fuel-streams -VERSION := $(shell cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "$(PACKAGE)") | .version') -TILTFILE := ./Tiltfile +# Version detection using shell command +VERSION := $(shell cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "fuel-streams") | .version') -# ------------------------------------------------------------ -# Tool Versions (Simple Assignment) -# ------------------------------------------------------------ - -RUST_VERSION := 1.81.0 +# Constants RUST_NIGHTLY_VERSION := nightly-2024-11-06 +RUST_VERSION := 1.81.0 # ------------------------------------------------------------ -# Required Commands and Tools (Simple Assignment) -# ------------------------------------------------------------ - -COMMANDS := rustup npm pre-commit docker python3 - -# ------------------------------------------------------------ -# Docker Configuration (Simple Assignment) -# ------------------------------------------------------------ - -NETWORKS := mainnet testnet -PROFILES := all dev nats fuel monitoring indexer logging -MODES := dev profiling -DOCKER_COMPOSE := ./scripts/set_envs.sh && docker compose -f docker/docker-compose.yml --env-file .env - -# ------------------------------------------------------------ -# Phony Targets Declaration -# ------------------------------------------------------------ - -.PHONY: all install setup build clean lint fmt help test doc bench coverage audit \ - version bump-version release release-dry-run docs docs-serve \ - test-watch validate-env dev-watch ci \ - fmt-cargo fmt-rust fmt-prettier fmt-markdown \ - check lint-cargo lint-rust lint-clippy lint-prettier lint-markdown lint-machete \ - coverage audit audit-fix audit-fix-test \ - clean/build clean/docker \ - check-network check-versions check-dev-env check-commands \ - $(foreach p,$(PROFILES),start/$(p) stop/$(p) restart/$(p) clean/$(p)) \ - $(foreach n,$(NETWORKS),start-$(n) stop-$(n) restart-$(n) clean-$(n)) \ - $(foreach n,$(NETWORKS),$(foreach p,$(PROFILES),start-$(n)/$(p) stop-$(n)/$(p) restart-$(n)/$(p) clean-$(n)/$(p))) \ - $(foreach n,$(NETWORKS),$(foreach m,$(MODES),run-$(n)-$(m))) \ - start stop restart run-publisher - -# Default target -all: help - -# ------------------------------------------------------------ -# Version Management -# ------------------------------------------------------------ - -version: - @echo "Current version: $(VERSION)" - -bump-version: NEW_VERSION ?= -bump-version: - @if [ -z "$(NEW_VERSION)" ]; then \ - echo "Error: NEW_VERSION is required"; \ - echo "Usage: make bump-version NEW_VERSION=X.Y.Z"; \ - exit 1; \ - fi - @echo "Bumping version to $(NEW_VERSION)..." - @./scripts/bump-version.sh "$(NEW_VERSION)" - -# ------------------------------------------------------------ -# Release Management +# Phony Targets # ------------------------------------------------------------ -release: NEW_VERSION ?= -release: validate-env test lint - @if [ -z "$(NEW_VERSION)" ]; then \ - echo "Error: NEW_VERSION is required"; \ - echo "Usage: make release NEW_VERSION=X.Y.Z"; \ - exit 1; \ - fi - @echo "Preparing release $(NEW_VERSION)..." - @./scripts/bump-version.sh "$(NEW_VERSION)" - @knope prepare-release - -release-dry-run: - @echo "Performing dry run of release process..." - @knope prepare-release --dry-run +.PHONY: install validate-env check-commands check-network check-versions \ + check-dev-env setup create-env version bump-version release dev-watch \ + clean clean-build cleanup-artifacts test-watch test bench helm-test \ + fmt fmt-cargo fmt-rust fmt-prettier fmt-markdown lint lint-cargo \ + lint-rust lint-clippy lint-prettier lint-markdown lint-machete \ + audit audit-fix-test audit-fix load-test run-publisher \ + run-mainnet-dev run-mainnet-profiling run-testnet-dev run-testnet-profiling \ + start-nats stop-nats restart-nats clean-nats minikube-setup minikube-start \ + minikube-delete k8s-setup helm-setup cluster-setup pre-cluster \ + cluster-up cluster-down cluster-reset # ------------------------------------------------------------ # Setup & Validation Targets @@ -99,28 +38,26 @@ validate-env: check-commands check-versions check-dev-env @cargo --version >/dev/null 2>&1 || { echo "cargo is required but not installed"; exit 1; } @echo "Environment validation complete" -check-commands: COMMANDS ?= rustup npm pre-commit docker python3 check-commands: - @for cmd in $(COMMANDS); do \ + @for cmd in rustup npm pre-commit docker python3; do \ if ! command -v $$cmd >/dev/null 2>&1; then \ - echo >&2 "$$cmd is not installed. Please install $$cmd and try again."; \ + echo "$$cmd is not installed. Please install $$cmd and try again."; \ exit 1; \ fi \ done -check-network: NETWORK ?= testnet check-network: @if [ "$(NETWORK)" != "mainnet" ] && [ "$(NETWORK)" != "testnet" ]; then \ - echo "Error: NETWORK must be either 'mainnet' or 'testnet'"; \ - exit 1; \ + echo "Error: network must be either 'mainnet' or 'testnet'"; \ + exit 1; \ fi check-versions: @echo "Checking required tool versions..." - @echo "$(shell rustc --version)" - @echo "$(shell cargo --version)" - @echo "node: $(shell node --version)" - @echo "npm: $(shell npm --version)" + @echo "$$(rustc --version)" + @echo "$$(cargo --version)" + @echo "node: $$(node --version)" + @echo "npm: $$(npm --version)" check-dev-env: @if [ ! -f .env ]; then \ @@ -128,171 +65,66 @@ check-dev-env: cp .env.example .env; \ fi -setup: COMMANDS := rustup npm pre-commit setup: check-commands check-versions check-dev-env ./scripts/setup.sh -# ------------------------------------------------------------ -# Development Targets -# ------------------------------------------------------------ - -dev-watch: - cargo watch -- cargo run - -ci: lint test coverage audit - -clean: clean/build clean/docker - -clean/build: - cargo clean - rm -rf target/ - rm -rf node_modules/ - -cleanup_artifacts: REPO_OWNER ?= fuellabs -cleanup_artifacts: REPO_NAME ?= data-systems -cleanup_artifacts: DAYS_TO_KEEP ?= 15 -cleanup_artifacts: - @echo "Running artifact cleanup..." - @./scripts/cleanup_artifacts.sh $(REPO_OWNER) $(REPO_NAME) $(DAYS_TO_KEEP) +create-env: + @./scripts/create_env.sh # ------------------------------------------------------------ -# Docker Commands +# Version Management # ------------------------------------------------------------ -NETWORK ?= testnet -NETWORKS = mainnet testnet -PROFILE ?= all -PROFILES = all dev nats fuel monitoring indexer logging -DOCKER_COMPOSE = ./scripts/set_envs.sh && docker compose -f docker/docker-compose.yml --env-file .env - -# Helper functions to validate Docker environment and execute commands -define check_docker_env - @if ! docker compose version > /dev/null 2>&1; then \ - echo "Error: Docker Compose is not installed"; \ +version: + @echo "Current version: $(VERSION)" + +bump-version: + @if [ -z "$(NEW_VERSION)" ]; then \ + echo "Error: NEW_VERSION is required"; \ + echo "Usage: make bump-version NEW_VERSION=X.Y.Z"; \ exit 1; \ fi - @if [ -z "$(NETWORK)" ]; then \ - echo "Error: NETWORK variable is not set"; \ + @echo "Bumping version to $(NEW_VERSION)..." + cargo set-version --workspace "$(NEW_VERSION)" + cargo update --workspace + $(MAKE) fmt + +release: validate-env test lint + @if [ -z "$(NEW_VERSION)" ]; then \ + echo "Error: NEW_VERSION is required"; \ + echo "Usage: make release NEW_VERSION=X.Y.Z [dry_run=true]"; \ exit 1; \ fi -endef - -# Helper function to execute docker commands with consistent parameters -define docker_cmd - $(call check_docker_env) - NETWORK=$(1) PORT=$(2) TELEMETRY_PORT=$(3) $(DOCKER_COMPOSE) --profile $(4) $(5) -endef - -# Define rules for network-only, profile-only, and network-profile combinations -define profile_rules -# Original profile rules (without network) -start/$(2) stop/$(2) restart/$(2) clean/$(2): PROFILE = $(2) -start/$(2): start -stop/$(2): stop -restart/$(2): restart -clean/$(2): clean/docker - -# Network-specific rules (defaults to 'all' or 'dev' profile) -ifeq ($(filter all dev,$(PROFILE)),$(PROFILE)) -start-$(1) stop-$(1) restart-$(1) clean-$(1): NETWORK = $(1) -start-$(1): PROFILE = $(PROFILE) -start-$(1): start -stop-$(1): stop -restart-$(1): restart -clean-$(1): clean/docker - -start-$(1)/$(2) stop-$(1)/$(2) restart-$(1)/$(2) clean-$(1)/$(2): NETWORK = $(1) -start-$(1)/$(2): PROFILE = $(2) -start-$(1)/$(2): start -stop-$(1)/$(2): stop -restart-$(1)/$(2): restart -clean-$(1)/$(2): clean/docker -endif -endef - -# Generate rules for all profiles without network -$(foreach p,$(PROFILES),$(eval $(call profile_rules,,$(p)))) -# Generate rules for all network-profile combinations -$(foreach n,$(NETWORKS),$(foreach p,$(PROFILES),$(eval $(call profile_rules,$(n),$(p))))) - -start: NETWORK ?= testnet -start: PORT ?= 4000 -start: TELEMETRY_PORT ?= 8080 -start: PROFILE ?= all -start: - $(call docker_cmd,$(NETWORK),$(PORT),$(TELEMETRY_PORT),$(PROFILE),up -d) - -stop: NETWORK ?= testnet -stop: PORT ?= 4000 -stop: TELEMETRY_PORT ?= 8080 -stop: PROFILE ?= all -stop: - $(call docker_cmd,$(NETWORK),$(PORT),$(TELEMETRY_PORT),$(PROFILE),down) - -restart: stop start - -clean/docker: stop - $(call docker_cmd,$(NETWORK),$(PORT),$(TELEMETRY_PORT),$(PROFILE),down -v --rmi all --remove-orphans) - -# ------------------------------------------------------------ -# Publisher Run Commands (Local Development) -# ------------------------------------------------------------ - -PUBLISHER_SCRIPT := ./scripts/run_publisher.sh - -# Define how to run the publisher script -publisher_%: EXTRA_ARGS ?= -publisher_%: - @network=$$(echo "$**" | cut -d'_' -f2) && \ - $(PUBLISHER_SCRIPT) --network $$network --mode $$mode --port $(PORT) --telemetry-port $(TELEMETRY_PORT) $(if $(EXTRA_ARGS),--extra-args "$(EXTRA_ARGS)") - -# Publisher commands for different networks and modes -run-mainnet-dev: check-network publisher_mainnet-dev ## Run publisher in mainnet dev mode -run-mainnet-profiling: check-network publisher_mainnet-profiling ## Run publisher in mainnet profiling mode -run-testnet-dev: check-network publisher_testnet-dev ## Run publisher in testnet dev mode -run-testnet-profiling: check-network publisher_testnet-profiling ## Run publisher in testnet profiling mode - -# Generic publisher command using environment variables -run-publisher: NETWORK ?= testnet -run-publisher: MODE ?= dev -run-publisher: PORT ?= 4000 -run-publisher: TELEMETRY_PORT ?= 8080 -run-publisher: EXTRA_ARGS ?= -run-publisher: check-network - @$(PUBLISHER_SCRIPT) --network $(NETWORK) --mode $(MODE) --port $(PORT) --telemetry-port $(TELEMETRY_PORT) $(if $(EXTRA_ARGS),--extra-args "$(EXTRA_ARGS)") - + $(MAKE) bump-version NEW_VERSION=$(NEW_VERSION) + knope prepare-release $(if $(filter true,$(dry_run)),--dry-run,) # ------------------------------------------------------------ -# Streamer Websockets Run Commands (Local Development) +# Development Targets # ------------------------------------------------------------ -run-ws-streamer: - cargo run --package fuel-ws-streamer --bin ws-streamer -- --config-path crates/fuel-streams-ws/config.toml -run-ws-client: - cargo run --package fuel-ws-streamer --bin ws-client -- --config-path crates/fuel-streams-ws/config.toml +dev-watch: + cargo watch -- cargo run -STREAMER_SCRIPT := ./scripts/run_ws_streamer.sh +clean: clean-build -# Generic publisher command using environment variables -run-streamer: MODE ?= dev -run-streamer: CONFIG_PATH ?= crates/fuel-streams-ws/config.toml -run-streamer: EXTRA_ARGS ?= +clean-build: + cargo clean + rm -rf target/ + rm -rf node_modules/ -run-streamer: check-network - @$(STREAMER_SCRIPT) --mode $(MODE) $(if $(CONFIG_PATH),--config-path "$(CONFIG_PATH)") $(if $(EXTRA_ARGS),--extra-args "$(EXTRA_ARGS)") +cleanup-artifacts: + @echo "Running artifact cleanup..." + @./scripts/cleanup_artifacts.sh $(REPO_OWNER) $(REPO_NAME) $(DAYS_TO_KEEP) # ------------------------------------------------------------ # Testing # ------------------------------------------------------------ -test-watch: PROFILE ?= dev test-watch: cargo watch -x "test --profile $(PROFILE)" -test: PACKAGE ?= all -test: PROFILE ?= dev test: - @if [ "$(PACKAGE)" = "all" ]; then \ + @if [ "$(PACKAGE)" = "all" ] || [ -z "$(PACKAGE)" ]; then \ cargo nextest run --cargo-profile $(PROFILE) --workspace --color always --locked --no-tests=pass && \ cargo test --profile $(PROFILE) --doc --workspace; \ else \ @@ -300,23 +132,18 @@ test: cargo test --profile $(PROFILE) --doc -p $(PACKAGE); \ fi -# coverage: -# RUSTFLAGS="-Z threads=8" cargo +$(RUST_NIGHTLY_VERSION) tarpaulin --config ./tarpaulin.toml - bench: cargo bench -p data-parser -p nats-publisher -p bench-consumers +helm-test: + helm unittest -f "tests/**/*.yaml" -f "tests/*.yaml" cluster/charts/fuel-streams + # ------------------------------------------------------------ # Formatting & Linting # ------------------------------------------------------------ -check: - cargo check --all-targets --all-features - fmt: fmt-cargo fmt-rust fmt-prettier fmt-markdown -lint: check lint-cargo lint-rust lint-clippy lint-prettier lint-markdown lint-machete - fmt-cargo: cargo sort -w @@ -329,11 +156,14 @@ fmt-prettier: fmt-markdown: pnpm md:fix +lint: lint-cargo lint-rust lint-clippy lint-prettier lint-markdown lint-machete + lint-cargo: cargo sort --check --workspace lint-rust: - cargo +$(RUST_NIGHTLY_VERSION) fmt --all --check -- --color always + @cargo check --all-targets --all-features + @cargo +$(RUST_NIGHTLY_VERSION) fmt --all --check -- --color always lint-clippy: cargo clippy --workspace --all-targets --all-features -- -D warnings @@ -361,166 +191,104 @@ audit-fix: cargo audit fix # ------------------------------------------------------------ -# Build & Documentation -# ------------------------------------------------------------ - -build: - cargo build --release - -docs: doc - @echo "Generating additional documentation..." - @cargo doc --no-deps --document-private-items - @cargo doc --workspace --no-deps - -docs-serve: docs - @echo "Serving documentation on http://localhost:8000" - @python3 -m http.server 8000 --directory target/doc - -# ------------------------------------------------------------ -# Load Testing +# Load Testing & Benchmarking # ------------------------------------------------------------ load-test: cargo run -p load-tester -- --network testnet --max-subscriptions 10 --step-size 1 # ------------------------------------------------------------ -# Local cluster (Tilt) +# Publisher Run Commands # ------------------------------------------------------------ -# Default values for minikube resources -MINIKUBE_DISK_SIZE ?= 50000mb -MINIKUBE_MEMORY ?= 8000mb - -tilt_%: - @./scripts/set_envs.sh - @./cluster/scripts/gen_env_secret.sh - @tilt --file ${TILTFILE} $* $(ARGS) - -cluster_up: %: tilt_% ## Start Tiltfile services. -cluster_down: %: tilt_% ## Stop Tiltfile services. -cluster_reset: down up ## Reset Tiltfile services. +run-publisher: check-network + @./scripts/run_publisher.sh \ + --network $(NETWORK) \ + --mode $(MODE) \ + $(if $(PORT),--port $(PORT),) \ + $(if $(TELEMETRY_PORT),--telemetry-port $(TELEMETRY_PORT),) \ + $(if $(extra_args),--extra-args "$(extra_args)",) -# Minikube and K8s setup commands -minikube_%: - @./cluster/scripts/$*_minikube.sh "$(MINIKUBE_DISK_SIZE)" "$(MINIKUBE_MEMORY)" +run-mainnet-dev: + $(MAKE) run-publisher NETWORK=mainnet MODE=dev -k8s_setup: - @./cluster/scripts/setup_k8s.sh +run-mainnet-profiling: + $(MAKE) run-publisher NETWORK=mainnet MODE=profiling -cluster_setup: minikube_setup k8s_setup helm_setup ## Setup both minikube and kubernetes configuration +run-testnet-dev: + $(MAKE) run-publisher NETWORK=testnet MODE=dev -helm_setup: ## Update Helm dependencies - @echo "Updating Helm dependencies..." - cd cluster/charts/fuel-local && helm dependency update - cd cluster/charts/fuel-nats && helm dependency update - cd cluster/charts/fuel-streams-publisher && helm dependency update - cd cluster/charts/fuel-streams-ws && helm dependency update +run-testnet-profiling: + $(MAKE) run-publisher NETWORK=testnet MODE=profiling # ------------------------------------------------------------ -# Websocket +# Docker Compose # ------------------------------------------------------------ -ws: - websocat -v ws://127.0.0.1:5000 +run-docker-compose: + @./scripts/set_env.sh + @docker compose -f cluster/docker/docker-compose.yml --env-file .env $(COMMAND) + +start-nats: + $(MAKE) run-docker-compose COMMAND="up -d" + +stop-nats: + $(MAKE) run-docker-compose COMMAND="down" + +restart-nats: + $(MAKE) run-docker-compose COMMAND="restart" + +clean-nats: + $(MAKE) run-docker-compose COMMAND="down -v --rmi all --remove-orphans" # ------------------------------------------------------------ -# Help +# Local cluster (Minikube) # ------------------------------------------------------------ -help: - @echo "Available commands:" - @echo "" - @echo "Core Commands:" - @echo " all - Show this help message" - @echo " build - Build the project in release mode" - @echo " clean - Clean all artifacts" - @echo " clean/build - Clean build artifacts" - @echo " clean/docker - Clean docker resources" - @echo " install - Install project dependencies" - @echo " setup - Run the setup script" - @echo "" - @echo "Development Workflow:" - @echo " dev-watch - Run in development watch mode" - @echo " ci - Run CI checks (lint, test, coverage, audit)" - @echo "" - @echo "Cluster Setup:" - @echo " cluster_setup - Setup both minikube and k8s configuration" - @echo " minikube_setup - Setup minikube with required addons" - @echo " k8s_setup - Setup kubernetes configuration" - @echo "" - @echo "Version Control:" - @echo " version - Show current version" - @echo " bump-version - Bump version (NEW_VERSION=X.Y.Z required)" - @echo " release - Prepare a new release (NEW_VERSION=X.Y.Z required)" - @echo " release-dry-run - Perform a dry run of the release process" - @echo "" - @echo "Testing:" - @echo " test - Run tests" - @echo " test-watch - Run tests in watch mode" - @echo " coverage - Generate test coverage" - @echo " bench - Run benchmarks" - @echo "" - @echo "Code Quality:" - @echo " fmt - Format all code (cargo, rust, prettier, markdown)" - @echo " fmt-cargo - Format Cargo.toml files" - @echo " fmt-rust - Format Rust code" - @echo " fmt-prettier - Format with Prettier" - @echo " fmt-markdown - Format markdown files" - @echo " lint - Run all linters" - @echo " lint-cargo - Lint Cargo.toml files" - @echo " lint-rust - Lint Rust code" - @echo " lint-clippy - Run Clippy" - @echo " lint-prettier - Lint with Prettier" - @echo " lint-markdown - Lint markdown files" - @echo " check - Run cargo check" - @echo "" - @echo "Documentation:" - @echo " docs - Generate documentation" - @echo " docs-serve - Serve documentation locally" - @echo "" - @echo "Security:" - @echo " audit - Run security audit" - @echo " audit-fix - Fix security issues" - @echo " audit-fix-test - Test fixing security issues" - @echo "" - @echo "Environment Validation:" - @echo " validate-env - Validate development environment" - @echo " check-commands - Check required commands are installed" - @echo " check-versions - Check tool versions" - @echo " check-dev-env - Check development environment" - @echo " check-network - Validate network selection" - @echo "" - @echo "Docker Operations:" - @echo " start - Start containers" - @echo " stop - Stop containers" - @echo " restart - Restart containers" - @echo " start/ - Start specific profile ($(PROFILES))" - @echo " stop/ - Stop specific profile" - @echo " restart/ - Restart specific profile" - @echo " clean/ - Clean specific profile" - @echo "" - @echo "Network Operations:" - @echo " start-mainnet - Start mainnet configuration" - @echo " start-testnet - Start testnet configuration" - @echo " stop-mainnet - Stop mainnet configuration" - @echo " stop-testnet - Stop testnet configuration" - @echo " start-/ - Start specific network/profile combination" - @echo " stop-/ - Stop specific network/profile combination" - @echo "" - @echo "Publisher Commands:" - @echo " run-publisher - Run publisher with current network and mode" - @echo " run-mainnet-dev - Run publisher in mainnet dev mode" - @echo " run-mainnet-profiling- Run publisher in mainnet profiling mode" - @echo " run-testnet-dev - Run publisher in testnet dev mode" - @echo " run-testnet-profiling- Run publisher in testnet profiling mode" - @echo "" - @echo "Environment Variables:" - @echo " NETWORK - Network to use (mainnet/testnet)" - @echo " PORT - Port to use (default: 4000)" - @echo " MODE - Mode to run in (dev/profiling)" - @echo " EXTRA_ARGS - Additional arguments to pass to the publisher" - @echo " NEW_VERSION - Version number for bump-version and release commands" - @echo "" - @echo "Available Profiles: $(PROFILES)" - @echo "Available Networks: $(NETWORKS)" - @echo "Available Modes: $(MODES)" +# Environment variables with defaults +NETWORK ?= testnet +MODE ?= profiling +PORT ?= 4000 +TELEMETRY_PORT ?= 8080 + +minikube-setup: + @./cluster/scripts/setup_minikube.sh "$(DISK_SIZE)" "$(MEMORY)" + +minikube-start: + @echo "Starting minikube with disk-size=$(DISK_SIZE), memory=$(MEMORY)..." + minikube start \ + --driver=docker \ + --disk-size="$(DISK_SIZE)" \ + --memory="$(MEMORY)" \ + --cpus 8 \ + --insecure-registry registry.dev.svc.cluster.local:5000 + @echo -e "\n\033[1;33mMinikube Status:\033[0m" + @minikube status + +minikube-delete: + @echo "Deleting minikube..." + @minikube delete + +k8s-setup: + @echo "Setting up k8s..." + @./cluster/scripts/setup_k8s.sh $(NAMESPACE) + +helm-setup: + @cd cluster/charts/fuel-streams && helm dependency update + @cd cluster/charts/fuel-streams-publisher && helm dependency update + +cluster-setup: minikube-setup k8s-setup helm-setup + +pre-cluster: + @./scripts/set_env.sh + @./cluster/scripts/gen_env_secret.sh + +# Cluster management commands +cluster-up: pre-cluster + CLUSTER_MODE=$(MODE) tilt --file ./Tiltfile up + +cluster-down: pre-cluster + CLUSTER_MODE=$(MODE) tilt --file ./Tiltfile down + +cluster-reset: pre-cluster + CLUSTER_MODE=$(MODE) tilt --file ./Tiltfile reset diff --git a/Tiltfile b/Tiltfile index 9e5eeeba..8d6a0b54 100755 --- a/Tiltfile +++ b/Tiltfile @@ -18,7 +18,7 @@ custom_build( './src', './Cargo.toml', './Cargo.lock', - './docker/fuel-streams-publisher.Dockerfile' + './cluster/docker/fuel-streams-publisher.Dockerfile' ], live_update=[ sync('./src', '/usr/src'), @@ -51,73 +51,75 @@ custom_build( ) # Deploy the Helm chart with values from .env +# Get deployment mode from environment variable, default to 'full' +config_mode = os.getenv('CLUSTER_MODE', 'full') + +# Resource configurations +RESOURCES = { + 'publisher': { + 'name': 'fuel-streams-publisher', + 'ports': ['4000:4000', '8080:8080'], + 'labels': 'publisher', + 'config_mode': ['minimal', 'full'] + }, + 'nats-core': { + 'name': 'fuel-streams-nats-core', + 'ports': ['4222:4222', '8222:8222'], + 'labels': 'nats', + 'config_mode': ['minimal', 'full'] + }, + 'nats-client': { + 'name': 'fuel-streams-nats-client', + 'ports': ['4223:4222', '8443:8443'], + 'labels': 'nats', + 'config_mode': ['minimal', 'full'] + }, + 'nats-publisher': { + 'name': 'fuel-streams-nats-publisher', + 'ports': ['4224:4222'], + 'labels': 'nats', + 'config_mode': ['minimal', 'full'] + }, + # 'grafana': { + # 'name': 'fuel-streams-grafana', + # 'ports': ['3000:3000'], + # 'labels': 'monitoring', + # 'config_mode': ['minimal', 'full'] + # }, + # 'prometheus-operator': { + # 'name': 'fuel-streams-prometheus-operator', + # 'labels': 'monitoring', + # 'config_mode': ['minimal', 'full'] + # }, + # 'kube-state-metrics': { + # 'name': 'fuel-streams-kube-state-metrics', + # 'labels': 'monitoring', + # 'config_mode': ['minimal', 'full'] + # }, + # 'node-exporter': { + # 'name': 'fuel-streams-prometheus-node-exporter', + # 'labels': 'monitoring', + # 'config_mode': ['minimal', 'full'] + # } +} + k8s_yaml(helm( - 'cluster/charts/fuel-local', - name='local', - namespace='fuel-local', + 'cluster/charts/fuel-streams', + name='fuel-streams', + namespace='fuel-streams', values=[ - 'cluster/charts/fuel-local/values.yaml', - 'cluster/charts/fuel-local/values-ws-env.yaml', + 'cluster/charts/fuel-streams/values-publisher-secrets.yaml', + 'cluster/charts/fuel-streams/values.yaml' ] )) -# k8s resources -ports = { - "monitoring": ["9090:9090", "3000:3000"], - "elasticsearch": ["9200:9200", "9300:9300"], - "kibana": ["5601:5601"], - "publisher": ["4000:4000", "8080:8080"], - "streamer": ["9003:9003"], - "nats": ["4222:4222"], - "nats-box": [], -} - -deps = { - "monitoring": [], - "elasticsearch": [], - "kibana": ["elasticsearch"], - "publisher": [], - "streamer": [], - "nats": [], - "nats-box": [], -} - -k8s_resource("monitoring", - port_forwards=ports["monitoring"], - resource_deps=deps["monitoring"], - labels="monitoring" -) -k8s_resource("elasticsearch", - port_forwards=ports["elasticsearch"], - resource_deps=deps["elasticsearch"], - labels="logging" -) -k8s_resource("kibana", - port_forwards=ports["kibana"], - resource_deps=deps["kibana"], - labels="logging" -) -k8s_resource("local-fuel-streams-publisher", - new_name="publisher", # Override the display name - resource_deps=deps["publisher"], - port_forwards=ports["publisher"], - labels="publisher" -) -k8s_resource("local-fuel-streams-ws", - new_name="steamer", # Override the display name - resource_deps=deps["steamer"], - port_forwards=ports["steamer"], - labels="steamer" -) -k8s_resource("local-nats", - new_name="nats", - port_forwards=ports["nats"], - resource_deps=deps["nats"], - labels="nats" -) -k8s_resource("local-nats-box", - new_name="nats-box", - port_forwards=ports["nats-box"], - resource_deps=deps["nats-box"], - labels="nats" -) +# Configure k8s resources +for name, resource in RESOURCES.items(): + if config_mode in resource['config_mode']: + k8s_resource( + resource['name'], + new_name=name, + port_forwards=resource.get('ports', []), + resource_deps=resource.get('deps', []), + labels=resource['labels'] + ) diff --git a/benches/nats-publisher/README.md b/benches/nats-publisher/README.md index 412fb76e..1dbe8ad5 100644 --- a/benches/nats-publisher/README.md +++ b/benches/nats-publisher/README.md @@ -1,34 +1,18 @@ # Running -1. First generate your key pair: +1. First make sure you have your `.env` configured properly: ```sh - fuel-core-keygen new --key-type peering -p + make create-env ``` 2. Make sure you have NATS server running within the workspace root: ```sh - make start/nats + make start-nats ``` 3. The, you can start local node and start publishing on NATS: - ```sh - cargo run -- --service-name "test-jetstream" \ - --keypair \ - https://sepolia.infura.io/v3/ \ - 0.0.0.0 \ - --port 4004 \ - --peering-port 30333 \ - --db-path ../../docker/db \ - --snapshot ../../docker/chain-config \ - --enable-p2p \ - --reserved-nodes /dns4/p2p-testnet-temp.fuel.network/tcp/30339/p2p/16Uiu2HAmKRLmFHbtm5aUucY1o4WVEPQw877pvwuSKcKh9KSFyiwd \ - --sync-header-batch-size 100 \ - --enable-relayer \ - --relayer-v2-listening-contracts 0x01855B78C1f8868DE70e84507ec735983bf262dA \ - --relayer-da-deploy-height 5827607 \ - --relayer-log-page-size 10 \ - --sync-block-stream-buffer-size 30 < YOUR_KEYPAIR > --relayer < YOUR_INFURA_KEY > --ip + make run-publisher ``` diff --git a/cluster/README.md b/cluster/README.md index d4aa1e62..389ef86f 100755 --- a/cluster/README.md +++ b/cluster/README.md @@ -27,41 +27,38 @@ The following are prerequisites for spinning up the fuel-data-systems cluster lo 1. To setup and start the local environment, run: ```bash - make cluster_setup # Sets up both minikube and kubernetes configuration + make cluster-setup # Sets up both minikube and kubernetes configuration ``` Alternatively, you can run the setup steps individually: ```bash - make minikube_setup # Sets up minikube with required addons - make k8s_setup # Configures kubernetes with proper namespace and context + make minikube-setup # Sets up minikube with required addons + make k8s-setup # Configures kubernetes with proper namespace and context ``` You can also start the minikube cluster without running the setup script: ```bash - make minikube_start # Start minikube cluster + make minikube-start # Start minikube cluster ``` 2. Start the Tilt services: ```bash - make cluster_up # Starts Tiltfile services + make cluster-up # Starts Tiltfile services ``` -> **Note for Docker Desktop Users:** -> To get ingress to work you'll need to open a new terminal window and run `minikube tunnel` and in the following step use `127.0.0.1` in place of ``. - You can use the following commands to manage the services: ```bash -make cluster_up # Start services -make cluster_down # Stop services -make cluster_reset # Reset services -make minikube_start # Start minikube (if you've already run setup before) +make cluster-up # Start services +make cluster-down # Stop services +make cluster-reset # Reset services +make minikube-start # Start minikube (if you've already run setup before) ``` ## Using `k9s` for an interactive terminal UI Install k9s from [here](https://github.com/derailed/k9s) -Run it with `k9s --context= --namespace=` e.g. `k9s --context=minikube --namespace=fuel-local`. You can do things like view logs with `l`, describe with `d`, delete with `Ctrl+d`. +Run it with `k9s --context= --namespace=` e.g. `k9s --context=minikube --namespace=fuel-streams`. You can do things like view logs with `l`, describe with `d`, delete with `Ctrl+d`. ## Useful links diff --git a/docker/chain-config/mainnet/chain_config.json b/cluster/chain-config/mainnet/chain_config.json similarity index 100% rename from docker/chain-config/mainnet/chain_config.json rename to cluster/chain-config/mainnet/chain_config.json diff --git a/docker/chain-config/mainnet/metadata.json b/cluster/chain-config/mainnet/metadata.json similarity index 100% rename from docker/chain-config/mainnet/metadata.json rename to cluster/chain-config/mainnet/metadata.json diff --git a/docker/chain-config/mainnet/state_config.json b/cluster/chain-config/mainnet/state_config.json similarity index 100% rename from docker/chain-config/mainnet/state_config.json rename to cluster/chain-config/mainnet/state_config.json diff --git a/docker/chain-config/mainnet/state_transition_bytecode.wasm b/cluster/chain-config/mainnet/state_transition_bytecode.wasm similarity index 100% rename from docker/chain-config/mainnet/state_transition_bytecode.wasm rename to cluster/chain-config/mainnet/state_transition_bytecode.wasm diff --git a/docker/chain-config/testnet/chain_config.json b/cluster/chain-config/testnet/chain_config.json similarity index 100% rename from docker/chain-config/testnet/chain_config.json rename to cluster/chain-config/testnet/chain_config.json diff --git a/docker/chain-config/testnet/metadata.json b/cluster/chain-config/testnet/metadata.json similarity index 100% rename from docker/chain-config/testnet/metadata.json rename to cluster/chain-config/testnet/metadata.json diff --git a/docker/chain-config/testnet/state_config.json b/cluster/chain-config/testnet/state_config.json similarity index 100% rename from docker/chain-config/testnet/state_config.json rename to cluster/chain-config/testnet/state_config.json diff --git a/docker/chain-config/testnet/state_transition_bytecode.wasm b/cluster/chain-config/testnet/state_transition_bytecode.wasm similarity index 100% rename from docker/chain-config/testnet/state_transition_bytecode.wasm rename to cluster/chain-config/testnet/state_transition_bytecode.wasm diff --git a/cluster/charts/fuel-local/Chart.lock b/cluster/charts/fuel-local/Chart.lock deleted file mode 100644 index 00258461..00000000 --- a/cluster/charts/fuel-local/Chart.lock +++ /dev/null @@ -1,12 +0,0 @@ -dependencies: -- name: fuel-streams-publisher - repository: file://../fuel-streams-publisher - version: 0.3.7 -- name: fuel-streams-ws - repository: file://../fuel-streams-ws - version: 0.3.7 -- name: fuel-nats - repository: file://../fuel-nats - version: 0.1.0 -digest: sha256:4362071bef367c36d9433fa948178f176614e65a69cd5e08f880937f2c4795df -generated: "2024-11-30T00:12:23.285838-03:00" diff --git a/cluster/charts/fuel-local/Chart.yaml b/cluster/charts/fuel-local/Chart.yaml deleted file mode 100755 index 14d22bd4..00000000 --- a/cluster/charts/fuel-local/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: fuel-local -version: 0.2.0 -dependencies: - - name: fuel-streams-publisher - version: "0.3.8" - repository: "file://../fuel-streams-publisher" - - name: fuel-streams-ws - version: "0.3.8" - repository: "file://../fuel-streams-ws" - - name: fuel-nats - version: "0.1.1" - repository: "file://../fuel-nats" diff --git a/cluster/charts/fuel-local/crds/traefik-resources.yaml b/cluster/charts/fuel-local/crds/traefik-resources.yaml deleted file mode 100755 index ee47502d..00000000 --- a/cluster/charts/fuel-local/crds/traefik-resources.yaml +++ /dev/null @@ -1,1598 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: ingressroutes.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: IngressRoute - listKind: IngressRouteList - plural: ingressroutes - singular: ingressroute - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: IngressRoute is an Ingress CRD specification. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IngressRouteSpec is a specification for a IngressRouteSpec - resource. - properties: - entryPoints: - items: - type: string - type: array - routes: - items: - description: Route contains the set of routes. - properties: - kind: - enum: - - Rule - type: string - match: - type: string - middlewares: - items: - description: MiddlewareRef is a ref to the Middleware resources. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - priority: - type: integer - services: - items: - description: Service defines an upstream to proxy traffic. - properties: - kind: - enum: - - Service - - TraefikService - type: string - name: - description: Name is a reference to a Kubernetes Service - object (for a load-balancer of servers), or to a TraefikService - object (service load-balancer, mirroring, etc). The - differentiation between the two is specified in the - Kind field. - type: string - namespace: - type: string - passHostHeader: - type: boolean - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - responseForwarding: - description: ResponseForwarding holds configuration for - the forward of the response. - properties: - flushInterval: - type: string - type: object - scheme: - type: string - serversTransport: - type: string - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration - based on cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - strategy: - type: string - weight: - description: Weight should only be specified when Name - references a TraefikService object (and to be precise, - one that embeds a Weighted Round Robin). - type: integer - required: - - name - type: object - type: array - required: - - kind - - match - type: object - type: array - tls: - description: "TLS contains the TLS certificates configuration of the - routes. To enable Let's Encrypt, use an empty TLS struct, e.g. in - YAML: \n \t tls: {} # inline format \n \t tls: \t secretName: - # block format" - properties: - certResolver: - type: string - domains: - items: - description: Domain holds a domain name with SANs. - properties: - main: - type: string - sans: - items: - type: string - type: array - type: object - type: array - options: - description: Options is a reference to a TLSOption, that specifies - the parameters of the TLS connection. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - secretName: - description: SecretName is the name of the referenced Kubernetes - Secret to specify the certificate details. - type: string - store: - description: Store is a reference to a TLSStore, that specifies - the parameters of the TLS store. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - type: object - required: - - routes - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: ingressroutetcps.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: IngressRouteTCP - listKind: IngressRouteTCPList - plural: ingressroutetcps - singular: ingressroutetcp - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: IngressRouteTCP is an Ingress CRD specification. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IngressRouteTCPSpec is a specification for a IngressRouteTCPSpec - resource. - properties: - entryPoints: - items: - type: string - type: array - routes: - items: - description: RouteTCP contains the set of routes. - properties: - match: - type: string - middlewares: - description: Middlewares contains references to MiddlewareTCP - resources. - items: - description: ObjectReference is a generic reference to a Traefik - resource. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - services: - items: - description: ServiceTCP defines an upstream to proxy traffic. - properties: - name: - type: string - namespace: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - proxyProtocol: - description: ProxyProtocol holds the ProxyProtocol configuration. - properties: - version: - type: integer - type: object - terminationDelay: - type: integer - weight: - type: integer - required: - - name - - port - type: object - type: array - required: - - match - type: object - type: array - tls: - description: "TLSTCP contains the TLS certificates configuration of - the routes. To enable Let's Encrypt, use an empty TLS struct, e.g. - in YAML: \n \t tls: {} # inline format \n \t tls: \t secretName: - # block format" - properties: - certResolver: - type: string - domains: - items: - description: Domain holds a domain name with SANs. - properties: - main: - type: string - sans: - items: - type: string - type: array - type: object - type: array - options: - description: Options is a reference to a TLSOption, that specifies - the parameters of the TLS connection. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - passthrough: - type: boolean - secretName: - description: SecretName is the name of the referenced Kubernetes - Secret to specify the certificate details. - type: string - store: - description: Store is a reference to a TLSStore, that specifies - the parameters of the TLS store. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - type: object - required: - - routes - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: ingressrouteudps.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: IngressRouteUDP - listKind: IngressRouteUDPList - plural: ingressrouteudps - singular: ingressrouteudp - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: IngressRouteUDP is an Ingress CRD specification. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IngressRouteUDPSpec is a specification for a IngressRouteUDPSpec - resource. - properties: - entryPoints: - items: - type: string - type: array - routes: - items: - description: RouteUDP contains the set of routes. - properties: - services: - items: - description: ServiceUDP defines an upstream to proxy traffic. - properties: - name: - type: string - namespace: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - weight: - type: integer - required: - - name - - port - type: object - type: array - type: object - type: array - required: - - routes - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: middlewares.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: Middleware - listKind: MiddlewareList - plural: middlewares - singular: middleware - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Middleware is a specification for a Middleware resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: MiddlewareSpec holds the Middleware configuration. - properties: - addPrefix: - description: AddPrefix holds the AddPrefix configuration. - properties: - prefix: - type: string - type: object - basicAuth: - description: BasicAuth holds the HTTP basic authentication configuration. - properties: - headerField: - type: string - realm: - type: string - removeHeader: - type: boolean - secret: - type: string - type: object - buffering: - description: Buffering holds the request/response buffering configuration. - properties: - maxRequestBodyBytes: - format: int64 - type: integer - maxResponseBodyBytes: - format: int64 - type: integer - memRequestBodyBytes: - format: int64 - type: integer - memResponseBodyBytes: - format: int64 - type: integer - retryExpression: - type: string - type: object - chain: - description: Chain holds a chain of middlewares. - properties: - middlewares: - items: - description: MiddlewareRef is a ref to the Middleware resources. - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - type: array - type: object - circuitBreaker: - description: CircuitBreaker holds the circuit breaker configuration. - properties: - expression: - type: string - type: object - compress: - description: Compress holds the compress configuration. - properties: - excludedContentTypes: - items: - type: string - type: array - type: object - contentType: - description: ContentType middleware - or rather its unique `autoDetect` - option - specifies whether to let the `Content-Type` header, if - it has not been set by the backend, be automatically set to a value - derived from the contents of the response. As a proxy, the default - behavior should be to leave the header alone, regardless of what - the backend did with it. However, the historic default was to always - auto-detect and set the header if it was nil, and it is going to - be kept that way in order to support users currently relying on - it. This middleware exists to enable the correct behavior until - at least the default one can be changed in a future version. - properties: - autoDetect: - type: boolean - type: object - digestAuth: - description: DigestAuth holds the Digest HTTP authentication configuration. - properties: - headerField: - type: string - realm: - type: string - removeHeader: - type: boolean - secret: - type: string - type: object - errors: - description: ErrorPage holds the custom error page configuration. - properties: - query: - type: string - service: - description: Service defines an upstream to proxy traffic. - properties: - kind: - enum: - - Service - - TraefikService - type: string - name: - description: Name is a reference to a Kubernetes Service object - (for a load-balancer of servers), or to a TraefikService - object (service load-balancer, mirroring, etc). The differentiation - between the two is specified in the Kind field. - type: string - namespace: - type: string - passHostHeader: - type: boolean - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - responseForwarding: - description: ResponseForwarding holds configuration for the - forward of the response. - properties: - flushInterval: - type: string - type: object - scheme: - type: string - serversTransport: - type: string - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration based - on cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - strategy: - type: string - weight: - description: Weight should only be specified when Name references - a TraefikService object (and to be precise, one that embeds - a Weighted Round Robin). - type: integer - required: - - name - type: object - status: - items: - type: string - type: array - type: object - forwardAuth: - description: ForwardAuth holds the http forward authentication configuration. - properties: - address: - type: string - authRequestHeaders: - items: - type: string - type: array - authResponseHeaders: - items: - type: string - type: array - authResponseHeadersRegex: - type: string - tls: - description: ClientTLS holds TLS specific configurations as client. - properties: - caOptional: - type: boolean - caSecret: - type: string - certSecret: - type: string - insecureSkipVerify: - type: boolean - type: object - trustForwardHeader: - type: boolean - type: object - headers: - description: Headers holds the custom header configuration. - properties: - accessControlAllowCredentials: - description: AccessControlAllowCredentials is only valid if true. - false is ignored. - type: boolean - accessControlAllowHeaders: - description: AccessControlAllowHeaders must be used in response - to a preflight request with Access-Control-Request-Headers set. - items: - type: string - type: array - accessControlAllowMethods: - description: AccessControlAllowMethods must be used in response - to a preflight request with Access-Control-Request-Method set. - items: - type: string - type: array - accessControlAllowOriginList: - description: AccessControlAllowOriginList is a list of allowable - origins. Can also be a wildcard origin "*". - items: - type: string - type: array - accessControlAllowOriginListRegex: - description: AccessControlAllowOriginListRegex is a list of allowable - origins written following the Regular Expression syntax (https://golang.org/pkg/regexp/). - items: - type: string - type: array - accessControlExposeHeaders: - description: AccessControlExposeHeaders sets valid headers for - the response. - items: - type: string - type: array - accessControlMaxAge: - description: AccessControlMaxAge sets the time that a preflight - request may be cached. - format: int64 - type: integer - addVaryHeader: - description: AddVaryHeader controls if the Vary header is automatically - added/updated when the AccessControlAllowOriginList is set. - type: boolean - allowedHosts: - items: - type: string - type: array - browserXssFilter: - type: boolean - contentSecurityPolicy: - type: string - contentTypeNosniff: - type: boolean - customBrowserXSSValue: - type: string - customFrameOptionsValue: - type: string - customRequestHeaders: - additionalProperties: - type: string - type: object - customResponseHeaders: - additionalProperties: - type: string - type: object - featurePolicy: - description: 'Deprecated: use PermissionsPolicy instead.' - type: string - forceSTSHeader: - type: boolean - frameDeny: - type: boolean - hostsProxyHeaders: - items: - type: string - type: array - isDevelopment: - type: boolean - permissionsPolicy: - type: string - publicKey: - type: string - referrerPolicy: - type: string - sslForceHost: - description: 'Deprecated: use RedirectRegex instead.' - type: boolean - sslHost: - description: 'Deprecated: use RedirectRegex instead.' - type: string - sslProxyHeaders: - additionalProperties: - type: string - type: object - sslRedirect: - description: 'Deprecated: use EntryPoint redirection or RedirectScheme - instead.' - type: boolean - sslTemporaryRedirect: - description: 'Deprecated: use EntryPoint redirection or RedirectScheme - instead.' - type: boolean - stsIncludeSubdomains: - type: boolean - stsPreload: - type: boolean - stsSeconds: - format: int64 - type: integer - type: object - inFlightReq: - description: InFlightReq limits the number of requests being processed - and served concurrently. - properties: - amount: - format: int64 - type: integer - sourceCriterion: - description: SourceCriterion defines what criterion is used to - group requests as originating from a common source. If none - are set, the default is to use the request's remote address - field. All fields are mutually exclusive. - properties: - ipStrategy: - description: IPStrategy holds the ip strategy configuration. - properties: - depth: - type: integer - excludedIPs: - items: - type: string - type: array - type: object - requestHeaderName: - type: string - requestHost: - type: boolean - type: object - type: object - ipWhiteList: - description: IPWhiteList holds the ip white list configuration. - properties: - ipStrategy: - description: IPStrategy holds the ip strategy configuration. - properties: - depth: - type: integer - excludedIPs: - items: - type: string - type: array - type: object - sourceRange: - items: - type: string - type: array - type: object - passTLSClientCert: - description: PassTLSClientCert holds the TLS client cert headers configuration. - properties: - info: - description: TLSClientCertificateInfo holds the client TLS certificate - info configuration. - properties: - issuer: - description: TLSCLientCertificateDNInfo holds the client TLS - certificate distinguished name info configuration. cf https://tools.ietf.org/html/rfc3739 - properties: - commonName: - type: boolean - country: - type: boolean - domainComponent: - type: boolean - locality: - type: boolean - organization: - type: boolean - province: - type: boolean - serialNumber: - type: boolean - type: object - notAfter: - type: boolean - notBefore: - type: boolean - sans: - type: boolean - serialNumber: - type: boolean - subject: - description: TLSCLientCertificateDNInfo holds the client TLS - certificate distinguished name info configuration. cf https://tools.ietf.org/html/rfc3739 - properties: - commonName: - type: boolean - country: - type: boolean - domainComponent: - type: boolean - locality: - type: boolean - organization: - type: boolean - province: - type: boolean - serialNumber: - type: boolean - type: object - type: object - pem: - type: boolean - type: object - plugin: - additionalProperties: - x-kubernetes-preserve-unknown-fields: true - type: object - rateLimit: - description: RateLimit holds the rate limiting configuration for a - given router. - properties: - average: - format: int64 - type: integer - burst: - format: int64 - type: integer - period: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - sourceCriterion: - description: SourceCriterion defines what criterion is used to - group requests as originating from a common source. If none - are set, the default is to use the request's remote address - field. All fields are mutually exclusive. - properties: - ipStrategy: - description: IPStrategy holds the ip strategy configuration. - properties: - depth: - type: integer - excludedIPs: - items: - type: string - type: array - type: object - requestHeaderName: - type: string - requestHost: - type: boolean - type: object - type: object - redirectRegex: - description: RedirectRegex holds the redirection configuration. - properties: - permanent: - type: boolean - regex: - type: string - replacement: - type: string - type: object - redirectScheme: - description: RedirectScheme holds the scheme redirection configuration. - properties: - permanent: - type: boolean - port: - type: string - scheme: - type: string - type: object - replacePath: - description: ReplacePath holds the ReplacePath configuration. - properties: - path: - type: string - type: object - replacePathRegex: - description: ReplacePathRegex holds the ReplacePathRegex configuration. - properties: - regex: - type: string - replacement: - type: string - type: object - retry: - description: Retry holds the retry configuration. - properties: - attempts: - type: integer - initialInterval: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - stripPrefix: - description: StripPrefix holds the StripPrefix configuration. - properties: - forceSlash: - type: boolean - prefixes: - items: - type: string - type: array - type: object - stripPrefixRegex: - description: StripPrefixRegex holds the StripPrefixRegex configuration. - properties: - regex: - items: - type: string - type: array - type: object - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: middlewaretcps.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: MiddlewareTCP - listKind: MiddlewareTCPList - plural: middlewaretcps - singular: middlewaretcp - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: MiddlewareTCP is a specification for a MiddlewareTCP resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: MiddlewareTCPSpec holds the MiddlewareTCP configuration. - properties: - ipWhiteList: - description: TCPIPWhiteList holds the TCP ip white list configuration. - properties: - sourceRange: - items: - type: string - type: array - type: object - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: serverstransports.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: ServersTransport - listKind: ServersTransportList - plural: serverstransports - singular: serverstransport - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ServersTransport is a specification for a ServersTransport resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ServersTransportSpec options to configure communication between - Traefik and the servers. - properties: - certificatesSecrets: - description: Certificates for mTLS. - items: - type: string - type: array - disableHTTP2: - description: Disable HTTP/2 for connections with backend servers. - type: boolean - forwardingTimeouts: - description: Timeouts for requests forwarded to the backend servers. - properties: - dialTimeout: - anyOf: - - type: integer - - type: string - description: The amount of time to wait until a connection to - a backend server can be established. If zero, no timeout exists. - x-kubernetes-int-or-string: true - idleConnTimeout: - anyOf: - - type: integer - - type: string - description: The maximum period for which an idle HTTP keep-alive - connection will remain open before closing itself. - x-kubernetes-int-or-string: true - responseHeaderTimeout: - anyOf: - - type: integer - - type: string - description: The amount of time to wait for a server's response - headers after fully writing the request (including its body, - if any). If zero, no timeout exists. - x-kubernetes-int-or-string: true - type: object - insecureSkipVerify: - description: Disable SSL certificate verification. - type: boolean - maxIdleConnsPerHost: - description: If non-zero, controls the maximum idle (keep-alive) to - keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. - type: integer - peerCertURI: - description: URI used to match against SAN URI during the peer certificate - verification. - type: string - rootCAsSecrets: - description: Add cert file for self-signed certificate. - items: - type: string - type: array - serverName: - description: ServerName used to contact the server. - type: string - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: tlsoptions.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: TLSOption - listKind: TLSOptionList - plural: tlsoptions - singular: tlsoption - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: TLSOption is a specification for a TLSOption resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: TLSOptionSpec configures TLS for an entry point. - properties: - alpnProtocols: - items: - type: string - type: array - cipherSuites: - items: - type: string - type: array - clientAuth: - description: ClientAuth defines the parameters of the client authentication - part of the TLS connection, if any. - properties: - clientAuthType: - description: ClientAuthType defines the client authentication - type to apply. - enum: - - NoClientCert - - RequestClientCert - - RequireAnyClientCert - - VerifyClientCertIfGiven - - RequireAndVerifyClientCert - type: string - secretNames: - description: SecretName is the name of the referenced Kubernetes - Secret to specify the certificate details. - items: - type: string - type: array - type: object - curvePreferences: - items: - type: string - type: array - maxVersion: - type: string - minVersion: - type: string - preferServerCipherSuites: - type: boolean - sniStrict: - type: boolean - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: tlsstores.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: TLSStore - listKind: TLSStoreList - plural: tlsstores - singular: tlsstore - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: TLSStore is a specification for a TLSStore resource. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: TLSStoreSpec configures a TLSStore resource. - properties: - defaultCertificate: - description: DefaultCertificate holds a secret name for the TLSOption - resource. - properties: - secretName: - description: SecretName is the name of the referenced Kubernetes - Secret to specify the certificate details. - type: string - required: - - secretName - type: object - required: - - defaultCertificate - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - creationTimestamp: null - name: traefikservices.traefik.containo.us -spec: - group: traefik.containo.us - names: - kind: TraefikService - listKind: TraefikServiceList - plural: traefikservices - singular: traefikservice - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: TraefikService is the specification for a service (that an IngressRoute - refers to) that is usually not a terminal service (i.e. not a pod of servers), - as opposed to a Kubernetes Service. That is to say, it usually refers to - other (children) services, which themselves can be TraefikServices or Services. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ServiceSpec defines whether a TraefikService is a load-balancer - of services or a mirroring service. - properties: - mirroring: - description: Mirroring defines a mirroring service, which is composed - of a main load-balancer, and a list of mirrors. - properties: - kind: - enum: - - Service - - TraefikService - type: string - maxBodySize: - format: int64 - type: integer - mirrors: - items: - description: MirrorService defines one of the mirrors of a Mirroring - service. - properties: - kind: - enum: - - Service - - TraefikService - type: string - name: - description: Name is a reference to a Kubernetes Service - object (for a load-balancer of servers), or to a TraefikService - object (service load-balancer, mirroring, etc). The differentiation - between the two is specified in the Kind field. - type: string - namespace: - type: string - passHostHeader: - type: boolean - percent: - type: integer - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - responseForwarding: - description: ResponseForwarding holds configuration for - the forward of the response. - properties: - flushInterval: - type: string - type: object - scheme: - type: string - serversTransport: - type: string - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration based - on cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - strategy: - type: string - weight: - description: Weight should only be specified when Name references - a TraefikService object (and to be precise, one that embeds - a Weighted Round Robin). - type: integer - required: - - name - type: object - type: array - name: - description: Name is a reference to a Kubernetes Service object - (for a load-balancer of servers), or to a TraefikService object - (service load-balancer, mirroring, etc). The differentiation - between the two is specified in the Kind field. - type: string - namespace: - type: string - passHostHeader: - type: boolean - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - responseForwarding: - description: ResponseForwarding holds configuration for the forward - of the response. - properties: - flushInterval: - type: string - type: object - scheme: - type: string - serversTransport: - type: string - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration based on - cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - strategy: - type: string - weight: - description: Weight should only be specified when Name references - a TraefikService object (and to be precise, one that embeds - a Weighted Round Robin). - type: integer - required: - - name - type: object - weighted: - description: WeightedRoundRobin defines a load-balancer of services. - properties: - services: - items: - description: Service defines an upstream to proxy traffic. - properties: - kind: - enum: - - Service - - TraefikService - type: string - name: - description: Name is a reference to a Kubernetes Service - object (for a load-balancer of servers), or to a TraefikService - object (service load-balancer, mirroring, etc). The differentiation - between the two is specified in the Kind field. - type: string - namespace: - type: string - passHostHeader: - type: boolean - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - responseForwarding: - description: ResponseForwarding holds configuration for - the forward of the response. - properties: - flushInterval: - type: string - type: object - scheme: - type: string - serversTransport: - type: string - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration based - on cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - strategy: - type: string - weight: - description: Weight should only be specified when Name references - a TraefikService object (and to be precise, one that embeds - a Weighted Round Robin). - type: integer - required: - - name - type: object - type: array - sticky: - description: Sticky holds the sticky configuration. - properties: - cookie: - description: Cookie holds the sticky configuration based on - cookie. - properties: - httpOnly: - type: boolean - name: - type: string - sameSite: - type: string - secure: - type: boolean - type: object - type: object - type: object - type: object - required: - - metadata - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- diff --git a/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards.yaml b/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards.yaml deleted file mode 100755 index 19b576c7..00000000 --- a/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: 1 - -providers: - - name: kfs-dashboards - disableDeletion: true - editable: false - type: file - options: - path: /var/lib/grafana/dashboards diff --git a/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards/fuel-publisher-metrics-dashboard.json b/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards/fuel-publisher-metrics-dashboard.json deleted file mode 100644 index 2ab155b8..00000000 --- a/cluster/charts/fuel-local/files/master/monitoring/grafana/dashboards/fuel-publisher-metrics-dashboard.json +++ /dev/null @@ -1,1130 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 5, - "links": [], - "panels": [ - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_last_published_block_timestamp{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Last Published Block Timestamp", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_last_published_block_height{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Last Published Block Height", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_error_rates{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\", error_type=~\"$error_type\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Error Rates ", - "type": "timeseries" - }, - { - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 8, - "title": "Row title", - "type": "row" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "avg(publisher_metrics_message_size_bytes_sum{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"}) / avg(publisher_metrics_message_size_bytes_count{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"})" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "min(publisher_metrics_message_size_bytes_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_message_size_bytes_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "avg(publisher_metrics_message_size_bytes_sum{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}) / avg(publisher_metrics_message_size_bytes_count{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Message Size Histogram (Min, Max, Avg)", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "avg(publisher_metrics_block_latency_seconds_sum{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"}) / avg(publisher_metrics_block_latency_seconds_count{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"})" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "min(publisher_metrics_block_latency_seconds_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_block_latency_seconds_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "avg(publisher_metrics_block_latency_seconds_sum{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}) / avg(publisher_metrics_block_latency_seconds_count{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Publishing Latency (Min, Max, Avg)", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_published_messages_throughput{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": " Message Throughput", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 25 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_total_published_messages{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"}[5m]))", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Total Published Messages", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum(publisher_metrics_total_subscriptions{chain_id=~\"$chain_id\"})", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Total Subscriptions", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_total_failed_messages{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Total Failed Messages ", - "type": "timeseries" - }, - { - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 3, - "title": "Messages", - "type": "row" - } - ], - "schemaVersion": 39, - "tags": ["fuel-publisher"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": "0000000000000000", - "value": "0000000000000000" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_total_published_messages, chain_id)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "chain_id", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_total_published_messages, chain_id)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": true, - "text": "0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92", - "value": "0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_total_published_messages, block_producer)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "block_producer", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_total_published_messages, block_producer)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": true, - "text": "blocks.>", - "value": "blocks.>" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_published_messages_throughput, subject_wildcard)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "subject_wildcard", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_published_messages_throughput, subject_wildcard)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "browser", - "title": "Fuel Publisher Metrics", - "uid": "cdxezjtxf02kge", - "version": 22, - "weekStart": "" -} diff --git a/cluster/charts/fuel-local/files/master/monitoring/grafana/datasources.yaml b/cluster/charts/fuel-local/files/master/monitoring/grafana/datasources.yaml deleted file mode 100755 index 8ed4f46e..00000000 --- a/cluster/charts/fuel-local/files/master/monitoring/grafana/datasources.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: 1 - -datasources: - - name: Prometheus - type: prometheus - access: proxy - url: http://127.0.0.1:9090 - editable: false - jsonData: - timeInterval: 1m diff --git a/cluster/charts/fuel-local/files/master/monitoring/prometheus.yaml b/cluster/charts/fuel-local/files/master/monitoring/prometheus.yaml deleted file mode 100755 index 26244811..00000000 --- a/cluster/charts/fuel-local/files/master/monitoring/prometheus.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# my global config -global: - scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 15s # 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: - - targets: - # - alertmanager:9093 - -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. -rule_files: - # - "first_rules.yml" - # - "second_rules.yml" - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: - # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: - - 'localhost:9090' - - - job_name: 'k8s-pods' - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: - - __meta_kubernetes_pod_annotation_prometheus_io_scrape - action: keep - regex: true - - source_labels: - - __meta_kubernetes_pod_annotation_prometheus_io_path - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: - - __meta_kubernetes_pod_annotation_prometheus_io_scheme - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: - - __address__ - - __meta_kubernetes_pod_annotation_prometheus_io_port - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: - - __meta_kubernetes_namespace - action: replace - target_label: kubernetes_namespace - - source_labels: - - __meta_kubernetes_pod_name - action: replace - target_label: kubernetes_pod_name diff --git a/cluster/charts/fuel-local/scripts/traefik2-ds.sh b/cluster/charts/fuel-local/scripts/traefik2-ds.sh deleted file mode 100755 index ea861fa0..00000000 --- a/cluster/charts/fuel-local/scripts/traefik2-ds.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -# Enable strict error handling -set -euo pipefail -[[ ${DEBUG:-} == true ]] && set -x - -# Constants -K8S_NS="kube-system" -VALID_CONTEXTS=("microk8s" "docker-desktop" "minikube") -CURRENT_CONTEXT=$(kubectl config current-context) -SCRIPT_DIR=$(dirname "$(readlink -f "$0")") - -# Helper function to run kubectl commands -kubectl_cmd() { - kubectl --context="${CURRENT_CONTEXT}" -n "${K8S_NS}" "$@" -} - -# Log script location -echo "Running script from: ${SCRIPT_DIR}" - -# Validate kubernetes context -if [[ ! " ${VALID_CONTEXTS[*]} " =~ ${CURRENT_CONTEXT} ]]; then - echo "Error: Invalid kubernetes context '${CURRENT_CONTEXT}'" - echo "Valid contexts are: ${VALID_CONTEXTS[*]}" - exit 1 -fi -echo "Using valid kubernetes context: ${CURRENT_CONTEXT}" - -# Clean up old ingress controller resources -echo "Cleaning up old ingress controller resources..." -for resource in deployment service; do - if kubectl_cmd get "${resource}/traefik-ingress-controller" &>/dev/null; then - echo "Deleting ${resource}/traefik-ingress-controller..." - kubectl_cmd delete "${resource}/traefik-ingress-controller" - fi -done - -# Apply new DaemonSet configuration -echo "Applying Traefik DaemonSet configuration..." -kubectl_cmd apply -f "${SCRIPT_DIR}/traefik2-ds.yaml" - -echo "Traefik setup completed successfully" diff --git a/cluster/charts/fuel-local/scripts/traefik2-ds.yaml b/cluster/charts/fuel-local/scripts/traefik2-ds.yaml deleted file mode 100755 index 075e3330..00000000 --- a/cluster/charts/fuel-local/scripts/traefik2-ds.yaml +++ /dev/null @@ -1,150 +0,0 @@ -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 - -metadata: - name: traefik-ingress-controller - -rules: - - apiGroups: - - "" - resources: - - services - - endpoints - - secrets - verbs: - - get - - list - - watch - - apiGroups: - - extensions - - networking.k8s.io - resources: - - ingresses - - ingressclasses - verbs: - - get - - list - - watch - - apiGroups: - - extensions - resources: - - ingresses/status - verbs: - - update - - apiGroups: - - traefik.containo.us - resources: - - ingressroutes - - ingressroutetcps - - ingressrouteudps - - middlewares - - middlewaretcps - - serverstransports - - tlsoptions - - tlsstores - - traefikservices - verbs: - - get - - list - - watch - ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 - -metadata: - name: traefik-ingress-controller - -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: traefik-ingress-controller - -subjects: - - kind: ServiceAccount - name: traefik-ingress-controller - namespace: kube-system - ---- -apiVersion: v1 -kind: ServiceAccount - -metadata: - name: traefik-ingress-controller - namespace: kube-system - ---- -kind: DaemonSet -apiVersion: apps/v1 - -metadata: - name: traefik-ingress-controller - namespace: kube-system - labels: - k8s-app: traefik-ingress-lb - -spec: - selector: - matchLabels: - k8s-app: traefik-ingress-lb - name: traefik-ingress-lb - template: - metadata: - labels: - k8s-app: traefik-ingress-lb - name: traefik-ingress-lb - spec: - serviceAccountName: traefik-ingress-controller - terminationGracePeriodSeconds: 60 - containers: - - image: traefik:v2.5 - name: traefik-ingress-lb - ports: - - name: web - containerPort: 80 - hostPort: 80 - - name: websecure - containerPort: 443 - hostPort: 443 - - name: admin - containerPort: 8080 - hostPort: 8080 - securityContext: - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - args: - - --api - - --api.insecure - - --log.level=DEBUG - - --providers.kubernetescrd - - --providers.kubernetesingress - - --entrypoints.web.address=:80 - - --entrypoints.websecure.address=:443 - - --entrypoints.web.http.redirections.entryPoint.to=websecure - - --entrypoints.web.http.redirections.entryPoint.scheme=https - ---- -kind: Service -apiVersion: v1 - -metadata: - name: traefik-ingress-service - namespace: kube-system - -spec: - selector: - k8s-app: traefik-ingress-lb - ports: - - protocol: TCP - port: 80 - name: web - - protocol: TCP - port: 443 - name: websecure - - protocol: TCP - port: 8080 - name: admin - type: LoadBalancer diff --git a/cluster/charts/fuel-local/templates/elasticsearch.yaml b/cluster/charts/fuel-local/templates/elasticsearch.yaml deleted file mode 100755 index 38ea600f..00000000 --- a/cluster/charts/fuel-local/templates/elasticsearch.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{ if not .Values.onlyRequiredBaseServices }} -{{ if .Values.elasticsearch.enabled }} -apiVersion: v1 -kind: Service -metadata: - labels: - service: elasticsearch - name: elasticsearch -spec: - clusterIP: None - ports: - - name: "elasticsearch1" - port: 9200 - targetPort: 9200 - - name: "elasticsearch2" - port: 9300 - targetPort: 9300 - selector: - service: elasticsearch ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - service: elasticsearch - name: elasticsearch -spec: - serviceName: elasticsearch - replicas: 1 - selector: - matchLabels: - service: elasticsearch - template: - metadata: - labels: - service: elasticsearch - spec: - serviceAccountName: {{ .Values.serviceAccount }} - #imagePullSecrets: - #- name: fuel-local - containers: - - env: - - name: discovery.type - value: "single-node" - image: "{{ .Values.elasticsearch.image }}:{{ .Values.elasticsearch.tag }}" - name: elasticsearch - ports: - - containerPort: 9200 - - containerPort: 9300 - {{- if not .Values.disableResourceLimits }} - resources: - {{- .Values.resourceProfile.elasticsearch | toYaml | nindent 10 }} - {{- end }} - volumeMounts: - - mountPath: /data - name: elasticsearch-data - subPath: data - restartPolicy: Always - volumeClaimTemplates: - - metadata: - name: elasticsearch-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ default "1Gi" .Values.elasticsearch.storage }} -{{ end }} -{{ end }} diff --git a/cluster/charts/fuel-local/templates/ingress.yaml b/cluster/charts/fuel-local/templates/ingress.yaml deleted file mode 100755 index 7086440e..00000000 --- a/cluster/charts/fuel-local/templates/ingress.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Documentation and Examples -# https://docs.traefik.io/routing/providers/kubernetes-crd/ -# https://www.bookstack.cn/read/traefik-2.2-en/0f5c8cefbae45c3f.md - -{{ if not .Values.onlyRequiredBaseServices }} -{{ if .Values.ingress.enabled }} -apiVersion: traefik.containo.us/v1alpha1 -kind: IngressRoute -metadata: - name: fuel-ingress -spec: - entryPoints: - - web - - websecure - tls: - domains: - - main: {{ .Values.kibanaDomain }} - routes: - {{ if .Values.kibana.enabled }} - - kind: Rule - match: Host(`{{ .Values.kibanaDomain }}`) - services: - - kind: Service - name: kibana - port: 5601 - {{ end }} -{{ end }} -{{ end }} diff --git a/cluster/charts/fuel-local/templates/k8s-tools.yaml b/cluster/charts/fuel-local/templates/k8s-tools.yaml deleted file mode 100755 index 625bbc34..00000000 --- a/cluster/charts/fuel-local/templates/k8s-tools.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: ConfigMap - -metadata: - name: k8s-tools - -data: - await-jobs.sh: |- - set -eo pipefail - - NAMESPACE="fuel-local" - - if [[ -n "${JOBS}" ]]; then - IFS=',' read -r -a AWAIT_JOBS <<< "${JOBS}" - for JOB_NAME in ${AWAIT_JOBS[@]}; do - while ! kubectl wait --timeout=3s --for=condition=complete job/${JOB_NAME} 1>/dev/null 2>&1; do - echo "Awaiting ${JOB_NAME} to complete..." - done - done - fi - - if [[ -n "${PODS}" ]]; then - IFS=',' read -r -a AWAIT_PODS <<< "${PODS}" - for POD_NAME in ${AWAIT_PODS[@]}; do - RUNNING_POD_NAME="" - while ! kubectl wait --timeout=3s --for=condition=ready pod/${RUNNING_POD_NAME} 1>/dev/null 2>&1; do - echo "Awaiting ${POD_NAME} (${RUNNING_POD_NAME:-not yet started}) to be ready..." - RUNNING_POD_NAME=$(kubectl get pod --namespace=${NAMESPACE} -l service=${POD_NAME} -o jsonpath="{.items[0].metadata.name}" 2>/dev/null || sleep 10) - done - done - fi diff --git a/cluster/charts/fuel-local/templates/kibana.yaml b/cluster/charts/fuel-local/templates/kibana.yaml deleted file mode 100755 index b8ad521e..00000000 --- a/cluster/charts/fuel-local/templates/kibana.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{ if not .Values.onlyRequiredBaseServices }} -{{ if .Values.kibana.enabled }} -apiVersion: v1 -kind: Service -metadata: - labels: - service: kibana - name: kibana -spec: - ports: - - name: kibana - port: 5601 - targetPort: 5601 - selector: - service: kibana ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - service: kibana - name: kibana -spec: - replicas: 1 - selector: - matchLabels: - service: kibana - strategy: - type: Recreate - template: - metadata: - labels: - service: kibana - spec: - serviceAccountName: {{ .Values.serviceAccount }} - #imagePullSecrets: - #- name: fuel-local - containers: - - name: kibana - image: "{{ .Values.kibana.image }}:{{ .Values.kibana.tag }}" - env: - - name: SERVER_HOST - value: 0.0.0.0 - - name: ELASTICSEARCH_HOSTS - value: http://elasticsearch:9200 - ports: - - containerPort: 5601 - readinessProbe: - tcpSocket: - port: 5601 - initialDelaySeconds: 300 - periodSeconds: 3 - timeoutSeconds: 3 - successThreshold: 1 - failureThreshold: 3 - {{- if not .Values.disableResourceLimits }} - resources: - {{- .Values.resourceProfile.kibana | toYaml | nindent 10 }} - {{- end }} -{{ end }} -{{ end }} diff --git a/cluster/charts/fuel-local/templates/monitoring.yaml b/cluster/charts/fuel-local/templates/monitoring.yaml deleted file mode 100755 index 3a6cb986..00000000 --- a/cluster/charts/fuel-local/templates/monitoring.yaml +++ /dev/null @@ -1,153 +0,0 @@ -{{ if not .Values.onlyRequiredBaseServices }} -{{ if .Values.monitoring.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-datasources -data: - datasources.yaml: {{ tpl (.Files.Get (printf "files/%s/monitoring/grafana/datasources.yaml" (.Values.monitoring.configFilesFolders.grafanaDatasource | default "master"))) . | quote }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-dashboards-provisioning -data: - dashboards.yaml: {{ tpl (.Files.Get (printf "files/%s/monitoring/grafana/dashboards.yaml" (.Values.monitoring.configFilesFolders.grafanaDashboards | default "master"))) . | quote }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: grafana-dashboards -data: - fuel-publisher-metrics-dashboard.json: {{ tpl (.Files.Get (printf "files/%s/monitoring/grafana/dashboards/fuel-publisher-metrics-dashboard.json" (.Values.monitoring.configFilesFolders.fuelPublisher | default "master"))) . | quote }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: prometheus -data: - prometheus.yml: {{ tpl (.Files.Get (printf "files/%s/monitoring/prometheus.yaml" (.Values.monitoring.configFilesFolders.prometheus | default "master"))) . | quote }} ---- -apiVersion: v1 -kind: Service -metadata: - labels: - service: monitoring - name: monitoring -spec: - ports: - - name: grafana - port: 3000 - protocol: TCP - targetPort: 3000 - - name: prometheus - port: 9090 - protocol: TCP - targetPort: 9090 - selector: - service: monitoring ---- -{{ if .Values.roles.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: prometheus -rules: - - apiGroups: [""] - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - verbs: ["get", "list", "watch"] - - apiGroups: - - extensions - resources: - - ingresses - verbs: ["get", "list", "watch"] - - nonResourceURLs: ["/metrics"] - verbs: ["get"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: prometheus -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: prometheus -subjects: - - kind: ServiceAccount - name: {{ .Values.serviceAccount }} - namespace: {{ .Values.namespace }} ---- -{{ end }} -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - service: monitoring - name: monitoring -spec: - replicas: 1 - selector: - matchLabels: - service: monitoring - template: - metadata: - labels: - service: monitoring - spec: - serviceAccountName: {{ .Values.serviceAccount }} - #imagePullSecrets: - #- name: fuel-local - containers: - - image: "{{ .Values.grafana.image }}:{{ .Values.grafana.tag }}" - name: grafana - ports: - - name: "http" - containerPort: 3000 - {{- if not .Values.disableResourceLimits }} - resources: - {{- .Values.resourceProfile.grafana | toYaml | nindent 10 }} - {{- end }} - volumeMounts: - - mountPath: /etc/grafana/provisioning/datasources/ - name: grafana-datasources - - mountPath: /etc/grafana/provisioning/dashboards/ - name: grafana-dashboards-provisioning - - mountPath: /var/lib/grafana/dashboards/ - name: grafana-dashboards - - image: "{{ .Values.prometheus.image }}:{{ .Values.prometheus.tag }}" - name: prometheus - env: - - name: METRIC_CLIENT_SSL_PASSWORD - value: metric-client-password - ports: - - name: "http" - containerPort: 9090 - {{- if not .Values.disableResourceLimits }} - resources: - {{- .Values.resourceProfile.prometheus | toYaml | nindent 10 }} - {{- end }} - volumeMounts: - - mountPath: /etc/prometheus/prometheus.yml - name: prometheus - subPath: prometheus.yml - volumes: - - name: grafana-datasources - configMap: - name: grafana-datasources - - name: grafana-dashboards - configMap: - name: grafana-dashboards - - name: grafana-dashboards-provisioning - configMap: - name: grafana-dashboards-provisioning - - name: prometheus - configMap: - name: prometheus - restartPolicy: Always -{{ end }} -{{ end }} diff --git a/cluster/charts/fuel-local/templates/secret.yaml b/cluster/charts/fuel-local/templates/secret.yaml deleted file mode 100644 index 1ad325b0..00000000 --- a/cluster/charts/fuel-local/templates/secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Release.Name }}-fuel-streams-publisher - labels: - {{- include "fuel-streams-publisher.labels" . | nindent 4 }} -type: Opaque -stringData: - {{- range $key, $value := index .Values "fuel-streams-publisher" "secrets" }} - {{ $key }}: {{ $value | default "" | quote }} - {{- end }} diff --git a/cluster/charts/fuel-local/templates/service-account.yaml b/cluster/charts/fuel-local/templates/service-account.yaml deleted file mode 100755 index 3e0d9cc2..00000000 --- a/cluster/charts/fuel-local/templates/service-account.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{ if .Values.roles.create }} -{{ if ne .Values.serviceAccount "default" }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.serviceAccount }} - namespace: {{ .Values.namespace }} -{{ end }} -{{ end }} diff --git a/cluster/charts/fuel-local/values.yaml b/cluster/charts/fuel-local/values.yaml deleted file mode 100755 index f3c9725f..00000000 --- a/cluster/charts/fuel-local/values.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# general settings -namespace: fuel-local -clusterBaseUrl: svc.cluster.local -serviceAccount: local-fuel-serviceaccount -kibanaDomain: local-kibana.fuel.com -disableResourceLimits: false -waitForServiceDependencies: true -# Only start absolutely required jobs -onlyRequiredBaseServices: false - -docker: - registry: registry.dev.svc.cluster.local:5000 - -ingress: - enabled: true - -roles: - create: true - -# service settings -grafana: - image: "grafana/grafana" - tag: "7.2.1" - -prometheus: - image: "prom/prometheus" - tag: "v2.22.0" - -elasticsearch: - enabled: true - storage: "100Mi" - image: "docker.elastic.co/elasticsearch/elasticsearch" - tag: "7.10.2" - configFilesFolders: {} - -monitoring: - enabled: true - configFilesFolders: {} - -kibana: - enabled: true - image: "docker.elastic.co/kibana/kibana" - tag: "7.6.2" - -# Resource profiles for all containers. -# This allows to easily override requests and limits via additional values file. -resourceProfile: - grafana: - requests: - cpu: 0.05 - memory: 10Mi - limits: - cpu: 1 - memory: 500Mi - prometheus: - requests: - cpu: 0.05 - memory: 10Mi - limits: - cpu: 1 - memory: 500Mi - elasticsearch: - requests: - cpu: 0.05 - memory: 500Mi - limits: - cpu: 0.5 - memory: 2Gi - kibana: - requests: - cpu: 0.05 - memory: 400Mi - limits: - cpu: 0.2 - memory: 700Mi - -fuel-streams-publisher: - # You dont need to setup your secrets here because they will be generated automatically by Tilt - image: - repository: "fuel-streams-publisher" - pullPolicy: Never - tag: latest - - persistence: - data: - size: 50Gi - storageClass: standard - temp: - size: 5Gi - storageClass: standard - -fuel-streams-ws: - # You dont need to setup your secrets here because they will be generated automatically by Tilt - image: - repository: "fuel-streams-ws" - pullPolicy: Never - tag: latest - - persistence: - data: - size: 1Gi - storageClass: standard - temp: - size: 1Gi - storageClass: standard - -fuel-nats: - container: - env: - NATS_SYSTEM_PASS: temp-system-pass - NATS_ADMIN_PASS: temp-admin-pass diff --git a/cluster/charts/fuel-nats/.helmignore b/cluster/charts/fuel-nats/.helmignore deleted file mode 100644 index 240dfde2..00000000 --- a/cluster/charts/fuel-nats/.helmignore +++ /dev/null @@ -1,26 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ - -# template tests -/test diff --git a/cluster/charts/fuel-nats/CHANGELOG.md b/cluster/charts/fuel-nats/CHANGELOG.md deleted file mode 100755 index 48467db6..00000000 --- a/cluster/charts/fuel-nats/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Version 0.1.0 diff --git a/cluster/charts/fuel-nats/Chart.lock b/cluster/charts/fuel-nats/Chart.lock deleted file mode 100644 index 1d9936c2..00000000 --- a/cluster/charts/fuel-nats/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: nats - repository: https://nats-io.github.io/k8s/helm/charts/ - version: 1.2.6 -digest: sha256:7b7b2a1e92343469e4a83b09aa6dee8e79db16c26eacc625682e0fc77d66c503 -generated: "2024-11-28T19:39:24.901651-03:00" diff --git a/cluster/charts/fuel-nats/Chart.yaml b/cluster/charts/fuel-nats/Chart.yaml deleted file mode 100644 index fa7b9e99..00000000 --- a/cluster/charts/fuel-nats/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -name: fuel-nats -description: Fuel's NATS configuration based on the official NATS Helm chart -version: 0.1.1 -appVersion: "2.10.22" -type: application - -dependencies: - - name: nats - version: "1.2.6" - repository: https://nats-io.github.io/k8s/helm/charts/ diff --git a/cluster/charts/fuel-nats/templates/tls-certificate.yaml b/cluster/charts/fuel-nats/templates/tls-certificate.yaml deleted file mode 100644 index cc774529..00000000 --- a/cluster/charts/fuel-nats/templates/tls-certificate.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- if and .Values.tls.enabled .Values.tls.dns }} -# Certificate Validator Ingress -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ include "fuel-nats.fullname" . }}-cert-validator - labels: - {{- include "fuel-nats.labels" . | nindent 4 }} - annotations: - cert-manager.io/cluster-issuer: {{ .Values.tls.issuer }} - kubernetes.io/ingress.class: nginx - acme.cert-manager.io/http01-ingress-class: nginx - nginx.ingress.kubernetes.io/ssl-redirect: "false" - nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - {{- with .Values.tls.merge.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - ingressClassName: nginx - rules: - - host: {{ .Values.tls.dns }} - http: - paths: - - path: /.well-known/acme-challenge/ - pathType: Prefix - backend: - service: - name: cm-acme-http-solver - port: - number: 8089 ---- -{{- if .Values.services.websocket.enabled }} -# WebSocket Certificate -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: {{ include "fuel-nats.fullname" . }}-ws-cert - labels: - {{- include "fuel-nats.labels" . | nindent 4 }} -spec: - secretName: {{ include "fuel-nats.fullname" . }}-ws-tls - duration: {{ .Values.tls.duration }} - renewBefore: {{ .Values.tls.renewBefore }} - dnsNames: - - {{ .Values.tls.dns }} - issuerRef: - name: {{ .Values.tls.issuer }} - kind: ClusterIssuer -{{- end }} -{{- end }} diff --git a/cluster/charts/fuel-nats/values.yaml b/cluster/charts/fuel-nats/values.yaml deleted file mode 100644 index 9edd3881..00000000 --- a/cluster/charts/fuel-nats/values.yaml +++ /dev/null @@ -1,133 +0,0 @@ -# External service configuration (for production) -externalService: - enabled: false # Enable for production - -# TLS configuration (for production) -tls: - enabled: false - issuer: letsencrypt-prod - -nats: - promExporter: - enabled: false - port: 6777 - image: - repository: natsio/prometheus-nats-exporter - tag: 0.15.0 - podMonitor: - enabled: false - metadata: - labels: - release: kube-prometheus-stack - - container: - image: - repository: nats - tag: 2.10.22-alpine - env: - GOMEMLIMIT: 3GiB - NATS_SYSTEM_PASS: temp-system-pass # Override in production - NATS_ADMIN_PASS: temp-admin-pass # Override in production - startupProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - failureThreshold: 1080 - resources: - requests: - cpu: 4 - memory: 4Gi - - serviceAccount: - enabled: true - - service: - enabled: true - ports: - nats: - enabled: true - cluster: - enabled: false # Set this true on production - monitor: - enabled: false - mqtt: - enabled: false - leafnodes: - enabled: false - websocket: - enabled: true - - config: - cluster: - enabled: false # Set this true on production - port: 6222 - replicas: 3 - routeURLs: - useFQDN: true - - jetstream: - enabled: true - fileStore: - dir: /data - pvc: - enabled: true - size: 10Gi - storageClassName: standard - - websocket: - enabled: true - port: 8443 - merge: - no_tls: true - # Configuration to setup TLS on production for websocket - # tls: - # enabled: true - # secretName: nats-ws-tls - # dir: /etc/nats-certs/websocket - # cert: tls.crt - # key: tls.key - # merge: - # no_tls: false - # same_origin: false - # compression: false - # handshake_timeout: "20s" - # no_auth_user: default_user - - merge: - jetstream: - max_file_store: << 100GiB >> - max_memory_store: << 7168MiB >> - max_payload: << 8MiB >> - system_account: SYS - accounts: - SYS: - users: - - user: system - password: << $NATS_SYSTEM_PASS >> - USERS: - jetstream: enabled - users: - - user: admin - password: << $NATS_ADMIN_PASS >> - permissions: - publish: ">" - subscribe: ">" - - user: default_user - permissions: - subscribe: ">" - publish: - deny: - - "*.by_id.>" - - "*.blocks.>" - - "*.transactions.>" - - "*.inputs.>" - - "*.outputs.>" - - "*.receipts.>" - - "*.logs.>" - - "*.utxos.>" - - "$JS.API.STREAM.CREATE.>" - - "$JS.API.STREAM.UPDATE.>" - - "$JS.API.STREAM.DELETE.>" - - "$JS.API.STREAM.PURGE.>" - - "$JS.API.STREAM.RESTORE.>" - - "$JS.API.STREAM.MSG.DELETE.>" - - "$JS.API.CONSUMER.DURABLE.CREATE.>" diff --git a/cluster/charts/fuel-local/.helmignore b/cluster/charts/fuel-streams/.helmignore similarity index 100% rename from cluster/charts/fuel-local/.helmignore rename to cluster/charts/fuel-streams/.helmignore diff --git a/cluster/charts/fuel-local/CHANGELOG.md b/cluster/charts/fuel-streams/CHANGELOG.md similarity index 100% rename from cluster/charts/fuel-local/CHANGELOG.md rename to cluster/charts/fuel-streams/CHANGELOG.md diff --git a/cluster/charts/fuel-streams/Chart.lock b/cluster/charts/fuel-streams/Chart.lock new file mode 100644 index 00000000..44606f01 --- /dev/null +++ b/cluster/charts/fuel-streams/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + version: 1.2.6 +- name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + version: 1.2.6 +- name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + version: 1.2.6 +digest: sha256:ad7948ef2413ea2f9af239829570612f04abd624844413ad73600fd67ce2e9b6 +generated: "2024-12-08T20:11:41.144678-03:00" diff --git a/cluster/charts/fuel-streams/Chart.yaml b/cluster/charts/fuel-streams/Chart.yaml new file mode 100755 index 00000000..588a1013 --- /dev/null +++ b/cluster/charts/fuel-streams/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: fuel-streams +version: 0.1.2 +dependencies: + - name: nats + version: 1.2.6 + repository: https://nats-io.github.io/k8s/helm/charts/ + alias: nats-core + condition: nats-core.enabled + - name: nats + version: 1.2.6 + repository: https://nats-io.github.io/k8s/helm/charts/ + alias: nats-publisher + condition: nats-publisher.enabled + - name: nats + version: 1.2.6 + repository: https://nats-io.github.io/k8s/helm/charts/ + alias: nats-client + condition: nats-client.enabled diff --git a/cluster/charts/fuel-streams/templates/_blocks.tpl b/cluster/charts/fuel-streams/templates/_blocks.tpl new file mode 100644 index 00000000..fe70c729 --- /dev/null +++ b/cluster/charts/fuel-streams/templates/_blocks.tpl @@ -0,0 +1,60 @@ +{{/* +Configure basic Kubernetes resource metadata fields. +Parameters: + - context: The context (.) + - suffix: Optional suffix to append to resource name + - name: Optional name override +*/}} +{{- define "k8s.metadata" -}} +name: {{ default (include "fuel-streams.fullname" .context) .name }}{{ .suffix }} +namespace: {{ .context.Release.Namespace }} +app: {{ .context.Chart.Name }} +{{- end }} + +{{/* +Configure pod security context settings by merging global and service-specific values. +Parameters: + - context: Root context for accessing global values + - service: Service name for service-specific overrides +Returns: Security context configuration for pod-level settings +Example: + {{- include "k8s.security-context" (dict "context" . "service" "publisher") }} +*/}} +{{- define "k8s.security-context" -}} +securityContext: + {{- include "merge" (dict "context" .context "service" .service "defaultKey" "securityContext" "path" "config.securityContext") | nindent 4 }} +{{- end }} + +{{/* +Configure container security context settings by merging global and service-specific values. +Parameters: + - context: Root context for accessing global values + - service: Service name for service-specific overrides +Returns: Security context configuration for container-level settings +Example: + {{- include "k8s.container-security-context" (dict "context" . "service" "publisher") }} +*/}} +{{- define "k8s.container-security-context" -}} +securityContext: + {{- include "merge" (dict "context" .context "service" .service "defaultKey" "containerSecurityContext" "path" "config.containerSecurityContext") | nindent 4 }} +{{- end }} + +{{/* +Configure container probe settings by merging global and service-specific values. +Parameters: + - context: Root context for accessing global values + - service: Service name for service-specific overrides +Returns: Probe configurations for liveness, readiness, and startup +Example: + {{- include "k8s.probes" (dict "context" . "service" "publisher") }} +*/}} +{{- define "k8s.probes" -}} +{{- if .context.Values.config.healthChecks }} +livenessProbe: + {{- include "merge" (dict "context" .context "service" .service "defaultKey" "livenessProbe" "path" "config.livenessProbe") | nindent 2 }} +readinessProbe: + {{- include "merge" (dict "context" .context "service" .service "defaultKey" "readinessProbe" "path" "config.readinessProbe") | nindent 2 }} +startupProbe: + {{- include "merge" (dict "context" .context "service" .service "defaultKey" "startupProbe" "path" "config.startupProbe") | nindent 2 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/cluster/charts/fuel-streams/templates/_helpers.tpl b/cluster/charts/fuel-streams/templates/_helpers.tpl new file mode 100644 index 00000000..4344d0aa --- /dev/null +++ b/cluster/charts/fuel-streams/templates/_helpers.tpl @@ -0,0 +1,175 @@ +{{/* +Expand the name of the chart. +If nameOverride is provided in Values.config, use that instead of .Chart.Name. +The result is truncated to 63 chars and has any trailing "-" removed to comply with Kubernetes naming rules. +Returns: String - The chart name, truncated and cleaned +*/}} +{{- define "fuel-streams.name" -}} +{{- default .Chart.Name .Values.config.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +This template follows these rules: +1. If fullnameOverride is set in Values.config, use that directly +2. Otherwise, combine the release name with the chart name: + - If the release name already contains the chart name, just use the release name + - If not, concatenate release name and chart name with a hyphen +The result is truncated to 63 chars and has any trailing "-" removed to comply with Kubernetes naming rules. +Returns: String - The fully qualified app name, truncated and cleaned +*/}} +{{- define "fuel-streams.fullname" -}} +{{- if .Values.config.fullnameOverride }} +{{- .Values.config.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.config.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +Combines the chart name and version with a hyphen, replaces "+" with "_", +and truncates to 63 chars removing any trailing "-". +Returns: String - The chart name and version formatted for use as a label +*/}} +{{- define "fuel-streams.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +Provides a consistent set of labels that should be applied to all resources in the chart. +Includes: +- Helm chart metadata +- Selector labels (app name and instance) +- App version (if defined) +- Managed-by label indicating Helm management +Returns: Map - A set of key-value pairs representing Kubernetes labels +*/}} +{{- define "fuel-streams.labels" -}} +helm.sh/chart: {{ include "fuel-streams.chart" . }} +{{ include "fuel-streams.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +Core identifying labels used for object selection and service discovery. +These labels should be used consistently across all related resources. +Returns: Map - A set of key-value pairs for Kubernetes selector labels +*/}} +{{- define "fuel-streams.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fuel-streams.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +Logic: +- If service account creation is enabled, use the fullname template with "-service-account" suffix +Returns: String - The name of the service account to use +*/}} +{{- define "fuel-streams.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- printf "%s-%s" (include "fuel-streams.fullname" .) "service-account" }} +{{- end }} +{{- end }} + +{{/* +Merges configuration values between global defaults and service-specific overrides +Parameters: + - context: Root context for accessing global values + - service: Service name for service-specific overrides + - defaultKey: Key for default configuration values + - path: Path to service-specific configuration values +Example: + {{- include "merge" (dict "context" . "service" "publisher" "defaultKey" "livenessProbe" "path" "config.livenessProbe") }} +Returns: Deep-merged YAML configuration with service values taking precedence +*/}} +{{- define "merge" -}} +{{- $defaultConfig := dict }} +{{- $serviceConfig := dict }} +{{- $context := .context }} +{{- $service := .service }} +{{- $defaultKey := .defaultKey }} +{{- $path := .path }} + +{{- if and $context $context.Values }} + {{- $defaultConfig = include "get-value-from-path" (dict "context" $context.Values "path" $defaultKey) | fromYaml }} +{{- end }} + +{{- if and $context $context.Values }} + {{- $serviceConfig = include "get-value-from-path" (dict "context" (index $context.Values $service) "path" $path) | fromYaml }} +{{- end }} + +{{- $mergedConfig := deepCopy $defaultConfig }} +{{- if and $serviceConfig (not (empty $serviceConfig)) }} + {{- $_ := mustMergeOverwrite $mergedConfig $serviceConfig }} +{{- end }} +{{- toYaml $mergedConfig }} +{{- end }} + +{{/* +Get value from nested path with improved error handling +Parameters: + - context: The context object to traverse + - path: Dot-notation string path +Returns: Value at path or empty if not found +*/}} +{{- define "get-value-from-path" -}} + {{- $current := .context }} + {{- if and .path (not (empty .path)) }} + {{- range $part := splitList "." .path }} + {{- if and $current (kindIs "map" $current) }} + {{- if hasKey $current $part }} + {{- $current = index $current $part }} + {{- else }} + {{- $current = dict }} + {{- end }} + {{- else }} + {{- $current = dict }} + {{- end }} + {{- end }} + {{- end }} + {{- if $current }} + {{- toYaml $current }} + {{- end }} +{{- end }} + +{{/* +Set field and value with improved validation +Parameters: + - field: Field name to set + - path: Path to value + - context: Context object +Returns: Field and value if value exists and is not empty +*/}} +{{- define "set-field-and-value" -}} +{{- $value := include "get-value-from-path" . | fromYaml }} +{{- if and $value (not (empty $value)) (not (eq (kindOf $value) "invalid")) }} +{{ .field }}: + {{- toYaml $value | nindent 2 }} +{{- end }} +{{- end }} + +{{/* +Set value only with improved validation +Parameters: + - path: Path to value + - context: Context object +Returns: Value if it exists and is not empty +*/}} +{{- define "set-value" -}} +{{- $value := include "get-value-from-path" . | fromYaml }} +{{- if and $value (not (empty $value)) (not (eq (kindOf $value) "invalid")) }} + {{- toYaml $value | nindent 0 }} +{{- end }} +{{- end }} diff --git a/cluster/charts/fuel-streams/templates/certificate.yaml b/cluster/charts/fuel-streams/templates/certificate.yaml new file mode 100644 index 00000000..971e1070 --- /dev/null +++ b/cluster/charts/fuel-streams/templates/certificate.yaml @@ -0,0 +1,52 @@ +{{- $tls := .Values.tls }} +{{- $externalService := .Values.externalService }} +{{- if and $tls.enabled $externalService.dns }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-cert-validator") | nindent 2 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $tls "path" "labels") | nindent 4 }} + app.kubernetes.io/service: external-service + annotations: + cert-manager.io/cluster-issuer: {{ $tls.issuer }} + kubernetes.io/ingress.class: nginx + acme.cert-manager.io/http01-ingress-class: nginx + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/force-ssl-redirect: "false" + {{- include "set-value" (dict "context" $tls "path" "annotations") | nindent 4 }} +spec: + ingressClassName: nginx + rules: + - host: {{ $externalService.dns }} + http: + paths: + - path: /.well-known/acme-challenge/ + pathType: Prefix + backend: + service: + name: cm-acme-http-solver + port: + number: 8089 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-ws-cert") | nindent 2 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $tls "path" "labels") | nindent 4 }} + app.kubernetes.io/service: external-service + annotations: + {{- include "set-value" (dict "context" $tls "path" "annotations") | nindent 4 }} +spec: + secretName: {{ include "fuel-streams.fullname" . }}-ws-tls + duration: {{ $tls.duration }} + renewBefore: {{ $tls.renewBefore }} + dnsNames: + - {{ $externalService.dns }} + issuerRef: + name: {{ $tls.issuer }} + kind: ClusterIssuer +{{- end }} diff --git a/cluster/charts/fuel-nats/templates/external-service.yaml b/cluster/charts/fuel-streams/templates/external-service.yaml similarity index 51% rename from cluster/charts/fuel-nats/templates/external-service.yaml rename to cluster/charts/fuel-streams/templates/external-service.yaml index 66ddb4b9..4b2c4602 100644 --- a/cluster/charts/fuel-nats/templates/external-service.yaml +++ b/cluster/charts/fuel-streams/templates/external-service.yaml @@ -1,12 +1,15 @@ -{{- if and .Values.externalService.enabled .Values.externalService.dns }} +{{- $externalService := .Values.externalService }} +{{- if and $externalService.enabled $externalService.dns }} apiVersion: v1 kind: Service metadata: - name: {{ include "fuel-nats.fullname" . }}-external + {{- include "k8s.metadata" (dict "context" . "suffix" "-external") | nindent 2 }} labels: - {{- include "fuel-nats.labels" . | nindent 4 }} + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $externalService "path" "labels") | nindent 4 }} + app.kubernetes.io/service: external-service annotations: - external-dns.alpha.kubernetes.io/hostname: {{ .Values.externalService.dns | quote }} + external-dns.alpha.kubernetes.io/hostname: {{ $externalService.dns | quote }} external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" service.beta.kubernetes.io/aws-load-balancer-attributes: load_balancing.cross_zone.enabled=true service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp @@ -15,28 +18,14 @@ metadata: service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true,stickiness.enabled=true,stickiness.type=source_ip,load_balancing.cross_zone.enabled=true service.beta.kubernetes.io/aws-load-balancer-type: external service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "WebSocket=true" - {{- with .Values.externalService.merge.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} + {{- include "set-value" (dict "context" $externalService "path" "annotations") | nindent 2 }} spec: type: LoadBalancer loadBalancerClass: service.k8s.aws/nlb externalTrafficPolicy: Local ports: - {{- if .Values.services.nats.enabled }} - - name: nats - port: {{ .Values.services.nats.port }} - targetPort: nats - protocol: TCP - {{- end }} - {{- if .Values.services.websocket.enabled }} - - name: wss - port: {{ .Values.services.websocket.port }} - targetPort: websocket - protocol: TCP - {{- end }} + {{- toYaml $externalService.ports | nindent 4 }} selector: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/name: {{ include "fuel-nats.name" . }} + {{- include "fuel-streams.selectorLabels" . | nindent 4 }} + app.kubernetes.io/service: external-service {{- end }} diff --git a/cluster/charts/fuel-streams/templates/publisher/network-configmap.yaml b/cluster/charts/fuel-streams/templates/publisher/network-configmap.yaml new file mode 100644 index 00000000..18a644ef --- /dev/null +++ b/cluster/charts/fuel-streams/templates/publisher/network-configmap.yaml @@ -0,0 +1,31 @@ +{{- $publisher := .Values.publisher }} +apiVersion: v1 +kind: ConfigMap +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-network-config") | nindent 2 }} + annotations: + {{- include "set-value" (dict "context" $publisher "path" "config.annotations") | nindent 4 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $publisher "path" "config.labels") | nindent 4 }} + app.kubernetes.io/component: publisher +data: + P2P_PORT: "30333" + DB_PATH: {{ .Values.publisher.storage.mountPath | quote }} + POA_INSTANT: "false" + SERVICE_NAME: "Publisher Node ({{ $publisher.network }})" + {{- if eq $publisher.network "mainnet" }} + RELAYER_V2_LISTENING_CONTRACTS: "0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf" + RELAYER_DA_DEPLOY_HEIGHT: "20620434" + RELAYER_LOG_PAGE_SIZE: "2000" + SYNC_HEADER_BATCH_SIZE: "100" + RESERVED_NODES: "/dnsaddr/mainnet.fuel.network" + CHAIN_CONFIG: "mainnet" + {{- else if eq $publisher.network "testnet" }} + RELAYER_V2_LISTENING_CONTRACTS: "0x01855B78C1f8868DE70e84507ec735983bf262dA" + RELAYER_DA_DEPLOY_HEIGHT: "5827607" + RELAYER_LOG_PAGE_SIZE: "2000" + SYNC_HEADER_BATCH_SIZE: "100" + RESERVED_NODES: "/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmDxoChB7AheKNvCVpD4PHJwuDGn8rifMBEHmEynGHvHrf,/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmHnANNk4HjAxQV66BNCRxd2MBUU89ijboZkE69aLuSn1g,/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmVE468rpkh2X1kzz8qQXmqNFiPxU5Lrya28nZdbRUdVJX" + CHAIN_CONFIG: "testnet" + {{- end }} diff --git a/cluster/charts/fuel-streams/templates/publisher/statefulset.yaml b/cluster/charts/fuel-streams/templates/publisher/statefulset.yaml new file mode 100644 index 00000000..0ad2c022 --- /dev/null +++ b/cluster/charts/fuel-streams/templates/publisher/statefulset.yaml @@ -0,0 +1,137 @@ +{{- if .Values.publisher.enabled -}} +{{- $publisher := .Values.publisher -}} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-publisher") | nindent 2 }} + annotations: + {{- include "set-value" (dict "context" $publisher "path" "config.annotations") | nindent 4 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $publisher "path" "config.labels") | nindent 4 }} + app.kubernetes.io/component: publisher +spec: + serviceName: {{ include "fuel-streams.fullname" . }}-publisher + {{- if not $publisher.autoscaling.enabled }} + replicas: {{ $publisher.replicas }} + {{- end }} + selector: + matchLabels: + {{- include "fuel-streams.selectorLabels" . | nindent 6 }} + {{- include "set-value" (dict "context" $publisher "path" "config.selectorLabels") | nindent 6 }} + app.kubernetes.io/component: publisher + + template: + metadata: + annotations: + {{- include "set-value" (dict "context" $publisher "path" "config.podAnnotations") | nindent 8 }} + labels: + {{- include "fuel-streams.selectorLabels" . | nindent 8 }} + {{- include "set-value" (dict "context" $publisher "path" "config.labels") | nindent 8 }} + app.kubernetes.io/component: publisher + + spec: + {{- if .Values.serviceAccount.create }} + serviceAccountName: {{ include "fuel-streams.serviceAccountName" . }} + {{- end }} + {{- include "set-field-and-value" (dict "context" $publisher "field" "imagePullSecrets" "path" "config.imagePullSecrets") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $publisher "field" "nodeSelector" "path" "config.nodeSelector") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $publisher "field" "affinity" "path" "config.affinity") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $publisher "field" "tolerations" "path" "config.tolerations") | nindent 6 }} + {{- include "k8s.security-context" (dict "context" . "service" "publisher") | nindent 6 }} + + volumes: + - name: tmp-dir + emptyDir: {} + - name: var-dir + emptyDir: {} + + initContainers: + - name: update-{{ $publisher.storage.name }} + image: alpine:latest + imagePullPolicy: IfNotPresent + command: ["/bin/sh"] + args: + - -c + - | + # Verify directory exists and is writable + mkdir -p {{ $publisher.storage.mountPath }} && \ + touch {{ $publisher.storage.mountPath }}/.init-complete && \ + rm {{ $publisher.storage.mountPath }}/.init-complete + {{- include "k8s.container-security-context" (dict "context" . "service" "publisher") | nindent 10 }} + volumeMounts: + - name: {{ $publisher.storage.name }} + mountPath: {{ $publisher.storage.mountPath }} + + - name: init-permissions + image: alpine:latest + command: ["/bin/sh", "-c"] + args: + - | + mkdir -p /var/fuel-streams/tmp && \ + chown -R 1000:1000 /var/fuel-streams + volumeMounts: + - name: var-dir + mountPath: /var/fuel-streams + securityContext: + runAsUser: 0 + runAsNonRoot: false + + containers: + - name: publisher + image: "{{ $publisher.image.repository }}:{{ $publisher.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ $publisher.image.pullPolicy }} + ports: + - name: http + containerPort: {{ int $publisher.service.port }} + protocol: TCP + {{- if $publisher.ports }} + {{- toYaml $publisher.ports | nindent 12 }} + {{- end }} + + {{- include "set-field-and-value" (dict "context" $publisher "field" "resources" "path" "config.resources") | nindent 10 }} + {{- include "k8s.probes" (dict "context" . "service" "publisher") | nindent 10 }} + {{- include "k8s.container-security-context" (dict "context" . "service" "publisher") | nindent 10 }} + + env: + - name: TMPDIR + value: "/var/fuel-streams/tmp" + {{- range $key, $value := $publisher.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- with $publisher.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + + envFrom: + - configMapRef: + name: {{ include "fuel-streams.fullname" $ }}-network-config + - configMapRef: + name: {{ include "fuel-streams.fullname" $ }}-publisher + optional: true + - secretRef: + name: {{ include "fuel-streams.fullname" $ }}-publisher + optional: true + {{- with $publisher.envFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + + volumeMounts: + - name: {{ $publisher.storage.name }} + mountPath: {{ $publisher.storage.mountPath }} + readOnly: false + - name: var-dir + mountPath: /var/fuel-streams + + volumeClaimTemplates: + - metadata: + name: {{ $publisher.storage.name }} + spec: + accessModes: + - {{ $publisher.storage.accessMode }} + storageClassName: {{ $publisher.storage.storageClass }} + resources: + requests: + storage: {{ $publisher.storage.size }} +{{- end -}} diff --git a/cluster/charts/fuel-local/templates/secret-creator.yaml b/cluster/charts/fuel-streams/templates/secret-creator.yaml similarity index 54% rename from cluster/charts/fuel-local/templates/secret-creator.yaml rename to cluster/charts/fuel-streams/templates/secret-creator.yaml index 8f465288..04719e93 100755 --- a/cluster/charts/fuel-local/templates/secret-creator.yaml +++ b/cluster/charts/fuel-streams/templates/secret-creator.yaml @@ -1,8 +1,10 @@ -{{ if .Values.roles.create }} +{{- if and .Values.config.createRoles .Values.serviceAccount.create }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: secret-creator + {{- include "k8s.metadata" (dict "context" . "suffix" "-secret-creator") | nindent 2 }} + labels: + {{- include "fuel-streams.labels" . | nindent 2 }} rules: - apiGroups: [""] # "" indicates the core API group resources: ["pods"] @@ -17,12 +19,12 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: secret-creator + {{- include "k8s.metadata" (dict "context" . "suffix" "-secret-creator") | nindent 2 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount }} + name: {{ include "fuel-streams.serviceAccountName" . }} roleRef: - kind: Role #this must be Role or ClusterRole - name: secret-creator # this must match the name of the Role or ClusterRole you wish to bind to + kind: Role # this must be Role or ClusterRole + name: {{ include "fuel-streams.fullname" . }}-secret-creator apiGroup: rbac.authorization.k8s.io -{{ end }} +{{- end -}} diff --git a/cluster/charts/fuel-streams/templates/service-account.yaml b/cluster/charts/fuel-streams/templates/service-account.yaml new file mode 100755 index 00000000..8201ea7c --- /dev/null +++ b/cluster/charts/fuel-streams/templates/service-account.yaml @@ -0,0 +1,9 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-service-account") | nindent 2 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end -}} diff --git a/cluster/charts/fuel-streams/templates/webserver/deployment.yaml b/cluster/charts/fuel-streams/templates/webserver/deployment.yaml new file mode 100644 index 00000000..759fc13a --- /dev/null +++ b/cluster/charts/fuel-streams/templates/webserver/deployment.yaml @@ -0,0 +1,72 @@ +{{- $webserver := .Values.webserver -}} +{{- if $webserver.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + {{- include "k8s.metadata" (dict "context" . "suffix" "-webserver") | nindent 2 }} + annotations: + {{- include "set-value" (dict "context" $webserver "path" "config.annotations") | nindent 4 }} + labels: + {{- include "fuel-streams.labels" . | nindent 4 }} + {{- include "set-value" (dict "context" $webserver "path" "config.labels") | nindent 4 }} + app.kubernetes.io/component: webserver + app.kubernetes.io/service: external-service + +spec: + {{- if not $webserver.autoscaling.enabled }} + replicas: {{ $webserver.config.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "fuel-streams.selectorLabels" . | nindent 6 }} + {{- include "set-value" (dict "context" $webserver "path" "config.selectorLabels") | nindent 6 }} + app.kubernetes.io/component: webserver + app.kubernetes.io/service: external-service + + template: + metadata: + annotations: + {{- include "set-value" (dict "context" $webserver "path" "config.podAnnotations") | nindent 8 }} + labels: + {{- include "fuel-streams.selectorLabels" . | nindent 8 }} + {{- include "set-value" (dict "context" $webserver "path" "config.labels") | nindent 8 }} + app.kubernetes.io/component: webserver + app.kubernetes.io/service: external-service + + spec: + {{- if .Values.serviceAccount.create }} + serviceAccountName: {{ include "fuel-streams.serviceAccountName" . }} + {{- end }} + + {{- include "set-field-and-value" (dict "context" $webserver "field" "imagePullSecrets" "path" "config.imagePullSecrets") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $webserver "field" "nodeSelector" "path" "config.nodeSelector") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $webserver "field" "affinity" "path" "config.affinity") | nindent 6 }} + {{- include "set-field-and-value" (dict "context" $webserver "field" "tolerations" "path" "config.tolerations") | nindent 6 }} + {{- include "k8s.security-context" (dict "context" . "service" "webserver") | nindent 6 }} + + containers: + - name: webserver + image: "{{ $webserver.image.repository }}:{{ $webserver.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ $webserver.image.pullPolicy }} + + ports: + - name: webserver + containerPort: {{ $webserver.port }} + protocol: TCP + {{- if $webserver.ports }} + {{- toYaml $webserver.ports | nindent 12 }} + {{- end }} + + {{- include "set-field-and-value" (dict "context" $webserver "field" "resources" "path" "config.resources") | nindent 10 }} + {{- include "k8s.probes" (dict "context" . "service" "webserver") | nindent 10 }} + {{- include "k8s.container-security-context" (dict "context" . "service" "webserver") | nindent 10 }} + + env: + {{- range $key, $value := $webserver.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- with $webserver.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} +{{- end }} diff --git a/cluster/charts/fuel-streams/tests/certificate_test.yaml b/cluster/charts/fuel-streams/tests/certificate_test.yaml new file mode 100644 index 00000000..179f8f4c --- /dev/null +++ b/cluster/charts/fuel-streams/tests/certificate_test.yaml @@ -0,0 +1,65 @@ +suite: Testing certificate +templates: + - templates/certificate.yaml +tests: + - it: should not create resources when TLS is disabled + set: + tls.enabled: false + externalService.dns: "example.com" + asserts: + - hasDocuments: + count: 0 + + - it: should not create resources when DNS is not set + set: + tls.enabled: true + externalService.dns: "" + asserts: + - hasDocuments: + count: 0 + + - it: should create correct ingress validator + set: + tls.enabled: true + externalService.dns: "example.com" + tls.issuer: "letsencrypt-prod" + asserts: + - isKind: + of: Ingress + documentIndex: 0 + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-cert-validator + documentIndex: 0 + - equal: + path: spec.rules[0].host + value: "example.com" + documentIndex: 0 + - equal: + path: 'metadata.annotations["cert-manager.io/cluster-issuer"]' + value: "letsencrypt-prod" + documentIndex: 0 + + - it: should create correct certificate + set: + tls.enabled: true + externalService.dns: "example.com" + tls.issuer: "letsencrypt-prod" + tls.duration: "2160h" + tls.renewBefore: "360h" + asserts: + - isKind: + of: Certificate + documentIndex: 1 + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-ws-cert + documentIndex: 1 + - equal: + path: spec.dnsNames[0] + value: "example.com" + documentIndex: 1 + - equal: + path: spec.issuerRef.name + value: "letsencrypt-prod" + documentIndex: 1 diff --git a/cluster/charts/fuel-streams/tests/external_service_test.yaml b/cluster/charts/fuel-streams/tests/external_service_test.yaml new file mode 100644 index 00000000..11a70a5e --- /dev/null +++ b/cluster/charts/fuel-streams/tests/external_service_test.yaml @@ -0,0 +1,89 @@ +suite: Testing external service +templates: + - templates/external-service.yaml +tests: + - it: should not create resources when external service is disabled + set: + externalService.enabled: false + externalService.dns: "example.com" + asserts: + - hasDocuments: + count: 0 + + - it: should not create resources when DNS is not set + set: + externalService.enabled: true + externalService.dns: "" + asserts: + - hasDocuments: + count: 0 + + - it: should have correct service metadata and type + set: + externalService.enabled: true + externalService.dns: "example.com" + asserts: + - isKind: + of: Service + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-external + - equal: + path: spec.type + value: LoadBalancer + - equal: + path: spec.loadBalancerClass + value: service.k8s.aws/nlb + - equal: + path: spec.externalTrafficPolicy + value: Local + + - it: should configure ports correctly + set: + externalService.enabled: true + externalService.dns: "example.com" + externalService.ports: + - name: websocket + port: 8443 + targetPort: websocket + protocol: TCP + - name: webserver + port: 8082 + targetPort: http + protocol: TCP + asserts: + - equal: + path: spec.ports + value: + - name: websocket + port: 8443 + targetPort: websocket + protocol: TCP + - name: webserver + port: 8082 + targetPort: http + protocol: TCP + + - it: should set correct selectors + set: + externalService.enabled: true + externalService.dns: "example.com" + asserts: + - isSubset: + path: spec.selector + content: + app.kubernetes.io/name: fuel-streams + app.kubernetes.io/service: external-service + + - it: should set correct annotations + set: + externalService.enabled: true + externalService.dns: "example.com" + asserts: + - isSubset: + path: metadata.annotations + content: + external-dns.alpha.kubernetes.io/hostname: "example.com" + external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" + service.beta.kubernetes.io/aws-load-balancer-type: "external" + diff --git a/cluster/charts/fuel-streams/tests/publisher/network-configmap.yaml b/cluster/charts/fuel-streams/tests/publisher/network-configmap.yaml new file mode 100644 index 00000000..dfb5a7b3 --- /dev/null +++ b/cluster/charts/fuel-streams/tests/publisher/network-configmap.yaml @@ -0,0 +1,87 @@ +suite: Testing Publisher network configmap +templates: + - templates/publisher/network-configmap.yaml +tests: + - it: should configure mainnet correctly + set: + publisher.enabled: true + publisher.network: mainnet + publisher.storage.mountPath: /mnt/db + asserts: + - isKind: + of: ConfigMap + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-network-config + - equal: + path: data.P2P_PORT + value: "30333" + - equal: + path: data.DB_PATH + value: /mnt/db + - equal: + path: data.POA_INSTANT + value: "false" + - equal: + path: data.SERVICE_NAME + value: "Publisher Node (mainnet)" + - equal: + path: data.RELAYER_V2_LISTENING_CONTRACTS + value: "0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf" + - equal: + path: data.RELAYER_DA_DEPLOY_HEIGHT + value: "20620434" + - equal: + path: data.RELAYER_LOG_PAGE_SIZE + value: "2000" + - equal: + path: data.SYNC_HEADER_BATCH_SIZE + value: "100" + - equal: + path: data.RESERVED_NODES + value: "/dnsaddr/mainnet.fuel.network" + - equal: + path: data.CHAIN_CONFIG + value: "mainnet" + + - it: should configure testnet correctly + set: + publisher.enabled: true + publisher.network: testnet + publisher.storage.mountPath: /mnt/db + asserts: + - isKind: + of: ConfigMap + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-network-config + - equal: + path: data.P2P_PORT + value: "30333" + - equal: + path: data.DB_PATH + value: /mnt/db + - equal: + path: data.POA_INSTANT + value: "false" + - equal: + path: data.SERVICE_NAME + value: "Publisher Node (testnet)" + - equal: + path: data.RELAYER_V2_LISTENING_CONTRACTS + value: "0x01855B78C1f8868DE70e84507ec735983bf262dA" + - equal: + path: data.RELAYER_DA_DEPLOY_HEIGHT + value: "5827607" + - equal: + path: data.RELAYER_LOG_PAGE_SIZE + value: "2000" + - equal: + path: data.SYNC_HEADER_BATCH_SIZE + value: "100" + - equal: + path: data.RESERVED_NODES + value: "/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmDxoChB7AheKNvCVpD4PHJwuDGn8rifMBEHmEynGHvHrf,/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmHnANNk4HjAxQV66BNCRxd2MBUU89ijboZkE69aLuSn1g,/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmVE468rpkh2X1kzz8qQXmqNFiPxU5Lrya28nZdbRUdVJX" + - equal: + path: data.CHAIN_CONFIG + value: "testnet" diff --git a/cluster/charts/fuel-streams/tests/publisher/statefulset.yaml b/cluster/charts/fuel-streams/tests/publisher/statefulset.yaml new file mode 100644 index 00000000..fd3c3f6b --- /dev/null +++ b/cluster/charts/fuel-streams/tests/publisher/statefulset.yaml @@ -0,0 +1,223 @@ +suite: Testing Publisher statefulset +templates: + - templates/publisher/statefulset.yaml +tests: + - it: should create deployment with correct name + set: + publisher.enabled: true + asserts: + - isKind: + of: StatefulSet + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-publisher + + - it: should set correct image and tag + set: + publisher.enabled: true + publisher.image.repository: ghcr.io/fuellabs/fuel-streams-publisher + publisher.image.tag: latest + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: ghcr.io/fuellabs/fuel-streams-publisher:latest + + - it: should use chart version when tag is not specified + set: + publisher.enabled: true + publisher.image.repository: ghcr.io/fuellabs/fuel-streams-publisher + publisher.image.tag: null + Chart: + Version: "1.0" + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: ghcr.io/fuellabs/fuel-streams-publisher:1.0 + + - it: should merge environment variables correctly + set: + publisher.enabled: true + publisher.env: + CHAIN_CONFIG: "testnet" # Override default + NEW_VAR: "new-value" # Add new var + publisher.extraEnv: + - name: SIMPLE_VAR + value: "simple-value" + - name: SECRET_VAR + valueFrom: + secretKeyRef: + name: my-secret + key: my-key + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: CHAIN_CONFIG + value: "testnet" + - contains: + path: spec.template.spec.containers[0].env + content: + name: NEW_VAR + value: "new-value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: SIMPLE_VAR + value: "simple-value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: SECRET_VAR + valueFrom: + secretKeyRef: + name: my-secret + key: my-key + + - it: should handle storage configuration correctly + set: + publisher.enabled: true + publisher.storage: + name: rocks-db + size: 500Gi + mountPath: /mnt/db + storageClass: gp3-generic + accessMode: ReadWriteOnce + asserts: + - hasDocuments: + count: 1 + - equal: + path: spec.template.spec.containers[0].volumeMounts[0].name + value: rocks-db + - equal: + path: spec.template.spec.containers[0].volumeMounts[0].mountPath + value: /mnt/db + - equal: + path: spec.template.spec.initContainers[0].name + value: update-rocks-db + - equal: + path: spec.template.spec.initContainers[0].volumeMounts[0].name + value: rocks-db + - equal: + path: spec.template.spec.initContainers[0].volumeMounts[0].mountPath + value: /mnt/db + - equal: + path: spec.volumeClaimTemplates[0].metadata.name + value: rocks-db + - equal: + path: spec.volumeClaimTemplates[0].spec.accessModes[0] + value: ReadWriteOnce + - equal: + path: spec.volumeClaimTemplates[0].spec.storageClassName + value: gp3-generic + - equal: + path: spec.volumeClaimTemplates[0].spec.resources.requests.storage + value: 500Gi + + - it: should handle storage with minimal configuration + set: + publisher.enabled: true + publisher.storage: + name: data + size: 10Gi + mountPath: /data + storageClass: standard + accessMode: ReadWriteOnce + asserts: + - hasDocuments: + count: 1 + - equal: + path: spec.template.spec.containers[0].volumeMounts[0] + value: + name: data + mountPath: /data + readOnly: false + - equal: + path: spec.volumeClaimTemplates[0].spec.resources.requests.storage + value: 10Gi + + - it: should set labels and annotations from service config + set: + publisher.enabled: true + publisher.config: + labels: + app: "publisher" + custom: "local" + annotations: + service: "publisher" + monitoring: "enabled" + asserts: + - isSubset: + path: metadata.labels + content: + app.kubernetes.io/name: fuel-streams + app.kubernetes.io/instance: RELEASE-NAME + app.kubernetes.io/component: publisher + app: "publisher" + custom: "local" + - isSubset: + path: metadata.annotations + content: + service: "publisher" + monitoring: "enabled" + + - it: should merge global and publisher-specific configurations + set: + publisher.enabled: true + publisher.config.livenessProbe: + initialDelaySeconds: 45 + httpGet: + path: /custom-health + port: 9090 + asserts: + - equal: + path: spec.template.spec.containers[0].livenessProbe.httpGet.path + value: /custom-health + - equal: + path: spec.template.spec.containers[0].livenessProbe.httpGet.port + value: 9090 + - equal: + path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds + value: 45 + - equal: + path: spec.template.spec.containers[0].livenessProbe.periodSeconds + value: 20 + + - it: should set replicas when autoscaling is disabled + set: + publisher.enabled: true + publisher.autoscaling.enabled: false + publisher.replicas: 3 + asserts: + - equal: + path: spec.replicas + value: 3 + + - it: should replace security contexts with provided values + set: + publisher.enabled: true + publisher.config: + securityContext: + fsGroup: 2500 + containerSecurityContext: + runAsUser: 2500 + asserts: + - equal: + path: spec.template.spec.securityContext + value: + fsGroup: 2500 + runAsUser: 1000 + runAsGroup: 1000 + runAsNonRoot: true + capabilities: + drop: [ALL] + readOnlyRootFilesystem: true + - equal: + path: spec.template.spec.containers[0].securityContext + value: + runAsUser: 2500 + runAsGroup: 1000 + runAsNonRoot: true + capabilities: + drop: [ALL] + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false diff --git a/cluster/charts/fuel-streams/tests/webserver/deployment_test.yaml b/cluster/charts/fuel-streams/tests/webserver/deployment_test.yaml new file mode 100644 index 00000000..71aee4ac --- /dev/null +++ b/cluster/charts/fuel-streams/tests/webserver/deployment_test.yaml @@ -0,0 +1,189 @@ +suite: Testing Webserver deployment +templates: + - templates/webserver/deployment.yaml +tests: + - it: should not create deployment when webserver is disabled + set: + webserver.enabled: false + asserts: + - hasDocuments: + count: 0 + + - it: should create deployment with correct kind and metadata + set: + webserver.enabled: true + asserts: + - isKind: + of: Deployment + - isAPIVersion: + of: apps/v1 + - equal: + path: metadata.name + value: RELEASE-NAME-fuel-streams-webserver + - equal: + path: metadata.labels["app.kubernetes.io/component"] + value: webserver + + - it: should set correct selector labels + set: + webserver.enabled: true + asserts: + - equal: + path: spec.selector.matchLabels["app.kubernetes.io/component"] + value: webserver + - isSubset: + path: spec.selector.matchLabels + content: + app.kubernetes.io/name: fuel-streams + app.kubernetes.io/instance: RELEASE-NAME + + - it: should set image configuration correctly + set: + webserver.enabled: true + webserver.image.repository: ghcr.io/fuellabs/fuel-streams-webserver + webserver.image.tag: latest + webserver.image.pullPolicy: Always + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: ghcr.io/fuellabs/fuel-streams-webserver:latest + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always + + - it: should use chart version when tag is not specified + set: + webserver.enabled: true + webserver.image.repository: ghcr.io/fuellabs/fuel-streams-webserver + webserver.image.tag: null + Chart: + Version: "1.0" + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: ghcr.io/fuellabs/fuel-streams-webserver:1.0 + + - it: should configure ports correctly + set: + webserver.enabled: true + webserver.service.port: 8082 + webserver.ports: + - name: metrics + containerPort: 9090 + protocol: TCP + asserts: + - lengthEqual: + path: spec.template.spec.containers[0].ports + count: 2 + - contains: + path: spec.template.spec.containers[0].ports + content: + name: webserver + containerPort: 8082 + protocol: TCP + - contains: + path: spec.template.spec.containers[0].ports + content: + name: metrics + containerPort: 9090 + protocol: TCP + + - it: should set replicas when autoscaling is disabled + set: + webserver.enabled: true + webserver.autoscaling.enabled: false + webserver.config.replicaCount: 3 + asserts: + - equal: + path: spec.replicas + value: 3 + + - it: should not set replicas when autoscaling is enabled + set: + webserver.enabled: true + webserver.autoscaling.enabled: true + webserver.config.replicaCount: 3 + asserts: + - isNull: + path: spec.replicas + + - it: should merge environment variables correctly + set: + webserver.enabled: true + webserver.env: + RUST_LOG: info + APP_PORT: "8080" + webserver.extraEnv: + - name: EXTRA_VAR + value: "extra-value" + - name: SECRET_VAR + valueFrom: + secretKeyRef: + name: my-secret + key: my-key + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: RUST_LOG + value: "info" + - contains: + path: spec.template.spec.containers[0].env + content: + name: APP_PORT + value: "8080" + - contains: + path: spec.template.spec.containers[0].env + content: + name: EXTRA_VAR + value: "extra-value" + - contains: + path: spec.template.spec.containers[0].env + content: + name: SECRET_VAR + valueFrom: + secretKeyRef: + name: my-secret + key: my-key + + - it: should set security context when specified + set: + webserver.enabled: true + webserver.config.securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + asserts: + - equal: + path: spec.template.spec.securityContext.runAsUser + value: 1000 + - equal: + path: spec.template.spec.securityContext.runAsGroup + value: 3000 + - equal: + path: spec.template.spec.securityContext.fsGroup + value: 2000 + + - it: should set resource limits and requests + set: + webserver.enabled: true + webserver.config.resources: + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 50m + memory: 64Mi + asserts: + - equal: + path: spec.template.spec.containers[0].resources.limits.cpu + value: 100m + - equal: + path: spec.template.spec.containers[0].resources.limits.memory + value: 128Mi + - equal: + path: spec.template.spec.containers[0].resources.requests.cpu + value: 50m + - equal: + path: spec.template.spec.containers[0].resources.requests.memory + value: 64Mi \ No newline at end of file diff --git a/cluster/charts/fuel-streams/values.yaml b/cluster/charts/fuel-streams/values.yaml new file mode 100755 index 00000000..e00d00d1 --- /dev/null +++ b/cluster/charts/fuel-streams/values.yaml @@ -0,0 +1,496 @@ +docker: + registry: registry.dev.svc.cluster.local:5000 + +config: + # Override the name and fullname of the chart + nameOverride: "" + fullnameOverride: "" + # Create roles and rolebindings for the fuel-streams serviceaccount + createRoles: true + # Enable health checks for all services + healthChecks: true + +serviceAccount: + create: true + automount: true + +# ------------------------------------------------------------------------------------------------- +# Global configurations +# ------------------------------------------------------------------------------------------------- + +labels: {} +annotations: {} + +securityContext: + fsGroup: 1000 + runAsUser: 1000 + runAsGroup: 1000 + runAsNonRoot: true + capabilities: + drop: [ALL] + readOnlyRootFilesystem: true + +containerSecurityContext: + runAsUser: 1000 + runAsGroup: 1000 + runAsNonRoot: true + capabilities: + drop: [ALL] + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + +livenessProbe: + httpGet: + path: /health + port: 8080 + enabled: true + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 6 + successThreshold: 1 + +readinessProbe: + httpGet: + path: /health + port: 8080 + enabled: true + initialDelaySeconds: 30 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 6 + successThreshold: 1 + +startupProbe: + httpGet: + path: /health + port: 8080 + enabled: true + initialDelaySeconds: 30 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 6 + successThreshold: 1 + +tls: + enabled: false + issuer: "letsencrypt-prod" + duration: "2160h" + renewBefore: "360h" + annotations: {} + labels: {} + +externalService: + enabled: false + dns: "streams.svc.cluster.local" + labels: {} + annotations: {} + ports: + - name: websocket + port: 8443 + targetPort: websocket + protocol: TCP + - name: webserver + port: 8082 + targetPort: http + protocol: TCP + +# ------------------------------------------------------------------------------------------------- +# Monitoring +# ------------------------------------------------------------------------------------------------- + +monitoring: + enabled: false + +# ------------------------------------------------------------------------------------------------- +# Publisher configuration +# ------------------------------------------------------------------------------------------------- + +publisher: + enabled: true + network: mainnet + + image: + repository: fuel-streams-publisher + pullPolicy: Never + tag: "latest" + + service: + type: ClusterIP + port: 8080 + + prometheus: + enabled: false + scrape: true + path: /metrics + + storage: + name: rocks-db + size: 10Gi + storageClass: standard + accessMode: ReadWriteOnce + mountPath: /mnt/db + + config: + replicaCount: 1 + labels: {} + annotations: {} + podAnnotations: {} + nodeSelector: {} + tolerations: [] + affinity: {} + imagePullSecrets: [] + ports: [] + livenessProbe: {} + readinessProbe: {} + startupProbe: {} + securityContext: {} + containerSecurityContext: {} + resources: {} + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + + env: + PUBLISHER_MAX_THREADS: "32" + NATS_URL: "fuel-streams-nats-publisher:4222" + HISTORICAL: "true" + + # Additional environment variables with complex structures + # extraEnv: [] + # - name: RELAYER + # valueFrom: + # secretKeyRef: + # name: fuel-streams-publisher + # key: RELAYER + # - name: KEYPAIR + # valueFrom: + # secretKeyRef: + # name: fuel-streams-publisher + # key: KEYPAIR + # - name: NATS_ADMIN_PASS + # valueFrom: + # secretKeyRef: + # name: fuel-streams-publisher + # key: NATS_ADMIN_PASS + # Optional: Bulk environment references + # envFrom: {} + # - configMapRef: + # name: additional-config + # - secretRef: + # name: additional-secrets + +# ------------------------------------------------------------------------------------------------- +# WebServer configuration +# ------------------------------------------------------------------------------------------------- + +webserver: + enabled: false + port: 8082 + + image: + repository: fuel-streams-webserver + pullPolicy: Never + tag: "latest" + + config: + replicaCount: 1 + labels: {} + annotations: {} + podAnnotations: {} + nodeSelector: {} + tolerations: [] + affinity: {} + imagePullSecrets: [] + ports: [] + livenessProbe: {} + readinessProbe: {} + startupProbe: {} + securityContext: {} + containerSecurityContext: {} + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +# ------------------------------------------------------------------------------------------------- +# NATS Core configuration +# ------------------------------------------------------------------------------------------------- + +nats-core: + enabled: true + + natsBox: + enabled: false + + promExporter: + enabled: false + port: 6777 + image: + repository: natsio/prometheus-nats-exporter + tag: 0.15.0 + podMonitor: + enabled: false + metadata: + labels: + release: kube-prometheus-stack + + container: + image: + repository: nats + tag: 2.10.22-alpine + env: + GOMEMLIMIT: 8GiB + startupProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + failureThreshold: 1080 + resources: + requests: + cpu: 8 + memory: 8Gi + + service: + enabled: true + ports: + nats: + enabled: true + cluster: + enabled: true + leafnodes: + enabled: true + monitor: + enabled: false + + config: + cluster: + enabled: true + port: 6222 + replicas: 3 + routeURLs: + useFQDN: true + + jetstream: + enabled: true + fileStore: + dir: /data + pvc: + enabled: true + size: 500Gi + storageClassName: standard + + leafnodes: + enabled: true + port: 7422 + + monitor: + enabled: false + port: 8222 + + merge: + jetstream: + max_file_store: << 500GiB >> + max_memory_store: << 7168MiB >> + domain: "central" + max_payload: << 8MiB >> + +# ------------------------------------------------------------------------------------------------- +# NATS Client configuration +# ------------------------------------------------------------------------------------------------- + +nats-client: + enabled: true + + global: + labels: + app.kubernetes.io/service: external-service + + natsBox: + enabled: false + + promExporter: + enabled: false + + container: + image: + repository: nats + tag: 2.10.22-alpine + env: + GOMEMLIMIT: 2GiB + startupProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + failureThreshold: 1080 + resources: + requests: + cpu: 2 + memory: 2Gi + + service: + enabled: true + ports: + nats: + enabled: true + websocket: + enabled: true + monitor: + enabled: false + + statefulSet: + merge: + spec: + replicas: 2 + + podTemplate: + topologySpreadConstraints: + kubernetes.io/hostname: + maxSkew: 1 + whenUnsatisfiable: DoNotSchedule + + config: + jetstream: + enabled: true + fileStore: + dir: /data + pvc: + enabled: true + size: 20Gi + storageClassName: standard + merge: + domain: "client" + + leafnodes: + enabled: true + port: 7422 + remotes: + - url: "nats://nats-core:7422" + + websocket: + enabled: true + port: 8443 + merge: + no_tls: true + no_auth_user: default_user + + monitor: + enabled: false + port: 8222 + + merge: + jetstream: + max_file_store: << 20GiB >> + max_memory_store: << 2048MiB >> + max_payload: << 8MiB >> + accounts: + USERS: + jetstream: enabled + users: + - user: default_user + permissions: + subscribe: ">" + publish: + deny: + - "*.by_id.>" + - "*.blocks.>" + - "*.transactions.>" + - "*.inputs.>" + - "*.outputs.>" + - "*.receipts.>" + - "*.logs.>" + - "*.utxos.>" + - "$JS.API.STREAM.CREATE.>" + - "$JS.API.STREAM.UPDATE.>" + - "$JS.API.STREAM.DELETE.>" + - "$JS.API.STREAM.PURGE.>" + - "$JS.API.STREAM.RESTORE.>" + - "$JS.API.STREAM.MSG.DELETE.>" + - "$JS.API.CONSUMER.DURABLE.CREATE.>" + +# ------------------------------------------------------------------------------------------------- +# NATS Publisher configuration +# ------------------------------------------------------------------------------------------------- + +nats-publisher: + enabled: true + + natsBox: + enabled: false + + promExporter: + enabled: false + + container: + image: + repository: nats + tag: 2.10.22-alpine + env: + GOMEMLIMIT: 3GiB + startupProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + failureThreshold: 1080 + resources: + requests: + cpu: 4 + memory: 4Gi + + service: + enabled: true + ports: + nats: + enabled: true + monitor: + enabled: false + + statefulSet: + merge: + spec: + replicas: 3 + + podTemplate: + topologySpreadConstraints: + kubernetes.io/hostname: + maxSkew: 1 + whenUnsatisfiable: DoNotSchedule + + config: + jetstream: + enabled: true + fileStore: + dir: /data + pvc: + enabled: true + size: 50Gi + storageClassName: standard + merge: + domain: "publisher" + + leafnodes: + enabled: true + port: 7422 + remotes: + - url: "nats://nats-core:7422" + + monitor: + enabled: false + port: 8222 + + merge: + jetstream: + max_file_store: << 50GiB >> + max_memory_store: << 3072MiB >> + max_payload: << 8MiB >> diff --git a/cluster/docker/docker-compose.yml b/cluster/docker/docker-compose.yml new file mode 100644 index 00000000..185bc0c4 --- /dev/null +++ b/cluster/docker/docker-compose.yml @@ -0,0 +1,20 @@ +services: + nats: + image: nats:latest + container_name: nats + restart: always + ports: + - 4222:4222 + - 8222:8222 + - 8443:8443 + volumes: + - ./nats.conf:/etc/nats/nats.conf + command: + - -m + - "8222" + - --name=fuel-streams-publisher-server + - --js + - --config=/etc/nats/nats.conf + - -D + env_file: + - ./../../.env diff --git a/docker/fuel-streams-publisher.Dockerfile b/cluster/docker/fuel-streams-publisher.Dockerfile similarity index 96% rename from docker/fuel-streams-publisher.Dockerfile rename to cluster/docker/fuel-streams-publisher.Dockerfile index a6624ee5..62a993fb 100644 --- a/docker/fuel-streams-publisher.Dockerfile +++ b/cluster/docker/fuel-streams-publisher.Dockerfile @@ -76,6 +76,7 @@ ENV RELAYER_LOG_PAGE_SIZE=$RELAYER_LOG_PAGE_SIZE ENV SERVICE_NAME=$SERVICE_NAME ENV SYNC_HEADER_BATCH_SIZE=$SYNC_HEADER_BATCH_SIZE ENV RESERVED_NODES=$RESERVED_NODES +ENV HISTORICAL=false ENV KEYPAIR= ENV RELAYER= @@ -98,7 +99,7 @@ RUN apt-get update -y \ COPY --from=builder /root/fuel-streams-publisher . COPY --from=builder /root/fuel-streams-publisher.d . -COPY /docker/chain-config ./chain-config +COPY /cluster/chain-config ./chain-config EXPOSE ${PORT} EXPOSE ${P2P_PORT} EXPOSE ${TELEMETRY_PORT} @@ -126,4 +127,5 @@ CMD exec ./fuel-streams-publisher \ --relayer-v2-listening-contracts $RELAYER_V2_LISTENING_CONTRACTS \ --relayer-da-deploy-height $RELAYER_DA_DEPLOY_HEIGHT \ --relayer-log-page-size $RELAYER_LOG_PAGE_SIZE \ - --sync-block-stream-buffer-size 30 + --sync-block-stream-buffer-size 30 \ + $([ "$HISTORICAL" = "true" ] && echo "--historical") diff --git a/docker/fuel-streams-ws.Dockerfile b/cluster/docker/fuel-streams-ws.Dockerfile similarity index 100% rename from docker/fuel-streams-ws.Dockerfile rename to cluster/docker/fuel-streams-ws.Dockerfile diff --git a/docker/nats.conf b/cluster/docker/nats.conf similarity index 87% rename from docker/nats.conf rename to cluster/docker/nats.conf index 743b12a0..783a0450 100644 --- a/docker/nats.conf +++ b/cluster/docker/nats.conf @@ -14,6 +14,11 @@ authorization = { deny = [ "*.blocks.>", "*.transactions.>", + "*.inputs.>", + "*.outputs.>", + "*.receipts.>", + "*.logs.>", + "*.utxos.>", "$JS.API.STREAM.CREATE.>", "$JS.API.STREAM.UPDATE.>", "$JS.API.STREAM.DELETE.>", diff --git a/cluster/scripts/build_publisher.sh b/cluster/scripts/build_publisher.sh index 5fa70711..0fe43d4b 100755 --- a/cluster/scripts/build_publisher.sh +++ b/cluster/scripts/build_publisher.sh @@ -5,7 +5,7 @@ set -euo pipefail # Use environment variables provided by Tilt if available IMAGE_NAME=${EXPECTED_IMAGE:-"fuel-streams-publisher"} TAG=${EXPECTED_TAG:-"latest"} -DOCKERFILE="docker/fuel-streams-publisher.Dockerfile" +DOCKERFILE="cluster/docker/fuel-streams-publisher.Dockerfile" # Ensure we're using minikube's docker daemon if not already set if [ -z "${DOCKER_HOST:-}" ]; then diff --git a/cluster/scripts/gen_env_secret.sh b/cluster/scripts/gen_env_secret.sh index eaa3fa36..df0680d3 100755 --- a/cluster/scripts/gen_env_secret.sh +++ b/cluster/scripts/gen_env_secret.sh @@ -4,8 +4,8 @@ source .env # Generate the YAML configuration -cat << EOF > cluster/charts/fuel-local/values-publisher-env.yaml -fuel-streams-publisher: +cat <cluster/charts/fuel-streams/values-publisher-secrets.yaml +publisher: extraEnv: - name: RELAYER value: "${RELAYER:-}" @@ -15,4 +15,4 @@ fuel-streams-publisher: value: "${NATS_ADMIN_PASS:-}" EOF -echo "Generated values-publisher-env.yaml with environment variables" +echo "Generated values-publisher-secrets.yaml with environment variables" diff --git a/cluster/scripts/setup_k8s.sh b/cluster/scripts/setup_k8s.sh index 7684fcc1..bb7537e8 100755 --- a/cluster/scripts/setup_k8s.sh +++ b/cluster/scripts/setup_k8s.sh @@ -3,15 +3,18 @@ [[ $DEBUG = true ]] && set -x set -euo pipefail -# Configure fuel-local namespace and context -echo -e "\n\033[1;33mConfiguring fuel-local namespace and context:\033[0m" +# Parse command line arguments +NAMESPACE="${1:-fuel-streams}" # Use first argument, default to "fuel-streams" if not provided + +# Configure namespace and context +echo -e "\n\033[1;33mConfiguring ${NAMESPACE} namespace and context:\033[0m" # Check if namespace exists -if kubectl get namespace fuel-local &>/dev/null; then - echo "Namespace fuel-local already exists" +if kubectl get namespace ${NAMESPACE} &>/dev/null; then + echo "Namespace ${NAMESPACE} already exists" else - echo "Creating namespace fuel-local..." - kubectl create namespace fuel-local + echo "Creating namespace ${NAMESPACE}..." + kubectl create namespace ${NAMESPACE} fi # Switch to minikube context @@ -24,11 +27,11 @@ fi # Set namespace for current context CURRENT_NAMESPACE=$(kubectl config view --minify --output 'jsonpath={..namespace}') -if [ "$CURRENT_NAMESPACE" != "fuel-local" ]; then - echo "Setting current namespace to fuel-local..." - kubectl config set-context --current --cluster=minikube --namespace=fuel-local +if [ "$CURRENT_NAMESPACE" != "${NAMESPACE}" ]; then + echo "Setting current namespace to ${NAMESPACE}..." + kubectl config set-context --current --cluster=minikube --namespace=${NAMESPACE} else - echo "Context namespace is already set to fuel-local" + echo "Context namespace is already set to ${NAMESPACE}" fi # Verify context configuration diff --git a/cluster/scripts/setup_minikube.sh b/cluster/scripts/setup_minikube.sh index d7c935af..0c01374a 100755 --- a/cluster/scripts/setup_minikube.sh +++ b/cluster/scripts/setup_minikube.sh @@ -19,7 +19,7 @@ minikube delete # Default values for resources DEFAULT_DISK_SIZE='50000mb' -DEFAULT_MEMORY='20000mb' +DEFAULT_MEMORY='12000mb' # Get parameters with defaults DISK_SIZE=${1:-$DEFAULT_DISK_SIZE} @@ -30,42 +30,8 @@ minikube start \ --driver=docker \ --disk-size="$DISK_SIZE" \ --memory="$MEMORY" \ - --cpus 8 \ - --insecure-registry registry.dev.svc.cluster.local:5000 - -# Enable required addons -echo "Enabling minikube addons..." -ADDONS=( - "registry-creds" - "registry" - "metrics-server" - "dashboard" -) - -# Add ingress addon only if not on macOS (ingress is not working properly on macOS) -if [[ "$(uname)" != "Darwin" ]]; then - ADDONS+=("ingress") -fi - -for addon in "${ADDONS[@]}"; do - echo "Enabling $addon..." - minikube addons enable "$addon" -done - -# Display enabled addons -echo -e "\n\033[1;33mEnabled Addons:\033[0m" -minikube addons list | grep -E "STATUS|enabled" + --cpus 8 # Display minikube status echo -e "\n\033[1;33mMinikube Status:\033[0m" minikube status - -# Check if traefik script exists -TRAEFIK_SCRIPT="./cluster/charts/fuel-local/scripts/traefik2-ds.sh" -if [ -f "$TRAEFIK_SCRIPT" ]; then - echo -e "\n\033[1;33mSetting up traefik:\033[0m" - $TRAEFIK_SCRIPT -else - echo -e "\n\033[1;31mWarning: Traefik setup script not found at $TRAEFIK_SCRIPT\033[0m" - exit 1 -fi diff --git a/cluster/scripts/start_minikube.sh b/cluster/scripts/start_minikube.sh deleted file mode 100755 index 77800b09..00000000 --- a/cluster/scripts/start_minikube.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -[[ $DEBUG = true ]] && set -x -set -euo pipefail - -# Default values for resources -DEFAULT_DISK_SIZE='50000mb' -DEFAULT_MEMORY='20000mb' - -# Get parameters with defaults -DISK_SIZE=${1:-$DEFAULT_DISK_SIZE} -MEMORY=${2:-$DEFAULT_MEMORY} - -# Start minikube with specified resources -minikube start \ - --driver=docker \ - --disk-size="$DISK_SIZE" \ - --memory="$MEMORY" \ - --cpus 8 \ - --insecure-registry registry.dev.svc.cluster.local:5000 - -# Display minikube status -echo -e "\n\033[1;33mMinikube Status:\033[0m" -minikube status diff --git a/crates/fuel-indexer/Cargo.toml b/crates/fuel-indexer/Cargo.toml deleted file mode 100644 index fb5d88f0..00000000 --- a/crates/fuel-indexer/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "fuel-indexer" -authors = { workspace = true } -keywords = { workspace = true } -edition = { workspace = true } -homepage = { workspace = true } -license = { workspace = true } -repository = { workspace = true } -version = { workspace = true } -rust-version = { workspace = true } -publish = false - -[dependencies] -anyhow = { workspace = true } -dotenvy = { workspace = true } -fuel-streams-core = { workspace = true, features = ["test-helpers"] } -futures = { workspace = true } -serde = { workspace = true, features = ["derive"] } -surrealdb = "2.0" -tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } diff --git a/crates/fuel-indexer/src/main.rs b/crates/fuel-indexer/src/main.rs deleted file mode 100644 index 5be92fe0..00000000 --- a/crates/fuel-indexer/src/main.rs +++ /dev/null @@ -1,123 +0,0 @@ -use fuel_streams_core::{ - nats::{types::DeliverPolicy, NatsClient, NatsClientOpts}, - types::{Block, Transaction}, - StreamEncoder, - Streamable, - SubscribeConsumerConfig, -}; -use futures::StreamExt; -use serde::{Deserialize, Serialize}; -use surrealdb::{ - engine::remote::ws::{Client, Ws}, - opt::auth::Root, - sql::Thing, - Surreal, -}; - -#[derive(Debug, Serialize, Deserialize)] -struct BlockRecord { - id: Thing, - data: Block, -} - -#[derive(Debug, Serialize, Deserialize)] -struct TransactionRecord { - id: Thing, - data: Transaction, -} - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - let db_url = - dotenvy::var("SURREALDB_URL").expect("`SURREALDB_URL` env must be set"); - let db_user = dotenvy::var("SURREALDB_USER") - .expect("`SURREALDB_USER` env must be set"); - let db_pass = dotenvy::var("SURREALDB_PASS") - .expect("`SURREALDB_PASS` env must be set"); - - let db = Surreal::new::(db_url).await?; - db.signin(Root { - username: db_user.as_str(), - password: db_pass.as_str(), - }) - .await?; - - db.use_ns("fuel_indexer").use_db("fuel_indexer").await?; - - let nats_client_opts = NatsClientOpts::admin_opts(None) - .with_custom_url("nats:4222".to_string()); - let nats_client = NatsClient::connect(&nats_client_opts).await?; - - tokio::try_join!( - sync_blocks(&db, &nats_client), - sync_transactions(&db, &nats_client) - )?; - - Ok(()) -} - -async fn sync_blocks( - db: &Surreal, - client: &NatsClient, -) -> anyhow::Result<()> { - let stream = fuel_streams_core::Stream::::get_or_init(client).await; - - let mut subscription = stream - .subscribe_consumer(SubscribeConsumerConfig { - deliver_policy: DeliverPolicy::All, - filter_subjects: vec![Block::WILDCARD_LIST[0].to_string()], - }) - .await?; - - while let Some(msg) = subscription.next().await { - let msg = msg?; - let block = Block::decode(msg.payload.clone().into()).await; - let height = block.height; - let id = height.to_string(); - let key = ("block".to_string(), id.clone()); - let record: Option = db - .upsert(key.clone()) - .content(BlockRecord { - id: key.into(), - data: block, - }) - .await?; - - dbg!(record); - } - Ok(()) -} - -async fn sync_transactions( - db: &Surreal, - client: &NatsClient, -) -> anyhow::Result<()> { - let stream = - fuel_streams_core::Stream::::get_or_init(client).await; - - let mut subscription = stream - .subscribe_consumer(SubscribeConsumerConfig { - deliver_policy: DeliverPolicy::All, - filter_subjects: vec![Transaction::WILDCARD_LIST[0].to_string()], - }) - .await?; - - while let Some(msg) = subscription.next().await { - let msg = msg?; - let transaction = Transaction::decode(msg.payload.clone().into()).await; - let tx_id = &transaction.id; - let id = format!("0x{}", tx_id); - let key = ("transaction".to_string(), id.clone()); - let record: Option = db - .upsert(key.clone()) - .content(TransactionRecord { - id: key.into(), - data: transaction, - }) - .await?; - - dbg!(record); - } - - Ok(()) -} diff --git a/crates/fuel-streams-publisher/src/cli.rs b/crates/fuel-streams-publisher/src/cli.rs index 5572ce77..92d5765c 100644 --- a/crates/fuel-streams-publisher/src/cli.rs +++ b/crates/fuel-streams-publisher/src/cli.rs @@ -30,4 +30,12 @@ pub struct Cli { help = "Port for the Actix Web server to bind telemetry to." )] pub telemetry_port: u16, + #[arg( + long, + value_name = "HISTORICAL", + env = "HISTORICAL", + default_value = "false", + help = "Whether to publish historical data to NATS" + )] + pub historical: bool, } diff --git a/crates/fuel-streams-publisher/src/main.rs b/crates/fuel-streams-publisher/src/main.rs index b966c88a..db5c5366 100644 --- a/crates/fuel-streams-publisher/src/main.rs +++ b/crates/fuel-streams-publisher/src/main.rs @@ -16,6 +16,7 @@ use fuel_streams_publisher::{ #[tokio::main] async fn main() -> anyhow::Result<()> { let cli = Cli::parse(); + let historical = cli.clone().historical; let fuel_core: Arc = FuelCore::new(cli.fuel_core_config).await?; @@ -53,7 +54,7 @@ async fn main() -> anyhow::Result<()> { ShutdownController::spawn_signal_listener(shutdown_controller); // run publisher until shutdown signal intercepted - if let Err(err) = publisher.run(shutdown_token).await { + if let Err(err) = publisher.run(shutdown_token, historical).await { tracing::error!("Publisher encountered an error: {:?}", err); } tracing::info!("Publisher stopped"); diff --git a/crates/fuel-streams-publisher/src/publisher/blocks_streams.rs b/crates/fuel-streams-publisher/src/publisher/blocks_streams.rs index 6af0df4d..a40c0e00 100644 --- a/crates/fuel-streams-publisher/src/publisher/blocks_streams.rs +++ b/crates/fuel-streams-publisher/src/publisher/blocks_streams.rs @@ -327,7 +327,7 @@ mod tests { fn blocks_subscription(&self) -> broadcast::Receiver; async fn start(&self) -> anyhow::Result<()>; fn is_started(&self) -> bool; - async fn await_synced_at_least_once(&self) -> anyhow::Result<()>; + async fn await_synced_at_least_once(&self, historical: bool) -> anyhow::Result<()>; async fn stop(&self); fn base_asset_id(&self) -> &FuelCoreAssetId; fn chain_id(&self) -> &FuelCoreChainId; diff --git a/crates/fuel-streams-publisher/src/publisher/fuel_core_like.rs b/crates/fuel-streams-publisher/src/publisher/fuel_core_like.rs index 26296b1f..921cf743 100644 --- a/crates/fuel-streams-publisher/src/publisher/fuel_core_like.rs +++ b/crates/fuel-streams-publisher/src/publisher/fuel_core_like.rs @@ -34,7 +34,10 @@ pub type OffchainDatabase = GenericDatabase< pub trait FuelCoreLike: Sync + Send { async fn start(&self) -> anyhow::Result<()>; fn is_started(&self) -> bool; - async fn await_synced_at_least_once(&self) -> anyhow::Result<()>; + async fn await_synced_at_least_once( + &self, + historical: bool, + ) -> anyhow::Result<()>; async fn stop(&self); fn base_asset_id(&self) -> &FuelCoreAssetId; @@ -185,8 +188,13 @@ impl FuelCoreLike for FuelCore { fn is_started(&self) -> bool { self.fuel_service.state().started() } - async fn await_synced_at_least_once(&self) -> anyhow::Result<()> { - self.fuel_service.await_relayer_synced().await?; + async fn await_synced_at_least_once( + &self, + historical: bool, + ) -> anyhow::Result<()> { + if !historical { + self.fuel_service.await_relayer_synced().await?; + } Ok(()) } diff --git a/crates/fuel-streams-publisher/src/publisher/mod.rs b/crates/fuel-streams-publisher/src/publisher/mod.rs index d961ebce..4a7df81f 100644 --- a/crates/fuel-streams-publisher/src/publisher/mod.rs +++ b/crates/fuel-streams-publisher/src/publisher/mod.rs @@ -103,10 +103,13 @@ impl Publisher { pub async fn run( &self, shutdown_token: ShutdownToken, + historical: bool, ) -> anyhow::Result<()> { tracing::info!("Awaiting FuelCore Sync..."); - self.fuel_core.await_synced_at_least_once().await?; + self.fuel_core + .await_synced_at_least_once(historical) + .await?; tracing::info!("FuelCore has synced successfully!"); diff --git a/docker/.dockerignore b/docker/.dockerignore deleted file mode 100644 index ea8c4bf7..00000000 --- a/docker/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml deleted file mode 100644 index 1a2e97a9..00000000 --- a/docker/docker-compose.yml +++ /dev/null @@ -1,337 +0,0 @@ -services: - nats: - profiles: - - all - - nats - - dev - - monitoring - image: nats:latest - container_name: nats - restart: always - ports: - - 4222:4222 - - 8222:8222 - - 8443:8443 - volumes: - - ./nats.conf:/etc/nats/nats.conf - command: - - -m - - "8222" - - --name=fuel-streams-publisher-server - - --js - - --config=/etc/nats/nats.conf - - -D - env_file: - - ./../.env - - fuel-streams-publisher: - profiles: - - all - - fuel - - dev - image: fuel-streams-publisher:latest - container_name: fuel-streams-publisher - restart: always - depends_on: - - nats - env_file: - - ./../.env - environment: - - NETWORK=${NETWORK} - - P2P_PORT=30333 - - RESERVED_NODES=${RESERVED_NODES} - - RELAYER_V2_LISTENING_CONTRACTS=${RELAYER_V2_LISTENING_CONTRACTS} - - RELAYER_DA_DEPLOY_HEIGHT=${RELAYER_DA_DEPLOY_HEIGHT} - - NATS_URL=nats://nats:4222 - - RELAYER=${RELAYER} - - SYNC_HEADER_BATCH_SIZE=${SYNC_HEADER_BATCH_SIZE} - - RELAYER_LOG_PAGE_SIZE=${RELAYER_LOG_PAGE_SIZE} - - CHAIN_CONFIG=${NETWORK} - build: - context: .. - dockerfile: docker/fuel-streams-publisher.Dockerfile - volumes: - - fuel-streams-publisher-db-${NETWORK}:/mnt/db - ports: - - 4000:4000 - - 8080:8080 - healthcheck: - test: - - "CMD" - - "curl" - - "-f" - - "http://fuel-streams-publisher:8080/health" - interval: 10s # How often to run the check - timeout: 5s # Time to wait for the check to complete - retries: 5 # Number of retries before marking the container as unhealthy - start_period: 5s # Start period before the first health check - - fuel-streams-ws: - profiles: - - all - - fuel - - dev - image: fuel-streams-ws:latest - container_name: fuel-streams-ws - restart: always - depends_on: - - nats - env_file: - - ./../.env - environment: - - NETWORK=${NETWORK} - - STREAMER_API_PORT=9003 - - NATS_URL=nats://nats:4222 - - S3_ENABLED=${S3_ENABLED} - - S3_REGION=${S3_REGION} - - S3_BUCKET=${S3_BUCKET} - - S3_ENDPOINT=${S3_ENDPOINT} - - JWT_AUTH_SECRET=${JWT_AUTH_SECRET} - build: - context: .. - dockerfile: docker/fuel-streams-ws.Dockerfile - volumes: - - fuel-streams-ws-db-${NETWORK}:/mnt/db - ports: - - 9003:9003 - healthcheck: - test: - - "CMD" - - "curl" - - "-f" - - "http://fuel-streams-ws:8080/health" - interval: 10s # How often to run the check - timeout: 5s # Time to wait for the check to complete - retries: 5 # Number of retries before marking the container as unhealthy - start_period: 5s # Start period before the first health check - - prometheus: - profiles: - - all - - monitoring - image: prom/prometheus:latest - container_name: prometheus - restart: always - volumes: - - ./monitoring/prometheus/:/etc/prometheus/ - - prometheus_data:/prometheus - command: - - "--config.file=/etc/prometheus/prometheus.yml" - - "--storage.tsdb.path=/prometheus" - - "--web.console.libraries=/usr/share/prometheus/console_libraries" - - "--web.console.templates=/usr/share/prometheus/consoles" - - "--storage.tsdb.retention.time=200h" - - "--web.enable-lifecycle" - ports: - - 9090:9090 - - node-exporter: - profiles: - - all - - monitoring - image: prom/node-exporter:latest - container_name: node-exporter - restart: always - volumes: - - /proc:/host/proc:ro - - /sys:/host/sys:ro - - /:/rootfs:ro - command: - - "--path.procfs=/host/proc" - - "--path.rootfs=/rootfs" - - "--path.sysfs=/host/sys" - - --collector.filesystem.ignored-mount-points - - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" - ports: - - 9100:9100 - depends_on: - - prometheus - deploy: - mode: global - - cadvisor: - profiles: - - all - - monitoring - image: gcr.io/cadvisor/cadvisor - container_name: cadvisor - restart: always - volumes: - - /:/rootfs:ro - - /var/run:/var/run:rw - - /sys:/sys:ro - - /var/lib/docker/:/var/lib/docker:ro - ports: - - 8080:8080 - depends_on: - - prometheus - deploy: - mode: global - - alertmanager: - profiles: - - all - - monitoring - image: prom/alertmanager:latest - container_name: alertmanager - restart: always - volumes: - - ./monitoring/alertmanager/:/etc/alertmanager/ - command: - - "--config.file=/etc/alertmanager/config.yml" - - "--storage.path=/alertmanager" - depends_on: - - prometheus - ports: - - 9093:9093 - - grafana: - profiles: - - all - - monitoring - image: grafana/grafana:latest - container_name: grafana - user: "472" - restart: always - environment: - GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource,grafana-worldmap-panel,grafana-piechart-panel" - volumes: - - grafana_data:/var/lib/grafana - - ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/ - env_file: - - ./monitoring/grafana/config.monitoring - ports: - - 3000:3000 - depends_on: - - prometheus - - grafana-image-renderer: - profiles: - - all - - monitoring - image: grafana/grafana-image-renderer - container_name: grafana-image-renderer - restart: always - depends_on: - - grafana - - prometheus-nats-exporter: - profiles: - - all - - monitoring - image: natsio/prometheus-nats-exporter:latest - container_name: prometheus-nats-exporter - restart: always - command: - - "-D" - - "-varz" - - "-jsz" - - "all" - - "-accstatz" - - "-channelz" - - "-connz" - - "-leafz" - - "-connz_detailed" - - "-serverz" - - "-healthz" - - "-routez" - - "-subz" - - "-port" - - "7777" - - "http://nats:8222" - ports: - - 7777:7777 - env_file: - - ./../.env - depends_on: - - nats - healthcheck: - test: - - "CMD" - - "wget" - - "-qO-" - - "http://prometheus-nats-exporter:7777/metrics" - interval: 30s - timeout: 10s - retries: 5 - - nats-surveyor: - profiles: - - all - - monitoring - image: natsio/nats-surveyor:latest - container_name: nats-surveyor - restart: always - volumes: - - ./monitoring/surveyor/observations:/observations - - ./monitoring/surveyor/jetstream:/jetstream - - ./monitoring/surveyor:/surveyor - command: --config ./surveyor/nats-surveyor.yaml - env_file: - - ./../.env - depends_on: - - nats - ports: - - 8888:7777 - - surrealdb: - profiles: - - all - - indexer - image: surrealdb/surrealdb:latest - ports: - - "8002:8000" - command: - - start # start the SurrealDB server - - --log=trace # no idea what this does :( - - --user=root # default user - - --pass=root # default password - restart: always - - elasticsearch: - profiles: - # - all - - logging - image: elasticsearch:7.9.2 - container_name: elasticsearch - restart: always - environment: - - discovery.type=single-node - - ELASTIC_PASSWORD=secret - - xpack.security.enabled=true - - xpack.security.transport.ssl.enabled=false - ports: - - "9200:9200" - - "9300:9300" - volumes: - - es_data:/usr/share/elasticsearch/data - - kibana: - profiles: - # - all - - logging - image: kibana:7.9.2 - container_name: kibana - restart: always - environment: - - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 - - ELASTICSEARCH_USERNAME=elastic - - ELASTICSEARCH_PASSWORD=secret - ports: - - "5601:5601" - depends_on: - - elasticsearch - healthcheck: - test: - - "CMD" - - "curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'" - interval: 30s # Increase the interval between checks - timeout: 30s # Increase the timeout for each check - retries: 60 # Increase retries to allow more time for Elasticsearch to be ready - -volumes: - fuel-streams-publisher-db-mainnet: - fuel-streams-publisher-db-testnet: - prometheus_data: - grafana_data: - es_data: diff --git a/docker/monitoring/alertmanager/config.yml b/docker/monitoring/alertmanager/config.yml deleted file mode 100644 index 12a7800a..00000000 --- a/docker/monitoring/alertmanager/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -route: - receiver: 'slack' - -receivers: - - name: 'slack' - -# slack_configs: -# - send_resolved: true -# username: '' -# channel: '#' -# api_url: '' diff --git a/docker/monitoring/grafana/config.monitoring b/docker/monitoring/grafana/config.monitoring deleted file mode 100644 index f0185c1f..00000000 --- a/docker/monitoring/grafana/config.monitoring +++ /dev/null @@ -1,24 +0,0 @@ -GF_SECURITY_ADMIN_USER=admin -GF_SECURITY_ADMIN_PASSWORD=admin -GF_USERS_ALLOW_SIGN_UP=false -GF_SERVER_DOMAIN=myrul.com -GF_SMTP_ENABLED=true -GF_SMTP_HOST=smtp.gmail.com:587 -GF_SMTP_USER=myadrress@gmail.com -GF_SMTP_PASSWORD=mypassword -GF_SMTP_FROM_ADDRESS=myaddress@gmail.com - -GF_LOG_LEVEL: debug -GF_ANALYTICS_ENABLED: true -GF_ANALYTICS_REPORTING_ENABLED: true -GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES: true -GF_ANALYTICS_CHECK_FOR_UPDATES: true -GF_ANALYTICS_FEEDBACK_LINKS_ENABLED: true -GF_SECURITY_DISABLE_GRAVATAR: true - -GF_USERS_DEFAULT_THEME: system -GF_NEWS_NEWS_FEED_ENABLED: false -GF_RENDERING_RENDERER_TOKEN: "-" -GF_RENDERING_SERVER_URL: http://grafana-image-renderer:8081/render -GF_RENDERING_CALLBACK_URL: http://grafana:3000/ -GF_LOG_FILTERS: rendering:debug diff --git a/docker/monitoring/grafana/provisioning/dashboards/dashboard.yml b/docker/monitoring/grafana/provisioning/dashboards/dashboard.yml deleted file mode 100644 index 16ce9d55..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/dashboard.yml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: 1 - -providers: - - name: 'Prometheus' - orgId: 1 - folder: '' - type: file - disableDeletion: false - editable: true - options: - folder: /etc/grafana/provisioning/dashboards diff --git a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-1-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-1-dashboard.json deleted file mode 100644 index 9009336a..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-1-dashboard.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS__PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "3.1.0" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "id": null, - "title": "Grafana Docker Monitoring 1", - "description": "Docker Monitoring", - "tags": ["docker"], - "style": "dark", - "timezone": "browser", - "editable": true, - "hideControls": false, - "sharedCrosshair": true, - "rows": [ - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "(sum(node_memory_MemTotal) - sum(node_memory_MemFree+node_memory_Buffers+node_memory_Cached) ) / sum(node_memory_MemTotal) * 100", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Memory usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 6, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum(sum by (container_name)( rate(container_cpu_usage_seconds_total{image!=\"\"}[1m] ) )) / count(node_cpu{mode=\"system\"}) * 100", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "CPU usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 7, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_fs_limit_bytes - container_fs_usage_bytes) / sum(container_fs_limit_bytes)", - "interval": "10s", - "intervalFactor": 1, - "metric": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Filesystem usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - } - ], - "title": "Row" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 3, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sort_desc(sum(container_cpu_user_seconds_total{image!=\"\"}) by (name))", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "metric": "container_cpu_user_seconds_total", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Container CPU usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], - "title": "New row" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 2, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sort_desc(sum(container_memory_usage_bytes{image!=\"\"}) by (name))", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Container Memory Usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 8, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (container_name) (rate(container_network_receive_bytes_total{image!=\"\"}[1m] ) )", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ Receive }}", - "metric": "container_network_receive_bytes_total", - "refId": "A", - "step": 10 - }, - { - "expr": "sum by (container_name) (rate(container_network_transmit_bytes_total{image!=\"\"}[1m] ) )", - "intervalFactor": 2, - "legendFormat": "{{ Transmit }}", - "metric": "container_network_transmit_bytes_total", - "refId": "B", - "step": 4 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Total Network i/o", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], - "title": "New row" - } - ], - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "templating": { - "list": [] - }, - "annotations": { - "list": [] - }, - "refresh": "10s", - "schemaVersion": 12, - "version": 1, - "links": [], - "gnetId": 162 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-2-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-2-dashboard.json deleted file mode 100644 index 8f2720c9..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-2-dashboard.json +++ /dev/null @@ -1,1528 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS__PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.2.2" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "5.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Docker Monitoring", - "editable": true, - "gnetId": 179, - "graphTooltip": 1, - "id": null, - "iteration": 1533037835187, - "links": [], - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 17, - "panels": [], - "title": "Host Info", - "type": "row" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"], - "datasource": "DS__PROMETHEUS", - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 15, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "time() - process_start_time_seconds{job=\"prometheus\"}", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "", - "title": "Uptime", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": true, - "colorValue": false, - "colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"], - "datasource": "DS__PROMETHEUS", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 6, - "y": 1 - }, - "id": 13, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(ALERTS)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "0,1", - "title": "Alerts", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "0" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": true, - "colorValue": false, - "colors": ["#d44a3a", "rgba(237, 129, 40, 0.89)", "#299c46"], - "datasource": "DS__PROMETHEUS", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 11, - "y": 1 - }, - "id": 11, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(up)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "0,1", - "title": "Targets Online", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": ["#d44a3a", "rgba(237, 129, 40, 0.89)", "#299c46"], - "datasource": "DS__PROMETHEUS", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 15, - "y": 1 - }, - "id": 31, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "count(rate(container_last_seen{job=\"cadvisor\", name!=\"\"}[5m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "0,1", - "title": "Running Containers", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": ["rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)"], - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 8 - }, - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "(sum(node_memory_MemTotal_bytes) - sum(node_memory_MemFree_bytes +node_memory_Buffers_bytes + node_memory_Cached_bytes) ) / sum(node_memory_MemTotal_bytes) * 100", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Memory usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": ["rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)"], - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 6, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum by (container_name)( rate(container_cpu_usage_seconds_total[1m] ) )) / count(node_cpu_seconds_total{mode=\"system\"}) * 100", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "CPU usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": ["rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)"], - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 6, - "w": 7, - "x": 12, - "y": 8 - }, - "id": 7, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (container_fs_limit_bytes - container_fs_usage_bytes) / sum(container_fs_limit_bytes)", - "interval": "10s", - "intervalFactor": 1, - "metric": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Filesystem usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "aliasColors": { - "RECEIVE": "#ea6460", - "SENT": "#1f78c1", - "TRANSMIT": "#1f78c1" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "fill": 4, - "gridPos": { - "h": 9, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 25, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_receive_bytes_total{id=\"/\"}[$interval])) by (id)", - "format": "time_series", - "interval": "2m", - "intervalFactor": 2, - "legendFormat": "RECEIVE", - "refId": "A" - }, - { - "expr": "- sum(rate(container_network_transmit_bytes_total{id=\"/\"}[$interval])) by (id)", - "format": "time_series", - "interval": "2m", - "intervalFactor": 2, - "legendFormat": "TRANSMIT", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Node Network Traffic", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "Available Memory": "#508642", - "Used Memory": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "fill": 3, - "gridPos": { - "h": 9, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 27, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(node_memory_MemTotal_bytes) - sum(node_memory_MemAvailable_bytes)", - "format": "time_series", - "interval": "2m", - "intervalFactor": 2, - "legendFormat": "Used Memory", - "refId": "B" - }, - { - "expr": "sum(node_memory_MemAvailable_bytes)", - "format": "time_series", - "interval": "2m", - "intervalFactor": 2, - "legendFormat": "Available Memory", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Node Mermory", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "Available Memory": "#508642", - "Free Storage": "#447ebc", - "Total Storage Available": "#508642", - "Used Memory": "#bf1b00", - "Used Storage": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "fill": 3, - "gridPos": { - "h": 9, - "w": 7, - "x": 12, - "y": 14 - }, - "id": 28, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(node_filesystem_free_bytes {job=\"node-exporter\", instance=~\".*9100\", device=~\"/dev/.*\", mountpoint!=\"/var/lib/docker/aufs\"}) ", - "format": "time_series", - "interval": "2m", - "intervalFactor": 2, - "legendFormat": "Free Storage", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Filesystem Available", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 19, - "panels": [], - "repeat": null, - "title": "Container Performance", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 10, - "w": 6, - "x": 0, - "y": 24 - }, - "id": 3, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "container_cpu_load_average_10s{image!=\"\"}", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ย name }}", - "metric": "container_cpu_user_seconds_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container CPU usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 10, - "w": 6, - "x": 6, - "y": 24 - }, - "id": 2, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "container_memory_max_usage_bytes{image!=\"\"}", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Memory Usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "columns": [], - "datasource": "DS__PROMETHEUS", - "fontSize": "100%", - "gridPos": { - "h": 13, - "w": 10, - "x": 12, - "y": 24 - }, - "id": 23, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "ALERTS", - "format": "table", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Alerts", - "transform": "table", - "type": "table" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 14, - "w": 6, - "x": 0, - "y": 34 - }, - "id": 8, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sort_desc(sum by (name) (rate(container_network_receive_bytes_total{image!=\"\"}[1m] ) ))", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ name }}", - "metric": "container_network_receive_bytes_total", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Network Input", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 14, - "w": 6, - "x": 6, - "y": 34 - }, - "id": 9, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sort_desc(sum by (name) (rate(container_network_transmit_bytes_total{image!=\"\"}[1m] ) ))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ name }}", - "metric": "container_network_transmit_bytes_total", - "refId": "B", - "step": 4 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Container Network Output", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "columns": [], - "datasource": "DS__PROMETHEUS", - "fontSize": "100%", - "gridPos": { - "h": 10, - "w": 10, - "x": 12, - "y": 37 - }, - "id": 30, - "links": [], - "pageSize": 10, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "link": false, - "linkUrl": "", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "cadvisor_version_info", - "format": "table", - "instant": false, - "interval": "15m", - "intervalFactor": 2, - "legendFormat": "cAdvisor Version: {{cadvisorVersion}}", - "refId": "A" - }, - { - "expr": "prometheus_build_info", - "format": "table", - "interval": "15m", - "intervalFactor": 2, - "legendFormat": "Prometheus Version: {{version}}", - "refId": "B" - }, - { - "expr": "node_exporter_build_info", - "format": "table", - "interval": "15m", - "intervalFactor": 2, - "legendFormat": "Node-Exporter Version: {{version}}", - "refId": "C" - } - ], - "title": "Running Versions", - "transform": "table", - "type": "table" - } - ], - "refresh": "10s", - "schemaVersion": 16, - "style": "dark", - "tags": ["docker"], - "templating": { - "list": [ - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "text": "1m", - "value": "1m" - }, - "hide": 0, - "label": "interval", - "name": "interval", - "options": [ - { - "selected": true, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "10m", - "value": "10m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "6h", - "value": "6h" - }, - { - "selected": false, - "text": "12h", - "value": "12h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" - }, - { - "selected": false, - "text": "7d", - "value": "7d" - }, - { - "selected": false, - "text": "14d", - "value": "14d" - }, - { - "selected": false, - "text": "30d", - "value": "30d" - } - ], - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "refresh": 2, - "type": "interval" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "browser", - "title": "Grafana Docker Monitoring 2", - "uid": "64nrElFmk", - "version": 4 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-3-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-3-dashboard.json deleted file mode 100644 index f2c6a310..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/docker/grafana-docker-monitoring-3-dashboard.json +++ /dev/null @@ -1,2127 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS__PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "4.0.0-beta2" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "id": null, - "title": "Grafana Docker Monitoring 3", - "description": "A simple overview of the most important Docker host and container metrics. (cAdvisor/Prometheus)", - "tags": ["docker"], - "style": "dark", - "timezone": "browser", - "editable": true, - "sharedCrosshair": true, - "hideControls": false, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "templating": { - "list": [ - { - "allValue": ".+", - "current": {}, - "datasource": "DS__PROMETHEUS", - "hide": 0, - "includeAll": true, - "label": "Container Group", - "multi": true, - "name": "containergroup", - "options": [], - "query": "label_values(container_group)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": null, - "tagsQuery": null, - "type": "query" - }, - { - "auto": true, - "auto_count": 50, - "auto_min": "50s", - "current": { - "text": "auto", - "value": "$__auto_interval" - }, - "datasource": null, - "hide": 0, - "includeAll": false, - "label": "Interval", - "multi": false, - "name": "interval", - "options": [ - { - "text": "auto", - "value": "$__auto_interval", - "selected": true - }, - { - "text": "30s", - "value": "30s", - "selected": false - }, - { - "text": "1m", - "value": "1m", - "selected": false - }, - { - "text": "2m", - "value": "2m", - "selected": false - }, - { - "text": "3m", - "value": "3m", - "selected": false - }, - { - "text": "5m", - "value": "5m", - "selected": false - }, - { - "text": "7m", - "value": "7m", - "selected": false - }, - { - "text": "10m", - "value": "10m", - "selected": false - }, - { - "text": "30m", - "value": "30m", - "selected": false - }, - { - "text": "1h", - "value": "1h", - "selected": false - }, - { - "text": "6h", - "value": "6h", - "selected": false - }, - { - "text": "12h", - "value": "12h", - "selected": false - }, - { - "text": "1d", - "value": "1d", - "selected": false - }, - { - "text": "7d", - "value": "7d", - "selected": false - }, - { - "text": "14d", - "value": "14d", - "selected": false - }, - { - "text": "30d", - "value": "30d", - "selected": false - } - ], - "query": "30s,1m,2m,3m,5m,7m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "refresh": 2, - "type": "interval" - }, - { - "allValue": null, - "current": {}, - "datasource": "DS__PROMETHEUS", - "hide": 0, - "includeAll": false, - "label": "Node", - "multi": true, - "name": "server", - "options": [], - "query": "label_values(node_boot_time, instance)", - "refresh": 1, - "regex": "/([^:]+):.*/", - "sort": 0, - "tagValuesQuery": null, - "tagsQuery": null, - "type": "query" - } - ] - }, - "annotations": { - "list": [] - }, - "refresh": "5m", - "schemaVersion": 13, - "version": 57, - "links": [], - "gnetId": 893, - "rows": [ - { - "title": "Dashboard Row", - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 0, - "editable": true, - "error": false, - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "", - "id": 24, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "30%", - "prefix": "", - "prefixFontSize": "20%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "time() - node_boot_time{instance=~\"$server:.*\"}", - "hide": false, - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 1800 - } - ], - "thresholds": "", - "title": "Uptime", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 31, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "count(rate(container_last_seen{name=~\".+\"}[$interval]))", - "intervalFactor": 2, - "refId": "A", - "step": 1800 - } - ], - "thresholds": "", - "title": "Containers", - "type": "singlestat", - "valueFontSize": "120%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 1, - "editable": true, - "error": false, - "format": "percentunit", - "gauge": { - "maxValue": 1, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 26, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "min((node_filesystem_size{fstype=~\"xfs|ext4\",instance=~\"$server:.*\"} - node_filesystem_free{fstype=~\"xfs|ext4\",instance=~\"$server:.*\"} )/ node_filesystem_size{fstype=~\"xfs|ext4\",instance=~\"$server:.*\"})", - "hide": false, - "intervalFactor": 2, - "refId": "A", - "step": 1800 - } - ], - "thresholds": "0.75, 0.90", - "title": "Disk space", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 0, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 25, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "((node_memory_MemTotal{instance=~\"$server:.*\"} - node_memory_MemAvailable{instance=~\"$server:.*\"}) / node_memory_MemTotal{instance=~\"$server:.*\"}) * 100", - "intervalFactor": 2, - "refId": "A", - "step": 1800 - } - ], - "thresholds": "70, 90", - "title": "Memory", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 0, - "editable": true, - "error": false, - "format": "decbytes", - "gauge": { - "maxValue": 500000000, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 30, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "(node_memory_SwapTotal{instance=~'$server:.*'} - node_memory_SwapFree{instance=~'$server:.*'})", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 1800 - } - ], - "thresholds": "400000000", - "title": "Swap", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "DS__PROMETHEUS", - "decimals": 0, - "editable": true, - "error": false, - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 27, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(50, 189, 31, 0.18)", - "full": false, - "lineColor": "rgb(69, 193, 31)", - "show": true - }, - "targets": [ - { - "expr": "node_load1{instance=~\"$server:.*\"} / count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~\"$server:.*\"}))", - "intervalFactor": 2, - "refId": "A", - "step": 1800 - } - ], - "thresholds": "0.8,0.9", - "title": "Load", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 150, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - }, - { - "title": "New row", - "panels": [ - { - "aliasColors": { - "SENT": "#BF1B00" - }, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 19, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 2, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_receive_bytes_total{id=\"/\"}[$interval])) by (id)", - "intervalFactor": 2, - "legendFormat": "RECEIVED", - "refId": "A", - "step": 600 - }, - { - "expr": "- sum(rate(container_network_transmit_bytes_total{id=\"/\"}[$interval])) by (id)", - "hide": false, - "intervalFactor": 2, - "legendFormat": "SENT", - "refId": "B", - "step": 600 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Network Traffic", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { - "{id=\"/\",instance=\"cadvisor:8080\",job=\"prometheus\"}": "#BA43A9" - }, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 2, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_system_seconds_total[1m]))", - "hide": true, - "intervalFactor": 2, - "legendFormat": "a", - "refId": "B", - "step": 120 - }, - { - "expr": "sum(rate(container_cpu_system_seconds_total{name=~\".+\"}[1m]))", - "hide": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "nur container", - "refId": "F", - "step": 10 - }, - { - "expr": "sum(rate(container_cpu_system_seconds_total{id=\"/\"}[1m]))", - "hide": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "nur docker host", - "metric": "", - "refId": "A", - "step": 20 - }, - { - "expr": "sum(rate(process_cpu_seconds_total[$interval])) * 100", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "host", - "metric": "", - "refId": "C", - "step": 600 - }, - { - "expr": "sum(rate(container_cpu_system_seconds_total{name=~\".+\"}[1m])) + sum(rate(container_cpu_system_seconds_total{id=\"/\"}[1m])) + sum(rate(process_cpu_seconds_total[1m]))", - "hide": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "D", - "step": 120 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [1.25], - "type": "gt" - }, - "query": { - "params": ["A", "5m", "now"] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "frequency": "60s", - "handler": 1, - "name": "Panel Title alert", - "noDataState": "keep_state", - "notifications": [ - { - "id": 1 - } - ] - }, - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "decimals": 0, - "editable": true, - "error": false, - "fill": 1, - "id": 28, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 2, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "node_load1{instance=~\"$server:.*\"} / count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~\"$server:.*\"}))", - "intervalFactor": 2, - "refId": "A", - "step": 600 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 1.25 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Load", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": "1.50", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [850000000000], - "type": "gt" - }, - "query": { - "params": ["A", "5m", "now"] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "frequency": "60s", - "handler": 1, - "name": "Free/Used Disk Space alert", - "noDataState": "keep_state", - "notifications": [ - { - "id": 1 - } - ] - }, - "aliasColors": { - "Belegete Festplatte": "#BF1B00", - "Free Disk Space": "#7EB26D", - "Used Disk Space": "#7EB26D", - "{}": "#BF1B00" - }, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Used Disk Space", - "yaxis": 1 - } - ], - "span": 2, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "node_filesystem_size{fstype=\"aufs\"} - node_filesystem_free{fstype=\"aufs\"}", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Used Disk Space", - "refId": "A", - "step": 600 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 850000000000 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Used Disk Space", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": 1000000000000, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [10000000000], - "type": "gt" - }, - "query": { - "params": ["A", "5m", "now"] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "frequency": "60s", - "handler": 1, - "name": "Available Memory alert", - "noDataState": "keep_state", - "notifications": [ - { - "id": 1 - } - ] - }, - "aliasColors": { - "Available Memory": "#7EB26D", - "Unavailable Memory": "#7EB26D" - }, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 2, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "container_memory_rss{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "D", - "step": 20 - }, - { - "expr": "sum(container_memory_rss{name=~\".+\"})", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "A", - "step": 20 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 20 - }, - { - "expr": "container_memory_rss{id=\"/\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "C", - "step": 20 - }, - { - "expr": "sum(container_memory_rss)", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "E", - "step": 20 - }, - { - "expr": "node_memory_Buffers", - "hide": true, - "intervalFactor": 2, - "legendFormat": "node_memory_Dirty", - "refId": "N", - "step": 30 - }, - { - "expr": "node_memory_MemFree", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "F", - "step": 20 - }, - { - "expr": "node_memory_MemAvailable", - "hide": true, - "intervalFactor": 2, - "legendFormat": "Available Memory", - "refId": "H", - "step": 20 - }, - { - "expr": "node_memory_MemTotal - node_memory_MemAvailable", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Unavailable Memory", - "refId": "G", - "step": 600 - }, - { - "expr": "node_memory_Inactive", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "I", - "step": 30 - }, - { - "expr": "node_memory_KernelStack", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "J", - "step": 30 - }, - { - "expr": "node_memory_Active", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "K", - "step": 30 - }, - { - "expr": "node_memory_MemTotal - (node_memory_Active + node_memory_MemFree + node_memory_Inactive)", - "hide": true, - "intervalFactor": 2, - "legendFormat": "Unknown", - "refId": "L", - "step": 40 - }, - { - "expr": "node_memory_MemFree + node_memory_Inactive ", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "M", - "step": 30 - }, - { - "expr": "container_memory_rss{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{__name__}}", - "refId": "O", - "step": 30 - }, - { - "expr": "node_memory_Inactive + node_memory_MemFree + node_memory_MemAvailable", - "hide": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "P", - "step": 40 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10000000000 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Available Memory", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": 16000000000, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { - "IN on /sda": "#7EB26D", - "OUT on /sda": "#890F02" - }, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 2, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "-sum(rate(node_disk_bytes_read[$interval])) by (device)", - "hide": false, - "intervalFactor": 2, - "legendFormat": "OUT on /{{device}}", - "metric": "node_disk_bytes_read", - "refId": "A", - "step": 600 - }, - { - "expr": "sum(rate(node_disk_bytes_written[$interval])) by (device)", - "intervalFactor": 2, - "legendFormat": "IN on /{{device}}", - "metric": "", - "refId": "B", - "step": 600 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Disk I/O", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 202, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - }, - { - "title": "New row", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_receive_bytes_total{name=~\".+\"}[$interval])) by (name)", - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "A", - "step": 240 - }, - { - "expr": "- rate(container_network_transmit_bytes_total{name=~\".+\"}[$interval])", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Received Network Traffic per Container", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "id": 9, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_transmit_bytes_total{name=~\".+\"}[$interval])) by (name)", - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "A", - "step": 240 - }, - { - "expr": "rate(container_network_transmit_bytes_total{id=\"/\"}[$interval])", - "hide": true, - "intervalFactor": 2, - "legendFormat": "", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Sent Network Traffic per Container", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 10, - "max": 8, - "min": 0, - "show": false - } - ] - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 251, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - }, - { - "title": "Row", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 5, - "grid": {}, - "id": 1, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{name=~\".+\"}[$interval])) by (name) * 100", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{name}}", - "metric": "", - "refId": "F", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "CPU Usage per Container", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": "", - "logBase": 1, - "max": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 247, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - }, - { - "title": "Dashboard Row", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 3, - "grid": {}, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_memory_rss{name=~\".+\"}) by (name)", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "A", - "step": 240 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Memory Usage per Container", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "DS__PROMETHEUS", - "editable": true, - "error": false, - "fill": 3, - "grid": {}, - "id": 34, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_memory_swap{name=~\".+\"}) by (name)", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "A", - "step": 240 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Memory Swap per Container", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 250, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - }, - { - "title": "Dashboard Row", - "panels": [ - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "editable": true, - "error": false, - "fontSize": "100%", - "id": 37, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "span": 4, - "styles": [ - { - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": ["10000000", " 25000000"], - "type": "number", - "unit": "decbytes" - } - ], - "targets": [ - { - "expr": "sum(container_spec_memory_limit_bytes{name=~\".+\"} - container_memory_usage_bytes{name=~\".+\"}) by (name) ", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "metric": "", - "refId": "A", - "step": 240 - }, - { - "expr": "sum(container_spec_memory_limit_bytes{name=~\".+\"}) by (name) ", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 240 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "C", - "step": 240 - } - ], - "title": "Usage memory", - "transform": "timeseries_aggregations", - "type": "table" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "editable": true, - "error": false, - "fontSize": "100%", - "id": 35, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "span": 4, - "styles": [ - { - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": ["80", "90"], - "type": "number", - "unit": "percent" - } - ], - "targets": [ - { - "expr": "sum(100 - ((container_spec_memory_limit_bytes{name=~\".+\"} - container_memory_usage_bytes{name=~\".+\"}) * 100 / container_spec_memory_limit_bytes{name=~\".+\"}) ) by (name) ", - "intervalFactor": 2, - "legendFormat": "{{name}}", - "metric": "", - "refId": "A", - "step": 240 - }, - { - "expr": "sum(container_spec_memory_limit_bytes{name=~\".+\"}) by (name) ", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 240 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "C", - "step": 240 - } - ], - "title": "Remaining memory", - "transform": "timeseries_aggregations", - "type": "table" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "editable": true, - "error": false, - "fontSize": "100%", - "id": 36, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "span": 4, - "styles": [ - { - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": ["10000000", " 25000000"], - "type": "number", - "unit": "decbytes" - } - ], - "targets": [ - { - "expr": "sum(container_spec_memory_limit_bytes{name=~\".+\"} - container_memory_usage_bytes{name=~\".+\"}) by (name) ", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "metric": "", - "refId": "A", - "step": 240 - }, - { - "expr": "sum(container_spec_memory_limit_bytes{name=~\".+\"}) by (name) ", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "B", - "step": 240 - }, - { - "expr": "container_memory_usage_bytes{name=~\".+\"}", - "hide": true, - "intervalFactor": 2, - "legendFormat": "{{name}}", - "refId": "C", - "step": 240 - } - ], - "title": "Limit memory", - "transform": "timeseries_aggregations", - "type": "table" - } - ], - "showTitle": false, - "titleSize": "h6", - "height": 361, - "repeat": null, - "repeatRowId": null, - "repeatIteration": null, - "collapse": false - } - ] -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-metrics-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-metrics-dashboard.json deleted file mode 100644 index 2ab155b8..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-metrics-dashboard.json +++ /dev/null @@ -1,1130 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 5, - "links": [], - "panels": [ - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_last_published_block_timestamp{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Last Published Block Timestamp", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_last_published_block_height{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Last Published Block Height", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_error_rates{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\", error_type=~\"$error_type\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Error Rates ", - "type": "timeseries" - }, - { - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 8, - "title": "Row title", - "type": "row" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "avg(publisher_metrics_message_size_bytes_sum{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"}) / avg(publisher_metrics_message_size_bytes_count{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"})" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "min(publisher_metrics_message_size_bytes_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_message_size_bytes_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "avg(publisher_metrics_message_size_bytes_sum{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}) / avg(publisher_metrics_message_size_bytes_count{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Message Size Histogram (Min, Max, Avg)", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "avg(publisher_metrics_block_latency_seconds_sum{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"}) / avg(publisher_metrics_block_latency_seconds_count{chain_id=~\"0000000000000000\", block_producer=~\"0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92\", subject_wildcard=~\"blocks.>\"})" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "min(publisher_metrics_block_latency_seconds_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "max(publisher_metrics_block_latency_seconds_bucket{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "avg(publisher_metrics_block_latency_seconds_sum{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}) / avg(publisher_metrics_block_latency_seconds_count{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"})", - "hide": false, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Publishing Latency (Min, Max, Avg)", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_published_messages_throughput{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\", subject_wildcard=~\"$subject_wildcard\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": " Message Throughput", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 25 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_total_published_messages{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"}[5m]))", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Total Published Messages", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 33 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum(publisher_metrics_total_subscriptions{chain_id=~\"$chain_id\"})", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Total Subscriptions", - "type": "timeseries" - }, - { - "datasource": { - "default": false, - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 33 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "code", - "expr": "sum(rate(publisher_metrics_total_failed_messages{chain_id=~\"$chain_id\", block_producer=~\"$block_producer\"}[5m]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Total Failed Messages ", - "type": "timeseries" - }, - { - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 3, - "title": "Messages", - "type": "row" - } - ], - "schemaVersion": 39, - "tags": ["fuel-publisher"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": "0000000000000000", - "value": "0000000000000000" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_total_published_messages, chain_id)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "chain_id", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_total_published_messages, chain_id)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": true, - "text": "0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92", - "value": "0xe8df6d432b2584a3ea9d0badf297c3b525bae71b577d22c1ccc12519adb64d92" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_total_published_messages, block_producer)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "block_producer", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_total_published_messages, block_producer)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": true, - "text": "blocks.>", - "value": "blocks.>" - }, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "definition": "label_values(publisher_metrics_published_messages_throughput, subject_wildcard)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "subject_wildcard", - "options": [], - "query": { - "qryType": 3, - "query": "label_values(publisher_metrics_published_messages_throughput, subject_wildcard)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "browser", - "title": "Fuel Publisher Metrics", - "uid": "cdxezjtxf02kge", - "version": 22, - "weekStart": "" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-system-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-system-dashboard.json deleted file mode 100644 index fd0bf97b..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/fuel/fuel-publisher-system-dashboard.json +++ /dev/null @@ -1,413 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": true, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_load_average_1{job=\"fuel-streams-publisher\"}", - "instant": false, - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_load_average_5{job=\"fuel-streams-publisher\"}", - "hide": false, - "instant": false, - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_load_average_15{job=\"fuel-streams-publisher\"}", - "hide": false, - "instant": false, - "range": true, - "refId": "C" - } - ], - "title": "System Load Average", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": ["system_application_cpu_usage{job=\"fuel-streams-publisher\"}"], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_application_cpu_usage{job=\"fuel-streams-publisher\"}", - "instant": false, - "range": true, - "refId": "A" - } - ], - "title": "System Application CPU Usage", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": ["system_memory_size{job=\"fuel-streams-publisher\", type=\"system\"}"], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_memory_size{job=\"fuel-streams-publisher\", type=\"system\"}", - "instant": false, - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_memory_size{job=\"fuel-streams-publisher\", type=\"swap\"}", - "hide": false, - "instant": false, - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "editorMode": "builder", - "expr": "system_memory_size{job=\"fuel-streams-publisher\", type=\"application\"}", - "hide": false, - "instant": false, - "range": true, - "refId": "C" - } - ], - "title": "System Memory Size", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["fuel-publisher"], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Fuel Publisher System Resources", - "uid": "df035e21-5a18-4f19-95be-2879b7c9f071", - "version": 2, - "weekStart": "monday" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-jetstream-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-jetstream-dashboard.json deleted file mode 100644 index b111b731..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-jetstream-dashboard.json +++ /dev/null @@ -1,1268 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS__NATS-PROMETHEUS", - "label": " NATS-Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": [], - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.3.4" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": ["nats-exporter"], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "NATS JetStream Dashboard", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1642544826470, - "links": [], - "liveNow": false, - "panels": [ - { - "fieldConfig": { - "defaults": { - "decimals": 3, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 0.75 - }, - { - "color": "red", - "value": 0.9 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 28, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_stats_storage{server_id=~\"$server\"})/sum(gnatsd_varz_jetstream_config_max_storage{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "expr": "", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "title": "Storage Used", - "type": "gauge" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 0 - }, - "id": 15, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_stats_storage{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total Storage Used", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "decimals": 3, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 0.75 - }, - { - "color": "red", - "value": 0.9 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 9, - "y": 0 - }, - "id": 31, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_stats_memory{server_id=~\"$server\"})/sum(gnatsd_varz_jetstream_config_max_memory{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "expr": "", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "title": "Memory Used", - "type": "gauge" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 13, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_stats_memory{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Memory Used", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_connections{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Connections", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 3 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_config_max_storage{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Max Storage", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 13, - "y": 3 - }, - "id": 33, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(gnatsd_varz_jetstream_config_max_memory{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total Memory", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 3 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_server_total_consumers{server_id=~\"$server\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total Consumers", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 19, - "panels": [], - "title": "Stream metrics", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 7 - }, - "id": 17, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_stream_total_bytes) by (stream_name)", - "interval": "", - "legendFormat": "{{stream_name}}", - "refId": "A" - } - ], - "title": "Stream data size", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 7 - }, - "id": 24, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_stream_total_messages) by (stream_name)", - "interval": "", - "legendFormat": "{{stream_name}}", - "refId": "A" - } - ], - "title": "Stream message count", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "mps" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 7 - }, - "id": 20, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(rate(jetstream_stream_total_messages{server_id=~\"$server\",stream_name=~\"$stream\"}[$__rate_interval])) by (stream_name)", - "hide": false, - "interval": "", - "legendFormat": "{{stream_name}}", - "refId": "A" - } - ], - "title": "Message Rate (per second)", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 23, - "panels": [], - "title": "Consumer Metrics", - "type": "row" - }, - { - "description": "Messages added & processed per minute per consumer", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "mps" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 25, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "right" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(rate(jetstream_consumer_num_pending{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\"}[$__rate_interval])+rate(jetstream_consumer_delivered_consumer_seq{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\"}[$__rate_interval])) by (consumer_name)", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{consumer_name}} +", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "- sum(rate(jetstream_consumer_delivered_consumer_seq{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\",consumer_name=~\"$consumer\"}[$__rate_interval])) by (consumer_name)", - "hide": false, - "interval": "", - "legendFormat": "{{consumer_name}} -", - "refId": "A" - } - ], - "title": "Messages per second (++/--)", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 21, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_consumer_delivered_consumer_seq{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\"}) by (consumer_name)", - "hide": false, - "interval": "", - "legendFormat": "{{consumer_name}}", - "refId": "A" - } - ], - "title": "Total delivered messages", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 26, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_consumer_num_pending{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\"}) by (consumer_name)", - "hide": false, - "interval": "", - "legendFormat": "{{consumer_name}}", - "refId": "A" - } - ], - "title": "Pending messages", - "type": "timeseries" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 27, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "expr": "sum(jetstream_consumer_num_ack_pending{server_id=~\"$server\",stream_name=~\"$stream\",consumer_name=~\"$consumer\"}) by (consumer_name)", - "hide": false, - "interval": "", - "legendFormat": "{{consumer_name}}", - "refId": "A" - } - ], - "title": "Message Acks Pending", - "type": "timeseries" - } - ], - "refresh": "10s", - "schemaVersion": 34, - "style": "dark", - "tags": ["nats-exporter"], - "templating": { - "list": [ - { - "current": {}, - "definition": "label_values(jetstream_server_total_streams, server_id)", - "hide": 0, - "includeAll": true, - "label": "Server", - "multi": true, - "name": "server", - "options": [], - "query": { - "query": "label_values(jetstream_server_total_streams, server_id)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false, - "datasource": "DS__NATS-PROMETHEUS" - }, - { - "current": {}, - "definition": "label_values(jetstream_stream_last_seq, stream_name)", - "hide": 0, - "includeAll": true, - "label": "Stream", - "multi": true, - "name": "stream", - "options": [], - "query": { - "query": "label_values(jetstream_stream_last_seq, stream_name)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false, - "datasource": "DS__NATS-PROMETHEUS" - }, - { - "current": {}, - "definition": "label_values(jetstream_consumer_num_pending, consumer_name)", - "hide": 0, - "includeAll": true, - "label": "Consumer", - "multi": true, - "name": "consumer", - "options": [], - "query": { - "query": "label_values(jetstream_consumer_num_pending, consumer_name)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false, - "datasource": "DS__NATS-PROMETHEUS" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "browser", - "title": "Exporter - NATS JetStream", - "uid": "yQUo5l17k", - "version": 1, - "weekStart": "" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-nats-server-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-nats-server-dashboard.json deleted file mode 100644 index c3f1f7c6..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-exporter/exporter-nats-server-dashboard.json +++ /dev/null @@ -1,919 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS__NATS-PROMETHEUS", - "label": " NATS-Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.3.4" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": ["nats-exporter"], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "NATS Server Dashboard", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "title": "OS Metrics", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 1, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_cpu", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_cpu", - "refId": "A", - "step": 4 - } - ], - "title": "Server CPU", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 1 - }, - "id": 3, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_mem", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_mem", - "refId": "A", - "step": 4 - } - ], - "title": "Server Memory", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 11, - "panels": [], - "title": "Throughput", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 9 - }, - "id": 7, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_in_bytes", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_in_bytes", - "refId": "A", - "step": 10 - } - ], - "title": "Bytes In", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_in_msgs", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_in_msgs", - "refId": "A", - "step": 10 - } - ], - "title": "NATS Msgs In", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 9 - }, - "id": 5, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_out_bytes", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_out_bytes", - "refId": "A", - "step": 10 - } - ], - "title": "Bytes Out", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 9 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_out_msgs", - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_out_msgs", - "refId": "A", - "step": 10 - } - ], - "title": "NATS Msgs Out", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 12, - "panels": [], - "title": "Client Metrics", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "points", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 6, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 17 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_connections", - "intervalFactor": 1, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_connections", - "refId": "A", - "step": 2 - } - ], - "title": "Connections", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "points", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 6, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 17 - }, - "id": 4, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_subscriptions", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_subscriptions", - "refId": "A", - "step": 4 - } - ], - "title": "Subscriptions", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__NATS-PROMETHEUS" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "points", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 6, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 17 - }, - "id": 9, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "gnatsd_varz_slow_consumers", - "intervalFactor": 1, - "legendFormat": "{{server_id}}", - "metric": "gnatsd_varz_slow_consumers", - "refId": "A", - "step": 2 - } - ], - "title": "Slow Consumers", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 34, - "style": "dark", - "tags": ["nats-exporter"], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "browser", - "title": "Exporter - NATS Servers", - "uid": "Usc6F_1nk", - "version": 1, - "weekStart": "" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clients-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clients-dashboard.json deleted file mode 100644 index a515d05a..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clients-dashboard.json +++ /dev/null @@ -1,889 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 1, - "id": 2, - "iteration": 1607509798782, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["nats-surveyor"], - "title": "Surveyor", - "type": "dashboards" - } - ], - "panels": [ - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 17, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_connection_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Connections", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_subs_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Subscriptions", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 21, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(rate(nats_core_total_connection_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Connections / Second", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 5, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Point in time view of clients connected to each Server", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_connection_count{server_cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Current Connections", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "current connections", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Point in time view of clients connected to each Server", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 3, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": true, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_connection_count{server_cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Current Connections %", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "current connections", - "logBase": 1, - "max": "110", - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Connections received by the server in a second", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 16 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_total_connection_count{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Connections per second", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "connections / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Slow consumers detected by each server", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 15, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_slow_consumer_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Slow Consumers", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "slow / second", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Connections", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 9, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Number of subscriptions active on the server", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 10 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_subs_count{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Active Subscriptions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "subscriptions", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "The difference in subscription count per minute", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 10 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(delta(nats_core_subs_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Subscription Delta", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "subscriptions", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Subscriptions", - "type": "row" - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "27", - "value": "27" - }, - "datasource": "Prometheus", - "definition": "query_result(nats_survey_expected_count)", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "expected", - "options": [ - { - "selected": true, - "text": "27", - "value": "27" - } - ], - "query": "query_result(nats_survey_expected_count)", - "refresh": 0, - "regex": "/.* ([^\\ ]*) .*/", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Clients", - "uid": "MCcOJo0Mz", - "version": 21 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clusters-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clusters-dashboard.json deleted file mode 100644 index 0bd32f6f..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-clusters-dashboard.json +++ /dev/null @@ -1,1042 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 4, - "iteration": 1608137190616, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["nats-surveyor"], - "title": "Surveyor", - "type": "dashboards" - } - ], - "panels": [ - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "max(nats_core_gateway_count)", - "interval": "", - "legendFormat": "Clusters", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_info{server_cluster=~\"$cluster\"}) ", - "interval": "", - "legendFormat": "Connections", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 24, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_route_sent_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_route_recv_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cluster Bandwidth", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "hiddenSeries": false, - "id": 26, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_route_sent_msg_count{server_cluster=~\"$cluster\"}[1m]))", - "hide": false, - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_route_recv_msg_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cluster Messages", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "pps", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 8, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages sent for each route", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_route_sent_msg_count{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "messages / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages received for each route", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_route_recv_msg_count{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "messages / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Cluster Messages", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 6, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Bytes sent for each route", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_route_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "bytes / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Bytes received for each route", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_route_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "bytes / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Cluster Bandwidth", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 18, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Data in the pending buffers that needs to be sent to remotes", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 11 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_route_pending_bytes{server_cluster=~\"$cluster\"}", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Pending Data", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "The number of servers in each cluster", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 11 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_cluster)", - "interval": "", - "legendFormat": "{{server_cluster}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cluster Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "cluster size", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Cluster State", - "type": "row" - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": true, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Clusters", - "uid": "uooGQT0Gz", - "version": 15 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-jetstream-state-metrics-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-jetstream-state-metrics-dashboard.json deleted file mode 100644 index c73dbc70..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-jetstream-state-metrics-dashboard.json +++ /dev/null @@ -1,2051 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": null, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": ["nats-surveyor"], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": 11, - "links": [], - "liveNow": true, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 280, - "panels": [], - "title": "JetStream Overview", - "type": "row" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-blue", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 2, - "x": 0, - "y": 1 - }, - "hideTimeOverride": true, - "id": 177, - "interval": "$ScrapeInterval", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": null, - "editorMode": "code", - "expr": "count(group by(server_cluster) (nats_core_jetstream_info{server_jetstream=\"true\"}))", - "hide": false, - "legendFormat": "Cluster Count", - "range": true, - "refId": "D" - }, - { - "datasource": null, - "editorMode": "builder", - "expr": "nats_survey_expected_count", - "hide": false, - "legendFormat": "Expected Server Count", - "range": true, - "refId": "C" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "count(nats_core_jetstream_info{server_jetstream=\"true\"})", - "hide": false, - "interval": "", - "legendFormat": "JetStream Enabled Servers", - "range": true, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": true, - "expr": "count(nats_core_jetstream_enabled == 1)", - "hide": false, - "interval": "", - "legendFormat": "JetStream Active Servers", - "range": true, - "refId": "B" - } - ], - "timeFrom": "$QuickStatsInterval", - "title": "Topology", - "transparent": true, - "type": "stat" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "palette-classic" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 2, - "y": 1 - }, - "hideTimeOverride": true, - "id": 295, - "interval": "$ScrapeInterval", - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "sum(nats_core_jetstream_filestore_size_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Capacity", - "range": true, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": true, - "expr": "sum(nats_core_jetstream_filestore_used_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Used", - "range": true, - "refId": "B" - }, - { - "datasource": null, - "exemplar": true, - "expr": "sum(nats_core_jetstream_filestore_reserved_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "C" - } - ], - "timeFrom": "$QuickStatsInterval", - "title": "Filestore", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": null, - "description": "Highly Available Asset Distribution for replicated streams, objects, KV stores, and replicated consumers. Not applicable to single server mode.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "min": 0 - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 5, - "x": 7, - "y": 1 - }, - "id": 293, - "options": { - "displayLabels": ["percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": true, - "values": [] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_jetstream_ha_assets", - "format": "time_series", - "instant": true, - "interval": "1", - "legendFormat": "{{server_name}}", - "range": false, - "refId": "A" - } - ], - "title": "HA Asset Distribution by Server", - "transformations": [], - "type": "piechart" - }, - { - "datasource": null, - "description": "Highly Available Asset Count including replicated streams, objects, KV stores, and replicated consumers. Not applicable to single server mode.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisGridShow": true, - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 50, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepBefore", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 282, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "mean"], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "sum by(server_name) (nats_core_jetstream_ha_assets)", - "format": "time_series", - "instant": false, - "interval": "1", - "legendFormat": "{{server_id}}", - "range": true, - "refId": "A" - } - ], - "title": "HA Asset Count by Server", - "transformations": [], - "type": "timeseries" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Errors" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 2, - "x": 18, - "y": 1 - }, - "id": 305, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_jetstream_api_requests", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_jetstream_api_errors", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "B" - } - ], - "title": "API Statistics", - "transformations": [ - { - "id": "concatenate", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "Value #A": "Requests", - "Value #B": "Errors", - "cluster_name 2": "", - "server_name 2": "" - } - } - } - ], - "type": "stat" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "palette-classic" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 2, - "y": 6 - }, - "hideTimeOverride": true, - "id": 268, - "interval": "$ScrapeInterval", - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "sum(nats_core_jetstream_memstore_size_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Capacity", - "range": true, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": true, - "expr": "sum(nats_core_jetstream_memstore_used_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Used", - "range": true, - "refId": "B" - }, - { - "datasource": null, - "exemplar": true, - "expr": "sum(nats_core_jetstream_memstore_reserved_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "C" - } - ], - "timeFrom": "$QuickStatsInterval", - "title": "Memstore", - "transparent": true, - "type": "bargauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 302, - "panels": [], - "title": "JetStream Cluster State (Only Applicable to Clustered Mode)", - "type": "row" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 12 - }, - "hideTimeOverride": true, - "id": 298, - "interval": "$ScrapeInterval", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "name" - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_leader > 0", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "{{server_name}}", - "range": false, - "refId": "A" - } - ], - "timeFrom": "$QuickStatsInterval", - "title": "Current Meta Leader", - "transparent": true, - "type": "stat" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-BlPu" - }, - "custom": { - "fillOpacity": 70, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 6, - "x": 3, - "y": 12 - }, - "hideTimeOverride": true, - "id": 303, - "interval": "$ScrapeInterval", - "links": [], - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "never", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_leader", - "format": "time_series", - "hide": false, - "interval": "", - "legendFormat": "{{server_name}}", - "range": true, - "refId": "A" - } - ], - "timeFrom": "$QuickStatsInterval", - "title": "Meta-Leader", - "transparent": true, - "type": "state-timeline" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value #A" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "green", - "index": 0, - "text": "Yes" - }, - "1": { - "color": "red", - "index": 1, - "text": "No" - } - }, - "type": "value" - } - ] - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 0 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-background-solid" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #B" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "red", - "index": 0, - "text": "No" - }, - "1": { - "color": "green", - "index": 1, - "text": "Yes" - } - }, - "type": "value" - } - ] - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-background-solid" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #C" - }, - "properties": [ - { - "id": "unit", - "value": "ns" - }, - { - "id": "custom.displayMode", - "value": "color-background-solid" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 1000000000 - }, - { - "color": "red", - "value": 10000000000 - } - ] - } - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 11, - "x": 9, - "y": 12 - }, - "id": 300, - "maxPerRow": 3, - "options": { - "footer": { - "fields": "", - "reducer": ["min"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "Peer" - } - ] - }, - "pluginVersion": "9.1.3", - "repeatDirection": "h", - "targets": [ - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_replica_peer_offline", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "{{label_name}}", - "range": false, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_replica_peer_current", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "B" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_replica_peer_active", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "C" - } - ], - "title": "Peer Status", - "transformations": [ - { - "id": "concatenate", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "__name__ 1": true, - "__name__ 2": true, - "__name__ 3": true, - "cluster_name 1": true, - "cluster_name 2": true, - "cluster_name 3": true, - "instance 1": true, - "instance 2": true, - "instance 3": true, - "job 1": true, - "job 2": true, - "job 3": true, - "peer 2": true, - "peer 3": true, - "server_id 1": true, - "server_id 2": true, - "server_id 3": true, - "server_name 1": true, - "server_name 2": true, - "server_name 3": true - }, - "indexByName": {}, - "renameByName": { - "Value #A": "Online", - "Value #B": "Current", - "Value #C": "Last Seen", - "peer 1": "Peer", - "server_name 1": "" - } - } - } - ], - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 316, - "panels": [], - "title": "JetStream Account Details (Requires Surveyor Accounts Enabled)", - "type": "row" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Storage Used" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Storage Reserved" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Memory Used" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "auto" - }, - { - "id": "unit", - "value": "decbytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Storage % Used" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 0.8 - }, - { - "color": "red", - "value": 0.9 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Memory % Used" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 0.8 - }, - { - "color": "red", - "value": 0.9 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Memory Reserved" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 13, - "x": 0, - "y": 23 - }, - "id": 314, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "HA Streams (R>1)" - } - ] - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_stream_count", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "I" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_storage_used", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "J" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_storage_reserved", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "A" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_memory_used", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "B" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_memory_reserved", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "C" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_account_jetstream_enabled", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "D" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_account_jetstream_storage_used / nats_core_account_jetstream_storage_reserved", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "E" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_account_jetstream_memory_used / nats_core_account_jetstream_memory_reserved", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "{{account}}", - "range": false, - "refId": "F" - } - ], - "title": "Storage By Account", - "transformations": [ - { - "id": "concatenate", - "options": {} - }, - { - "id": "filterByValue", - "options": { - "filters": [ - { - "config": { - "id": "greater", - "options": { - "value": 0 - } - }, - "fieldName": "Value #D" - } - ], - "match": "any", - "type": "include" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value #D": true, - "__name__ 1": true, - "__name__ 2": true, - "__name__ 3": true, - "__name__ 4": true, - "__name__ 5": true, - "__name__ 6": true, - "account 2": true, - "account 3": true, - "account 4": true, - "account 5": true, - "account 6": true, - "account 7": true, - "account 8": true, - "instance 1": true, - "instance 2": true, - "instance 3": true, - "instance 4": true, - "instance 5": true, - "instance 6": true, - "instance 7": true, - "instance 8": true, - "job 1": true, - "job 2": true, - "job 3": true, - "job 4": true, - "job 5": true, - "job 6": true, - "job 7": true, - "job 8": true - }, - "indexByName": { - "Time": 0, - "Value #A": 15, - "Value #B": 21, - "Value #C": 26, - "Value #D": 31, - "Value #E": 9, - "Value #F": 20, - "Value #I": 38, - "Value #J": 10, - "__name__ 1": 1, - "__name__ 2": 5, - "__name__ 3": 11, - "__name__ 4": 16, - "__name__ 5": 22, - "__name__ 6": 27, - "account 1": 2, - "account 2": 6, - "account 3": 12, - "account 4": 17, - "account 5": 23, - "account 6": 28, - "account 7": 32, - "account 8": 35, - "instance 1": 3, - "instance 2": 7, - "instance 3": 13, - "instance 4": 18, - "instance 5": 24, - "instance 6": 29, - "instance 7": 33, - "instance 8": 36, - "job 1": 4, - "job 2": 8, - "job 3": 14, - "job 4": 19, - "job 5": 25, - "job 6": 30, - "job 7": 34, - "job 8": 37 - }, - "renameByName": { - "Value #A": "Storage Reserved", - "Value #B": "Memory Used", - "Value #C": "Memory Reserved", - "Value #E": "Storage % Used", - "Value #F": "Memory % Used", - "Value #I": "HA Streams (R>1)", - "Value #J": "Storage Used", - "account 1": "Account", - "account 5": "", - "job 8": "" - } - } - } - ], - "type": "table" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 13, - "y": 23 - }, - "id": 320, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_storage_used", - "format": "time_series", - "instant": true, - "interval": "1", - "legendFormat": "{{account}}", - "range": false, - "refId": "A" - } - ], - "title": "File Storage By Account", - "transformations": [ - { - "id": "concatenate", - "options": {} - } - ], - "type": "bargauge" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "decimals": 0, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 18, - "y": 23 - }, - "id": 321, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_memory_used", - "format": "time_series", - "instant": true, - "interval": "1", - "legendFormat": "{{account}}", - "range": false, - "refId": "A" - } - ], - "title": "Memory Storage By Account", - "transformations": [], - "type": "bargauge" - }, - { - "datasource": null, - "description": "Number of Highly Available Assets by Stream. A high number of HA Assets will place pressure on the system.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 13, - "x": 0, - "y": 31 - }, - "id": 319, - "interval": "1s", - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 0, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Total HA Assets" - } - ] - }, - "pluginVersion": "9.1.3", - "targets": [ - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_consumer_count", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - }, - { - "datasource": null, - "hide": false, - "refId": "B" - }, - { - "datasource": null, - "editorMode": "builder", - "exemplar": false, - "expr": "nats_core_account_jetstream_replica_count", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "C" - }, - { - "datasource": null, - "editorMode": "code", - "exemplar": false, - "expr": "nats_core_account_jetstream_replica_count + (nats_core_account_jetstream_replica_count * nats_core_account_jetstream_consumer_count)", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "D" - } - ], - "title": "HA Assets By Stream", - "transformations": [ - { - "id": "concatenate", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value #A": false, - "__name__": true, - "__name__ 1": true, - "__name__ 2": true, - "account": false, - "account 2": true, - "account 3": true, - "instance": true, - "instance 1": true, - "instance 2": true, - "instance 3": true, - "job": true, - "job 1": true, - "job 2": true, - "job 3": true, - "stream 2": true, - "stream 3": true - }, - "indexByName": { - "Time": 0, - "Value #A": 8, - "Value #C": 7, - "Value #D": 6, - "__name__ 1": 1, - "__name__ 2": 9, - "account 1": 2, - "account 2": 10, - "account 3": 14, - "instance 1": 3, - "instance 2": 11, - "instance 3": 15, - "job 1": 4, - "job 2": 12, - "job 3": 16, - "stream 1": 5, - "stream 2": 13, - "stream 3": 17 - }, - "renameByName": { - "Value": "Consumer Count", - "Value #A": "Stream Consumer Count", - "Value #B": "Replica Count", - "Value #C": "Stream Replica Count", - "Value #D": "Total HA Assets", - "account": "Account", - "account 1": "Account", - "stream": "Stream ", - "stream 1": "HA Stream (R>1)", - "stream 2": "" - } - } - } - ], - "type": "table" - } - ], - "refresh": "5s", - "schemaVersion": 37, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "5m", - "value": "5m" - }, - "description": "Duration of top row metrics", - "hide": 0, - "label": "Summary Duration", - "name": "QuickStatsInterval", - "options": [ - { - "selected": true, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "30s", - "value": "30s" - }, - { - "selected": false, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "15m", - "value": "15m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "2h", - "value": "2h" - }, - { - "selected": false, - "text": "4h", - "value": "4h" - }, - { - "selected": false, - "text": "8h", - "value": "8h" - }, - { - "selected": false, - "text": "12h", - "value": "12h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" - } - ], - "query": "5m,30s,1m,15m,30m,1h,2h,4h,8h,12h,1d", - "queryValue": "", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - }, - { - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "description": "Add/Remove Summary Metrics from the Top Row", - "hide": 0, - "includeAll": true, - "label": "SummaryMetrics", - "multi": true, - "name": "QuickStatsMap", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "Received Messages", - "value": "sum(irate(nats_core_recv_msgs_count{}[$__rate_interval]))" - }, - { - "selected": false, - "text": "Sent Messages", - "value": "sum(irate(nats_core_sent_msgs_count{}[$__rate_interval]))" - }, - { - "selected": false, - "text": "Received Bytes", - "value": "sum(irate(nats_core_recv_bytes{}[$__rate_interval]))" - }, - { - "selected": false, - "text": "Sent Bytes", - "value": "sum(irate(nats_core_sent_bytes{}[$__rate_interval]))" - }, - { - "selected": false, - "text": "Connections", - "value": "sum(nats_core_connection_count{})" - }, - { - "selected": false, - "text": "Slow Consumers", - "value": "sum(irate(nats_core_slow_consumer_count{}[$__rate_interval]))" - }, - { - "selected": false, - "text": "Clusters", - "value": "count(sum(nats_core_info{}) by (server_cluster))" - }, - { - "selected": false, - "text": "Servers", - "value": "count(nats_core_info{})" - }, - { - "selected": false, - "text": "Route Count", - "value": "sum(nats_core_route_count{})" - }, - { - "selected": false, - "text": "Gateway Count", - "value": "sum(nats_core_gateway_count{})" - } - ], - "query": "Received Messages : sum(irate(nats_core_recv_msgs_count{}[$__rate_interval])), Sent Messages : sum(irate(nats_core_sent_msgs_count{}[$__rate_interval])), Received Bytes : sum(irate(nats_core_recv_bytes{}[$__rate_interval])), Sent Bytes : sum(irate(nats_core_sent_bytes{}[$__rate_interval])), Connections : sum(nats_core_connection_count{}), Slow Consumers : sum(irate(nats_core_slow_consumer_count{}[$__rate_interval])), Clusters : count(sum(nats_core_info{}) by (server_cluster)), Servers : count(nats_core_info{}), Route Count : sum(nats_core_route_count{}), Gateway Count : sum(nats_core_gateway_count{})", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "surveyor", - "value": "surveyor" - }, - "datasource": null, - "definition": "label_values(nats_core_info, job)", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "surveyor_job", - "options": [], - "query": { - "query": "label_values(nats_core_info, job)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "localhost:7777", - "value": "localhost:7777" - }, - "datasource": null, - "definition": "label_values(nats_core_info{job=~\"$surveyor_job\"}, instance)", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "surveyor_instance", - "options": [], - "query": { - "query": "label_values(nats_core_info{job=~\"$surveyor_job\"}, instance)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "allValue": ".*", - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": null, - "definition": "label_values(nats_core_info{job=~\"$surveyor_job\", instance=~\"$surveyor_instance\"}, server_cluster)", - "description": "Pick a Cluster. NOTE: top row \"Summary Metrics\" ignore the cluster selection currently.", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": { - "query": "label_values(nats_core_info{job=~\"$surveyor_job\", instance=~\"$surveyor_instance\"}, server_cluster)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "5s", - "value": "5s" - }, - "hide": 2, - "name": "ScrapeInterval", - "options": [ - { - "selected": true, - "text": "5s", - "value": "5s" - } - ], - "query": "5s", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - }, - { - "datasource": null, - "filters": [], - "hide": 0, - "name": "Filters", - "skipUrlSync": false, - "type": "adhoc" - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - JetStream State and Metrics", - "uid": "fLxkFSIVk", - "version": 11, - "weekStart": "" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-nats-surveyor-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-nats-surveyor-dashboard.json deleted file mode 100644 index 90de9850..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-nats-surveyor-dashboard.json +++ /dev/null @@ -1,4375 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.3.4" - }, - { - "type": "panel", - "id": "heatmap", - "name": "Heatmap", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": ["nats-surveyor"], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1644365183491, - "links": [], - "liveNow": false, - "panels": [ - { - "description": "Combined messages received by all servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 0 - }, - "id": 79, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Received", - "refId": "A" - } - ], - "title": "Received Messages", - "type": "stat" - }, - { - "description": "Combined messages sent by all servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 0 - }, - "id": 80, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Sent", - "refId": "A" - } - ], - "title": "Sent Messages", - "type": "stat" - }, - { - "description": "Combined bytes received by all servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 0 - }, - "id": 53, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Received", - "refId": "A" - } - ], - "title": "Received Bytes", - "type": "stat" - }, - { - "description": "Combined bytes sent by all servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 9, - "y": 0 - }, - "id": 52, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Sent", - "refId": "A" - } - ], - "title": "Sent Bytes", - "type": "stat" - }, - { - "description": "Total current connections across all servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 12, - "y": 0 - }, - "id": 45, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_connection_count{server_cluster=~\"$cluster\"})", - "refId": "A" - } - ], - "title": "Connections", - "type": "stat" - }, - { - "description": "Slow consumers seen per second", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 14, - "y": 0 - }, - "id": 56, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_slow_consumer_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Slow", - "refId": "A" - } - ], - "title": "Slow Consumers", - "type": "stat" - }, - { - "description": "Number of known clusters", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 16, - "y": 0 - }, - "id": 55, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "count(sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_cluster))", - "legendFormat": "Servers", - "refId": "A" - } - ], - "title": "Clusters", - "type": "stat" - }, - { - "description": "Number of known servers", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 18, - "y": 0 - }, - "id": 78, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "count(nats_core_info{server_cluster=~\"$cluster\"})", - "legendFormat": "Servers", - "refId": "A" - } - ], - "title": "Servers", - "type": "stat" - }, - { - "description": "Number of routes reported as active", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 20, - "y": 0 - }, - "id": 49, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_route_count{server_cluster=~\"$cluster\"})", - "refId": "A" - } - ], - "title": "Route Connections", - "type": "stat" - }, - { - "description": "Number of routes reported as active", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "0" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 22, - "y": 0 - }, - "id": 50, - "interval": "", - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_gateway_count{server_cluster=~\"$cluster\"})", - "legendFormat": "Gateways", - "refId": "A" - } - ], - "title": "Gateway Connections", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 248, - "panels": [], - "title": "JetStream Status", - "type": "row" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 5 - }, - "hideTimeOverride": true, - "id": 258, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "sum(nats_core_jetstream_filestore_size_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Capacity", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": true, - "expr": "sum(nats_core_jetstream_filestore_used_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Consumed", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": true, - "expr": "sum(nats_core_jetstream_filestore_reserved_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "C" - } - ], - "title": "JS Filestore", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 5, - "y": 5 - }, - "hideTimeOverride": true, - "id": 268, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "sum(nats_core_jetstream_memstore_size_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Capacity", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": true, - "expr": "sum(nats_core_jetstream_memstore_used_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Consumed", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": true, - "expr": "sum(nats_core_jetstream_memstore_reserved_bytes{})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "C" - } - ], - "title": "JS Memstore", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 10, - "y": 5 - }, - "hideTimeOverride": true, - "id": 207, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "name" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "group by(server_domain) (nats_core_jetstream_info{server_jetstream=\"true\"})", - "hide": false, - "interval": "", - "legendFormat": "{{server_domain}}", - "refId": "A" - } - ], - "title": "JS Domains", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 12, - "y": 5 - }, - "hideTimeOverride": true, - "id": 217, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "name" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "(nats_core_jetstream_cluster_raft_group_leader * on(server_id) group_left(server_cluster,server_name, server_domain) nats_core_jetstream_info) > 0", - "hide": false, - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "JS Meta-Leader", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 14, - "y": 5 - }, - "hideTimeOverride": true, - "id": 197, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "count(group by(server_cluster) (nats_core_jetstream_info{server_jetstream=\"true\"}))", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "JS Clusters", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 16, - "y": 5 - }, - "hideTimeOverride": true, - "id": 177, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "count(nats_core_jetstream_info{server_jetstream=\"true\"})", - "hide": false, - "interval": "", - "legendFormat": "Enabled", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": true, - "expr": "count(nats_core_jetstream_enabled == 1)", - "hide": false, - "interval": "", - "legendFormat": "Running", - "refId": "B" - } - ], - "title": "JS Servers", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 18, - "y": 5 - }, - "hideTimeOverride": true, - "id": 278, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "sum(nats_core_jetstream_ha_assets{})", - "hide": false, - "interval": "", - "legendFormat": "Enabled", - "refId": "A" - } - ], - "title": "JS HA Assets", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 20, - "y": 5 - }, - "hideTimeOverride": true, - "id": 237, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "nats_core_jetstream_cluster_raft_group_replicas * on(server_id) group_left(server_domain, server_cluster,server_name) nats_core_jetstream_info > 0", - "hide": false, - "interval": "", - "legendFormat": "{{server_domain}}:{{server_name}}", - "refId": "A" - } - ], - "title": "Meta's Replicas", - "transparent": true, - "type": "stat" - }, - { - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.+_bytes.+/" - }, - "properties": [ - { - "id": "unit", - "value": "Bps" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 2, - "x": 22, - "y": 5 - }, - "hideTimeOverride": true, - "id": 227, - "interval": "", - "links": [], - "maxPerRow": 12, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "exemplar": false, - "expr": "sum by (server_domain, leader) (nats_core_jetstream_cluster_raft_group_info{raft_group=\"_meta_\"})", - "hide": false, - "interval": "", - "legendFormat": "{{leader}}", - "refId": "A" - } - ], - "title": "Meta's Votes", - "transparent": true, - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 43, - "panels": [], - "title": "Cluster Overview", - "type": "row" - }, - { - "description": "Combined current connections", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Connections", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Subscriptions" - }, - "properties": [ - { - "id": "custom.axisLabel", - "value": "Subscriptions" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 33, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_connection_count{server_cluster=~\"$cluster\"})", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "Connections", - "refId": "A" - }, - { - "expr": "sum(nats_core_subs_count{server_cluster=~\"$cluster\"})", - "instant": false, - "interval": "", - "legendFormat": "Subscriptions", - "refId": "B" - } - ], - "title": "Cluster Connections", - "type": "timeseries" - }, - { - "description": "Combined slow consumers detected per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 37, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_slow_consumer_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Slow Consumers", - "refId": "A" - } - ], - "title": "Cluster Slow Consumers", - "type": "timeseries" - }, - { - "description": "Combined total messages for all servers", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "messages / second", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 14 - }, - "id": 31, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Received", - "refId": "B" - } - ], - "title": "Cluster Message Traffic", - "type": "timeseries" - }, - { - "description": "Combined cluster network usage", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 14 - }, - "id": 29, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m]))", - "legendFormat": "Received", - "refId": "B" - } - ], - "title": "Cluster Network Usage", - "type": "timeseries" - }, - { - "description": "Distribution of NATS Server Versions across the cluster", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 20 - }, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_version)", - "legendFormat": "{{server_version}}", - "refId": "A" - } - ], - "title": "Server Versions", - "type": "timeseries" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateYlOrRd", - "exponent": 0.5, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "description": "RTT times for the cluster as observed from the Surveyor", - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 20 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 92, - "interval": "", - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "expr": "nats_core_rtt_nanoseconds", - "format": "time_series", - "instant": false, - "legendFormat": "RTT", - "refId": "A" - } - ], - "title": "Cluster RTT", - "tooltip": { - "show": true, - "showHistogram": true - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "ns", - "logBase": 1, - "show": true - }, - "yBucketBound": "auto" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 - }, - "id": 18, - "panels": [ - { - "description": "Point in time view of clients connected to each Server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "current connections", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 6 - }, - "id": 14, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_core_connection_count{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Current Connections", - "type": "timeseries" - }, - { - "description": "Number of subscriptions active on the server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "subscriptions", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 6 - }, - "id": 20, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_core_subs_count{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Active Subscriptions", - "type": "timeseries" - }, - { - "description": "Connections received by the server in a second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "connections / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 13 - }, - "id": 16, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_total_connection_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Connections per second", - "type": "timeseries" - }, - { - "description": "The difference in subscription count per minute", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "subscriptions", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 13 - }, - "id": 22, - "options": { - "legend": { - "calcs": ["lastNotNull"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "delta(nats_core_subs_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Subscription Delta", - "type": "timeseries" - }, - { - "description": "Slow consumers detected by each server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "slow / second", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 20 - }, - "id": 41, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_slow_consumer_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Slow Consumers", - "type": "timeseries" - } - ], - "title": "Client Connection Detail", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 71, - "panels": [ - { - "description": "Bytes sent for each gateway", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "bytes / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 - }, - "id": 72, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_gateway_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "title": "Gateway Bytes Sent", - "type": "timeseries" - }, - { - "description": "Bytes received for each gateway", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "bytes / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 - }, - "id": 73, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_gateway_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "title": "Gateway Bytes Received", - "type": "timeseries" - }, - { - "description": "Messages sent for each gateway", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "messages / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 14 - }, - "id": 74, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_gateway_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "title": "Gateway Messages Sent", - "type": "timeseries" - }, - { - "description": "Messages received for each gateway", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "messages / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 14 - }, - "id": 75, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_gateway_recv_msg_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "title": "Gateway Messages Received", - "type": "timeseries" - } - ], - "title": "Gateway Details", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 60, - "panels": [ - { - "description": "Bytes sent for each route", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "bytes / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 62, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_route_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "title": "Route Bytes Sent", - "type": "timeseries" - }, - { - "description": "Bytes received for each route", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "bytes / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 63, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_route_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "title": "Route Bytes Received", - "type": "timeseries" - }, - { - "description": "Messages sent for each route", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "messages / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 15 - }, - "id": 64, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_route_sent_msg_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "title": "Route Messages Sent", - "type": "timeseries" - }, - { - "description": "Messages received for each route", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "messages / sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 15 - }, - "id": 65, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_route_recv_msg_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "title": "Route Messages Received", - "type": "timeseries" - }, - { - "description": "The number of servers in each cluster", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "cluster size", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 22 - }, - "id": 10, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_cluster)", - "legendFormat": "{{server_cluster}}", - "refId": "A" - } - ], - "title": "Cluster Size", - "type": "timeseries" - }, - { - "description": "Data in the pending buffers that needs to be sent to remotes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 22 - }, - "id": 67, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_core_route_pending_bytes{server_cluster=~\"$cluster\"}", - "legendFormat": "Server {{server_name}} - Route {{server_route_name}}", - "refId": "A" - } - ], - "title": "Route Pending Data", - "type": "timeseries" - } - ], - "title": "Route Details", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 24, - "panels": [ - { - "description": "Data sent per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 9 - }, - "id": 26, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Bytes Sent", - "type": "timeseries" - }, - { - "description": "Data received per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 9 - }, - "id": 27, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Bytes Received", - "type": "timeseries" - }, - { - "description": "Messages sent per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 68, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Messages Sent", - "type": "timeseries" - }, - { - "description": "Messages received per second", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 69, - "interval": "", - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Messages Received", - "type": "timeseries" - } - ], - "title": "Network Usage Detail", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 77, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "description": "CPU used by the NATS Server process", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "cpu %", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 10 - }, - "id": 4, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_core_cpu_percentage{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "B" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "description": "The number of bytes in use by the NATS server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Bytes", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 10 - }, - "id": 2, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_core_mem_bytes{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Memory", - "type": "timeseries" - } - ], - "title": "Node Resource Usage", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 84, - "panels": [ - { - "description": "The number of NATS Servers expected to reply vs how many replied during a poll", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Expected", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 82, - "links": [], - "options": { - "legend": { - "calcs": ["lastNotNull", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "nats_survey_expected_count", - "legendFormat": "Expected", - "refId": "A" - }, - { - "expr": "nats_survey_surveyed_count", - "legendFormat": "Responded", - "refId": "B" - } - ], - "title": "Expected vs Received", - "type": "timeseries" - }, - { - "description": "Cluster wide RTT as calculated from the Surveyor", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "RTT", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ns" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 39, - "options": { - "legend": { - "calcs": ["lastNotNull", "max", "min"], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "rate(nats_core_rtt_nanoseconds[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "title": "Cluster RTT", - "type": "timeseries" - }, - { - "description": "Number of times the surveyor reconnected to the network in a minute", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 23 - }, - "id": 90, - "interval": "", - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": "increase(nats_survey_nats_reconnects[5m])", - "legendFormat": "Reconnections", - "refId": "A" - } - ], - "title": "NATS Reconnects", - "type": "timeseries" - }, - { - "description": "Time it takes the surveyor to gather the statistics from surveyed NATS Servers", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "time per poll", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 23 - }, - "id": 86, - "options": { - "legend": { - "calcs": ["mean", "lastNotNull", "max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "expr": " rate(nats_survey_duration_seconds_sum[5m])\n/\n rate(nats_survey_duration_seconds_count[5m])", - "legendFormat": "Poll Time", - "refId": "A" - } - ], - "title": "Poll Time", - "type": "timeseries" - } - ], - "title": "Surveyor", - "type": "row" - } - ], - "refresh": "5s", - "schemaVersion": 34, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "hide": 0, - "label": "datasource", - "name": "DS_PROMETHEUS", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": ".*", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": { - "query": "label_values(nats_core_info, server_cluster)", - "refId": "Prometheus-cluster-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "DS__PROMETHEUS" - }, - "definition": "query_result(nats_survey_expected_count)", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "expected", - "options": [], - "query": { - "query": "query_result(nats_survey_expected_count)", - "refId": "Prometheus-expected-Variable-Query" - }, - "refresh": 1, - "regex": "/.* ([^\\ ]*) .*/", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - NATS Surveyor", - "uid": "GGxJ_5oZy", - "version": 1, - "weekStart": "" -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-natsoverview-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-natsoverview-dashboard.json deleted file mode 100644 index 10242d2a..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-natsoverview-dashboard.json +++ /dev/null @@ -1,725 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 7, - "iteration": 1608137093702, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["nats-surveyor"], - "title": "Surveyor", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 14, - "panels": [], - "title": "Client Overview", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Total current connections across all servers", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 2, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_connection_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Connections", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(rate(nats_core_total_connection_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Connections / sec", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "(sum(rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])) + sum(rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m])))", - "interval": "", - "legendFormat": "Messages/sec", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Total current connections across all servers", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 17, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_subs_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Subscriptions", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 12, - "panels": [], - "title": "Cluster Overview", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Number of known servers", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 8 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "count(nats_core_info{server_cluster=~\"$cluster\"})", - "legendFormat": "Servers", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Number of known clusters", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "count(sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_cluster))", - "interval": "", - "legendFormat": "Clusters", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Number of routes reported as active", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 8 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_route_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Route Connections", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": null, - "description": "Number of routes reported as active", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "0", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 10, - "interval": "", - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_gateway_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Gateway Conns", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": null, - "description": "Distribution of NATS Server Versions across the cluster", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/.+/", - "color": "#5794F2" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(nats_core_info{server_cluster=~\"$cluster\"}) by (server_version)", - "legendFormat": "{{server_version}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Server Versions", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": true, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - NATS Overview", - "uid": "JY0sCo0Gz", - "version": 14 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-network-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-network-dashboard.json deleted file mode 100644 index 70060edb..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-network-dashboard.json +++ /dev/null @@ -1,942 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 5, - "iteration": 1607509848035, - "links": [ - { - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["nats-surveyor"], - "type": "dashboards" - } - ], - "panels": [ - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "(sum(rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m])) + sum(rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m])))", - "interval": "", - "legendFormat": "Bits/sec", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "(sum(rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])) + sum(rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m])))", - "interval": "", - "legendFormat": "Messages/sec", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 6, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bandwidth", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "hide": false, - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "pps", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Data sent per second", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "hiddenSeries": false, - "id": 2, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Data received per second", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 - }, - "hiddenSeries": false, - "id": 4, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Bandwidth", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 8, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages sent per second", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 10, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages received per second", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 12, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_recv_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Messages", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 23, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Cluster wide RTT as calculated from the Surveyor", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 21, - "legend": { - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_rtt_nanoseconds[1m])", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cluster RTT", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ns", - "label": "RTT", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Network Conditions", - "type": "row" - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Network Usage", - "uid": "QDqTlo0Gk", - "version": 13 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-noderesource-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-noderesource-dashboard.json deleted file mode 100644 index f11b7060..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-noderesource-dashboard.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 6, - "iteration": 1607509860880, - "links": [ - { - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["nats-surveyor"], - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "title": "CPU", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "CPU used by the NATS Server process", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 1 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_cpu_percentage{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "cpu %", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "cpu usage", - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 6, - "panels": [], - "title": "Memory", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "The number of bytes in use by the NATS server", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 10 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "nats_core_mem_bytes{server_cluster=~\"$cluster\"}", - "legendFormat": "{{server_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": "Bytes", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": ["nats-surveyor"], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Node Resource Usage", - "uid": "nszzro0Mk", - "version": 11 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-observations-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-observations-dashboard.json deleted file mode 100644 index fd2b0684..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-observations-dashboard.json +++ /dev/null @@ -1,842 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "6.4.4" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 1, - "id": null, - "iteration": 1596189643900, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Percentile of service time spent in the service ", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.10, sum(rate(nats_latency_service_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 10th %", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(nats_latency_service_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 50th %", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(nats_latency_service_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 95th %", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Service Duration Percentiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "duration", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Percentile of total time spent in the service and in the total which includes network overhead ", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 15, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.10, sum(rate(nats_latency_total_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 10th %", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(nats_latency_total_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 50th %", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(nats_latency_total_duration_bucket{service=~\"${service}\"}[$range])) by (le,service))", - "legendFormat": "{{service}} 95th %", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Total Duration Percentiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "duration", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Average times taken to serve a request.\n\n* **service time** is the time taken to execute the service\n* **total time** includes network latencies between all parties", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_latency_service_duration_sum{service=~\"${service}\"}[$range]) / rate(nats_latency_service_duration_count{service=~\"${service}\"}[$range])) by (service)", - "legendFormat": "{{service}} service time", - "refId": "A" - }, - { - "expr": "sum(rate(nats_latency_total_duration_sum{service=~\"${service}\"}[$range]) / rate(nats_latency_total_duration_count{service=~\"${service}\"}[$range])) by (service)", - "legendFormat": "{{service}} total time", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Average Service Duration", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "duration", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Time distribution spent traversing the NATS cluster", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 8 - }, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/10th/", - "color": "#1F60C4" - }, - { - "alias": "/50th/", - "color": "#8AB8FF" - }, - { - "alias": "/95th/", - "color": "#C0D8FF" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.10, sum(rate(nats_latency_system_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 10th %", - "refId": "D" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(nats_latency_system_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 50th %", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(nats_latency_system_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 95th %", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "System RTT Times Percentiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "rtt time", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Response time distribution between NATS and the Requesting Client", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 8 - }, - "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/10th/", - "color": "#3274D9" - }, - { - "alias": "/50th/", - "color": "#8AB8FF" - }, - { - "alias": "/95th/", - "color": "#C0D8FF" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.10, sum(rate(nats_latency_requestor_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 10th %", - "refId": "D" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(nats_latency_requestor_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 50th %", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(nats_latency_requestor_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 95th %", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Requestor RTT Times Percentiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "rtt time", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Response time distribution between NATS and the Service", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 8 - }, - "id": 17, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/10th/", - "color": "#3274D9" - }, - { - "alias": "/50th/", - "color": "#8AB8FF" - }, - { - "alias": "/95th/", - "color": "#C0D8FF" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.10, sum(rate(nats_latency_responder_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 10th %", - "refId": "D" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(nats_latency_responder_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 50th %", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(nats_latency_responder_rtt_bucket{service=~\"${service}\"}[$range])) by (service, le))", - "legendFormat": "{{service}} 95th %", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Responder RTT Times Percentiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "rtt time", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "DS__PROMETHEUS", - "description": "Number of observations received by status", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 6, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_latency_observation_status_count{service=~\"${service}\"}[$range])) by (service,status)", - "legendFormat": "{{service}} {{status}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Observations Statuses Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "observations / second", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "10s", - "schemaVersion": 20, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".+", - "current": {}, - "datasource": "DS__PROMETHEUS", - "definition": "label_values(nats_latency_total_duration_sum, service)", - "hide": 0, - "includeAll": true, - "label": "Service", - "multi": true, - "name": "service", - "options": [], - "query": "label_values(nats_latency_total_duration_sum, service)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "text": "1m", - "value": "1m" - }, - "hide": 0, - "label": "Range", - "name": "range", - "options": [ - { - "selected": true, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "10m", - "value": "10m" - } - ], - "query": "1m,5m,10m", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Service Observations", - "uid": "FVNA1y1Zz", - "version": 2 -} diff --git a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-supercluster-dashboard.json b/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-supercluster-dashboard.json deleted file mode 100644 index ba1058f4..00000000 --- a/docker/monitoring/grafana/provisioning/dashboards/nats-surveyor/surveyor-supercluster-dashboard.json +++ /dev/null @@ -1,830 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 3, - "iteration": 1608137262847, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": ["surveyor"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "max(nats_core_gateway_count)", - "interval": "", - "legendFormat": "Clusters", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 17, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["last"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "7.1.1", - "targets": [ - { - "expr": "sum(nats_core_gateway_count{server_cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "Connections", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "stat" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 6, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_gateway_sent_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_gateway_recv_bytes{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Super Cluster Bandwidth", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Bytes sent for each gateway", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 17 - }, - "hiddenSeries": false, - "id": 2, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_gateway_sent_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "bytes / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Bytes received for each gateway", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 17 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_gateway_recv_bytes{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "bytes / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Super Cluster Bandwidth", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 8, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "hiddenSeries": false, - "id": 15, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Sent", - "color": "#5794F2" - }, - { - "alias": "Received", - "color": "#73BF69" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nats_core_gateway_sent_msgs_count{server_cluster=~\"$cluster\"}[1m]))", - "hide": false, - "interval": "", - "legendFormat": "Sent", - "refId": "A" - }, - { - "expr": "sum(rate(nats_core_gateway_recv_msg_count{server_cluster=~\"$cluster\"}[1m]))", - "interval": "", - "legendFormat": "Received", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Super Cluster Messages", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "pps", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages sent for each gateway", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_gateway_sent_msgs_count{server_cluster=~\"$cluster\"}[1m])", - "interval": "", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Sent", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "messages / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "Messages received for each gateway", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "percentage": false, - "pluginVersion": "7.1.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "rate(nats_core_gateway_recv_msg_count{server_cluster=~\"$cluster\"}[1m])", - "legendFormat": "{{server_name}} - {{server_cluster}} -> {{server_gateway_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Messages Received", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "messages / sec", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "title": "Super Cluster Messages", - "type": "row" - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": ["nats-surveyor"], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": ["$__all"] - }, - "datasource": "Prometheus", - "definition": "label_values(nats_core_info, server_cluster)", - "hide": 0, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(nats_core_info, server_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] - }, - "timezone": "", - "title": "Surveyor - Super Cluster", - "uid": "qe4rPo0Gk", - "version": 15 -} diff --git a/docker/monitoring/grafana/provisioning/datasources/datasource.yml b/docker/monitoring/grafana/provisioning/datasources/datasource.yml deleted file mode 100644 index c7eb34fb..00000000 --- a/docker/monitoring/grafana/provisioning/datasources/datasource.yml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: 1 - -# Datasource list -datasources: - # First Datasource (Prometheus, Default) - - name: Prometheus - type: prometheus - access: proxy - url: http://prometheus:9090 - isDefault: true - editable: true - jsonData: - timeInterval: 5s - version: 1 - orgId: 1 - uid: "DS__PROMETHEUS" - - # Second Datasource (NATS Prometheus) - - name: Nats-Prometheus - type: prometheus - access: proxy - url: http://prometheus:9090 - isDefault: false - editable: true - jsonData: - timeInterval: 5s - version: 1 - orgId: 1 - uid: "DS__NATS-PROMETHEUS" diff --git a/docker/monitoring/prometheus/alert.rules b/docker/monitoring/prometheus/alert.rules deleted file mode 100644 index 543bf916..00000000 --- a/docker/monitoring/prometheus/alert.rules +++ /dev/null @@ -1,22 +0,0 @@ -groups: -- name: example - rules: - - # Alert for any instance that is unreachable for >2 minutes. - - alert: service_down - expr: up == 0 - for: 2m - labels: - severity: page - annotations: - summary: "Instance {{ $labels.instance }} down" - description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 2 minutes." - - - alert: high_load - expr: node_load1 > 0.5 - for: 2m - labels: - severity: page - annotations: - summary: "Instance {{ $labels.instance }} under high load" - description: "{{ $labels.instance }} of job {{ $labels.job }} is under high load." diff --git a/docker/monitoring/prometheus/prometheus.yml b/docker/monitoring/prometheus/prometheus.yml deleted file mode 100644 index e83a2fa8..00000000 --- a/docker/monitoring/prometheus/prometheus.yml +++ /dev/null @@ -1,79 +0,0 @@ -# my global config -global: - scrape_interval: 5s # By default, scrape targets every 5 seconds. - evaluation_interval: 5s # By default, scrape targets every 5 seconds. - # scrape_timeout is set to the global default (10s). - - # Attach these labels to any time series or alerts when communicating with - # external systems (federation, remote storage, Alertmanager). - external_labels: - monitor: 'fuel-data-systems' - -# Load and evaluate rules in this file every 'evaluation_interval' seconds. -rule_files: - - 'alert.rules' - # - "first.rules" - # - "second.rules" - -# alert -alerting: - alertmanagers: - - scheme: http - static_configs: - - targets: - - "localhost:9093" - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: - # The job name is added as a label `job=` to any timeseries scraped from this config. - - - job_name: 'prometheus' - # Override the global default and scrape targets from this job every 5 seconds. - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'localhost:9090' - - - job_name: 'nats-server' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'prometheus-nats-exporter:7777' - - - job_name: 'surveyor' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'nats-surveyor:7777' - - - job_name: 'fuel-streams-publisher' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'fuel-streams-publisher:8080' - - - job_name: 'fuel-streams-ws' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'fuel-streams-ws:9003' - - - job_name: 'cadvisor' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'cadvisor:8080' - - - job_name: 'node-exporter' - scrape_interval: 5s - scrape_timeout: 2s - static_configs: - - targets: - - 'node-exporter:9100' diff --git a/docker/monitoring/surveyor/jetstream/.keep b/docker/monitoring/surveyor/jetstream/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/monitoring/surveyor/jetstream/blocks.json b/docker/monitoring/surveyor/jetstream/blocks.json deleted file mode 100644 index 7008a965..00000000 --- a/docker/monitoring/surveyor/jetstream/blocks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "jestream", - "username": "admin", - "password": "secret" -} diff --git a/docker/monitoring/surveyor/nats-surveyor.yaml b/docker/monitoring/surveyor/nats-surveyor.yaml deleted file mode 100644 index 6e36d465..00000000 --- a/docker/monitoring/surveyor/nats-surveyor.yaml +++ /dev/null @@ -1,9 +0,0 @@ -servers: nats://nats:4222 -accounts: true -log-level: debug -port: 7777 -jetstream: /jetstream -observe: /observations -count: 1 -user: admin -password: secret diff --git a/docker/monitoring/surveyor/observations/.keep b/docker/monitoring/surveyor/observations/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/monitoring/surveyor/observations/blocks.json b/docker/monitoring/surveyor/observations/blocks.json deleted file mode 100644 index ab5301b1..00000000 --- a/docker/monitoring/surveyor/observations/blocks.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "blocks", - "topic": "*.blocks.>", - "username": "admin", - "password": "secret" -} diff --git a/docker/monitoring/surveyor/observations/transactions.json b/docker/monitoring/surveyor/observations/transactions.json deleted file mode 100644 index 48e8570d..00000000 --- a/docker/monitoring/surveyor/observations/transactions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "transactions", - "topic": "*.transactions.>", - "username": "admin", - "password": "secret" -} diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh deleted file mode 100755 index 86bf2c86..00000000 --- a/scripts/bump-version.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cargo set-version --workspace "$1" -cargo update --workspace -make fmt diff --git a/scripts/create_env.sh b/scripts/create_env.sh new file mode 100755 index 00000000..ef1b7cce --- /dev/null +++ b/scripts/create_env.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Prompt for Infura API key +read -p "Enter your Infura API key: " infura_key + +# Check if Infura API key was provided +if [ -z "$infura_key" ]; then + echo "Error: Infura API key is required" + exit 1 +fi + +# Generate keypair using fuel-core-keygen and extract the secret +echo "Generating keypair..." +keypair=$(fuel-core-keygen new --key-type peering | grep -o '"secret":"[^"]*"' | cut -d'"' -f4) + +if [ -z "$keypair" ]; then + echo "Error: Failed to generate keypair" + exit 1 +fi + +# Copy .env.sample to .env and replace placeholders +cp .env.sample .env + +# Use sed with a backup extension for compatibility +sed -i.bak "s/generated-p2p-secret/$keypair/" .env +sed -i.bak "s//$infura_key/" .env + +# Remove backup files created by sed +rm .env.bak + +echo ".env file created successfully with generated keypair." + +# Execute the set_env.sh script +./scripts/set_env.sh diff --git a/scripts/run_publisher.sh b/scripts/run_publisher.sh index 77872f64..df17d5b3 100755 --- a/scripts/run_publisher.sh +++ b/scripts/run_publisher.sh @@ -63,7 +63,7 @@ done # ------------------------------ # Load Environment # ------------------------------ -source ./scripts/set_envs.sh +source ./scripts/set_env.sh # Print the configuration being used echo -e "\n==========================================" diff --git a/scripts/set_envs.sh b/scripts/set_env.sh similarity index 99% rename from scripts/set_envs.sh rename to scripts/set_env.sh index 128122eb..e473865b 100755 --- a/scripts/set_envs.sh +++ b/scripts/set_env.sh @@ -66,7 +66,7 @@ export NATS_URL="$(echo "$NATS_URL")" # Append network-specific variables to .env file { - echo -e "\n# WARNING: Everything below this line is auto-generated by set_envs.sh" + echo -e "\n# WARNING: Everything below this line is auto-generated by set_env.sh" echo "# Network-specific variables for $NETWORK" echo "# Last generated: $(date)" echo "NETWORK=$NETWORK" diff --git a/scripts/setup.sh b/scripts/setup.sh index 81c3022c..263f1ac1 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -26,5 +26,12 @@ $install_cmd typos-cli $install_cmd cargo-nextest --secure # Binstall does not support --features -cargo install websocat --features=ssl --force cargo install cargo-audit --locked --features=fix --force + +# Check Helm and install helm-unittest plugin +if ! command -v helm &> /dev/null; then + echo "Warning: Helm is not installed. Please install Helm first." +else + echo "Installing Helm unittest plugin..." + helm plugin install https://github.com/quintush/helm-unittest +fi diff --git a/tests/src/main.rs b/tests/src/main.rs index 47bfc0f7..159bb8af 100644 --- a/tests/src/main.rs +++ b/tests/src/main.rs @@ -40,7 +40,7 @@ fn start_nats(makefile_path: &Path) { let status = Command::new("make") .arg("-f") .arg(makefile_path.to_str().unwrap()) - .arg("start/nats") + .arg("cluster_up") .status() .expect("Failed to start NATS"); @@ -55,7 +55,7 @@ fn stop_nats(makefile_path: &Path) { let status = Command::new("make") .arg("-f") .arg(makefile_path.to_str().unwrap()) - .arg("stop/nats") + .arg("cluster_up") .status() .expect("Failed to stop NATS"); diff --git a/tests/tests/publisher.rs b/tests/tests/publisher.rs index c7486a26..42ae9e85 100644 --- a/tests/tests/publisher.rs +++ b/tests/tests/publisher.rs @@ -53,7 +53,10 @@ impl FuelCoreLike for TestFuelCore { fn is_started(&self) -> bool { true } - async fn await_synced_at_least_once(&self) -> anyhow::Result<()> { + async fn await_synced_at_least_once( + &self, + _historical: bool, + ) -> anyhow::Result<()> { Ok(()) } async fn stop(&self) {} @@ -280,7 +283,7 @@ async fn start_publisher(publisher: &Publisher) -> Arc { tokio::spawn({ let publisher = publisher.clone(); async move { - publisher.run(shutdown_token).await.unwrap(); + publisher.run(shutdown_token, true).await.unwrap(); } }); wait_for_publisher_to_start().await;