├── .env ├── .github ├── CODEOWNERS └── workflows │ └── create-release.yml ├── .gitignore ├── LICENSE ├── README.md ├── RELEASE.md ├── deployment ├── grafana │ ├── Dockerfile │ ├── config.ini │ ├── dashboards │ │ ├── dockermetrics.json │ │ ├── postgres.json │ │ ├── sdk.json │ │ └── temporal.json │ └── provisioning │ │ ├── dashboards │ │ └── all.yml │ │ └── datasources │ │ └── all.yml ├── loki │ └── local-config.yaml ├── nginx │ └── nginx.conf ├── otel │ └── otel-config.yaml └── prometheus │ └── config.yml ├── docker-compose-cass-es.yml ├── docker-compose-multirole.yaml ├── docker-compose-mysql-es.yml ├── docker-compose-mysql.yml ├── docker-compose-postgres-opensearch.yml ├── docker-compose-postgres.yml ├── docker-compose-tls.yml ├── docker-compose.yml ├── dynamicconfig ├── README.md ├── development-cass.yaml ├── development-sql.yaml └── docker.yaml └── tls ├── Dockerfile.admin-tools-tls ├── Dockerfile.auto-setup-tls ├── Dockerfile.tls ├── README.md └── run-tls.sh /.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=temporal 2 | CASSANDRA_VERSION=3.11.9 3 | ELASTICSEARCH_VERSION=7.17.27 4 | MYSQL_VERSION=8 5 | TEMPORAL_VERSION=1.27.2 6 | TEMPORAL_ADMINTOOLS_VERSION=1.27.2-tctl-1.18.2-cli-1.3.0 7 | TEMPORAL_UI_VERSION=2.34.0 8 | POSTGRESQL_VERSION=16 9 | POSTGRES_PASSWORD=temporal 10 | POSTGRES_USER=temporal 11 | POSTGRES_DEFAULT_PORT=5432 12 | OPENSEARCH_VERSION=2.5.0 13 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @temporalio/devex 2 | -------------------------------------------------------------------------------- /.github/workflows/create-release.yml: -------------------------------------------------------------------------------- 1 | name: "Create a release" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | tag: 7 | description: "Tag for new version (1.23.4)" 8 | required: true 9 | admintools_tag: 10 | description: "Admin tools version (1.23.4-tctl-1.0-cli-1.0)" 11 | required: true 12 | 13 | jobs: 14 | create-tag: 15 | name: "Create a release" 16 | runs-on: ubuntu-latest 17 | 18 | defaults: 19 | run: 20 | shell: bash 21 | 22 | steps: 23 | - name: Generate token 24 | id: generate_token 25 | uses: actions/create-github-app-token@v1 26 | with: 27 | app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }} 28 | private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }} 29 | 30 | - name: Checkout 31 | uses: actions/checkout@v4 32 | with: 33 | persist-credentials: true 34 | token: ${{ steps.generate_token.outputs.token }} 35 | fetch-depth: 0 36 | fetch-tags: true 37 | 38 | - name: Set up Github credentials 39 | run: | 40 | git config --local user.name 'Temporal Data' 41 | git config --local user.email 'commander-data@temporal.io' 42 | 43 | - name: Update images version 44 | env: 45 | TAG: ${{ github.event.inputs.tag }} 46 | ADMINTOOLS_TAG: ${{ github.event.inputs.admintools_tag }} 47 | run: | 48 | sed -i -e "s/^TEMPORAL_VERSION=.*$/TEMPORAL_VERSION=$TAG/g" .env 49 | sed -i -e "s/^TEMPORAL_ADMINTOOLS_VERSION=.*$/TEMPORAL_ADMINTOOLS_VERSION=$ADMINTOOLS_TAG/g" .env 50 | if [ -n "$(git diff --stat)" ]; then 51 | git add . 52 | git commit -m "Bump Server version to $TAG" 53 | git push origin main 54 | fi 55 | 56 | - name: Create and push tag 57 | env: 58 | TAG: 'v${{ github.event.inputs.tag }}' 59 | run: | 60 | if [ -z "$(git tag -l $TAG)" ]; then 61 | git tag "$TAG" 62 | git push origin "$TAG" 63 | elif [ "$(git rev-list -n 1 $TAG)" != "$(git rev-parse HEAD)" ]; then 64 | echo "::error::Tag already exists and it doesn't reference current HEAD of main branch" 65 | exit 1 66 | fi 67 | 68 | - name: Create draft release notes 69 | id: release_notes 70 | env: 71 | GH_TOKEN: ${{ steps.generate_token.outputs.token }} 72 | TAG: 'v${{ github.event.inputs.tag}}' 73 | run: | 74 | TEMPFILE=$(mktemp) 75 | cat > $TEMPFILE <<- EOF 76 | # Release Highlights 77 | Please check [main repo](https://github.com/temporalio/temporal/releases/tag/${TAG}) release notes. 78 | EOF 79 | 80 | gh repo set-default ${{ github.repository }} 81 | RELEASE_URL=$(gh release create "$TAG" --verify-tag --draft --title "$TAG" -F $TEMPFILE) 82 | echo "RELEASE_URL=$RELEASE_URL" >> "$GITHUB_OUTPUT" 83 | 84 | - name: Create summary 85 | run: | 86 | TEMPFILE=$(mktemp) 87 | cat > $TEMPFILE <<- EOF 88 | # Job summary 89 | Draft release: ${{ steps.release_notes.outputs.RELEASE_URL }} 90 | EOF 91 | 92 | cat $TEMPFILE >> $GITHUB_STEP_SUMMARY 93 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .pki 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 temporal.io 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Temporal Server docker-compose files 2 | 3 | This repository provides docker-compose files that enable you to run a local instance of the Temporal Server. 4 | There are a variety of docker-compose files, each utilizing a different set of dependencies. 5 | Every major or minor release of the Temporal Server has a corresponding docker-compose release. 6 | 7 | ## Prerequisites 8 | 9 | To use these files, you must first have the following installed: 10 | 11 | - [Docker](https://docs.docker.com/engine/installation/) 12 | - [docker-compose](https://docs.docker.com/compose/install/) 13 | 14 | ## How to use 15 | 16 | The following steps will run a local instance of the Temporal Server using the default configuration file (`docker-compose.yml`): 17 | 18 | 1. Clone this repository. 19 | 2. Change directory into the root of the project. 20 | 3. Run the `docker-compose up` command. 21 | 22 | ```bash 23 | git clone https://github.com/temporalio/docker-compose.git 24 | cd docker-compose 25 | docker-compose up 26 | ``` 27 | 28 | > ⚠️ If you are on an M1 Mac, note that Temporal v1.12 to v1.14 had fatal issues with ARM builds. v1.14.2 onwards should be fine for M1 Macs. 29 | 30 | After the Server has started, you can open the Temporal Web UI in your browser: [http://localhost:8080](http://localhost:8080). 31 | 32 | You can also interact with the Server using a preconfigured CLI (tctl). 33 | First create an alias for `tctl`: 34 | 35 | ```bash 36 | alias tctl="docker exec temporal-admin-tools tctl" 37 | ``` 38 | 39 | The following is an example of how to register a new namespace `test-namespace` with 1 day of retention: 40 | 41 | ```bash 42 | tctl --ns test-namespace namespace register -rd 1 43 | ``` 44 | 45 | You can find our `tctl` docs on [docs.temporal.io](https://docs.temporal.io/docs/system-tools/tctl/). 46 | 47 | Get started building Workflows with a [Go sample](https://github.com/temporalio/samples-go), [Java sample](https://github.com/temporalio/samples-java), or write your own using one of the [SDKs](https://docs.temporal.io/docs/sdks-introduction). 48 | 49 | ### Other configuration files 50 | 51 | The default configuration file (`docker-compose.yml`) uses a PostgreSQL database, an Elasticsearch instance, and exposes the Temporal gRPC Frontend on port 7233. 52 | The other configuration files in the repo spin up instances of the Temporal Server using different databases and dependencies. 53 | For example you can run the Temporal Server with MySQL and Elastic Search with this command: 54 | 55 | ```bash 56 | docker-compose -f docker-compose-mysql-es.yml up 57 | ``` 58 | 59 | Here is a list of available files and the dependencies they use. 60 | 61 | | File | Description | 62 | |----------------------------------------|---------------------------------------------------------------| 63 | | docker-compose.yml | PostgreSQL and Elasticsearch (default) | 64 | | docker-compose-tls.yml | PostgreSQL and Elasticsearch with TLS | 65 | | docker-compose-postgres.yml | PostgreSQL | 66 | | docker-compose-cass.yml | Cassandra | 67 | | docker-compose-cass-es.yml | Cassandra and Elasticsearch | 68 | | docker-compose-mysql.yml | MySQL | 69 | | docker-compose-mysql-es.yml | MySQL and Elasticsearch | 70 | | docker-compose-postgres-opensearch.yml | PostgreSQL and OpenSearch | 71 | | docker-compose-multirole.yml | PostgreSQL and Elasticsearch with mult-role Server containers | 72 | 73 | ### Using multi-role configuration 74 | 75 | First install the loki plugin (this is one time operation) 76 | ```bash 77 | docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions 78 | ``` 79 | 80 | Start multi-role Server configuration: 81 | ``` 82 | docker compose -f docker-compose-multirole.yaml up 83 | ``` 84 | 85 | Some exposed endpoints: 86 | - http://localhost:8080 - Temporal Web UI 87 | - http://localhost:8085 - Grafana dashboards 88 | - http://localhost:9090 - Prometheus UI 89 | - http://localhost:9090/targets - Prometheus targets 90 | - http://localhost:8000/metrics - Server metrics 91 | 92 | ### Using the web interface 93 | 94 | `docker-compose.yml` includes the Temporal Web UI. 95 | 96 | If you run command: 97 | 98 | ```bash 99 | docker-compose up 100 | ``` 101 | 102 | You access the Temporal Web UI at http://localhost:8080. 103 | 104 | ### Enabling metrics (with Grafana and Prometheus) 105 | 106 | We maintain two example docker-compose setups with server metrics enabled, and Prometheus and Grafana with [our Server and SDK dashboards](https://github.com/temporalio/dashboards): 107 | 108 | - https://github.com/tsurdilo/my-temporal-dockercompose 109 | - https://github.com/temporalio/background-checks 110 | 111 | ### Use a custom image configuration 112 | 113 | If you want, you can even use a custom Docker image of the Temporal Server. 114 | 115 | Clone the main Temporal Server repo: [https://github.com/temporalio/temporal](https://github.com/temporalio/temporal): 116 | 117 | ```bash 118 | git clone https://github.com/temporalio/temporal.git 119 | ``` 120 | 121 | In the following command, replace **** and **** to build the custom Docker image: 122 | 123 | ```bash 124 | git checkout 125 | docker build . -t temporalio/auto-setup: --build-arg TARGET=auto-setup 126 | ``` 127 | 128 | Next, in the `docker-compose.yml` file, replace the `services.temporal.image` configuration value with ****. 129 | 130 | Then run the `docker-compose up` command: 131 | 132 | ```bash 133 | docker-compose up 134 | ``` 135 | 136 | ## Using Temporal docker images in production 137 | 138 | These docker-compose setups listed here do not use Temporal Server directly - they utilize [an `auto-setup` script you can read about here](https://docs.temporal.io/blog/auto-setup). You will want to familiarize yourself with this before you deploy to production. 139 | 140 | In a typical production setting, dependencies such as `cassandra` or `elasticsearch` are managed/started independently of the Temporal server. **You should use the `temporalio/server` image instead of `temporalio/auto-setup`.** 141 | 142 | To use the `temporalio/server` container in a production setting, use the following command: 143 | 144 | ```plain 145 | docker run -e CASSANDRA_SEEDS=10.x.x.x -- csv of Cassandra server ipaddrs 146 | -e KEYSPACE= -- Cassandra keyspace 147 | -e VISIBILITY_KEYSPACE= -- Cassandra visibility keyspace 148 | -e SKIP_SCHEMA_SETUP=true -- do not setup Cassandra schema during startup 149 | -e NUM_HISTORY_SHARDS=1024 \ -- Number of history shards 150 | -e SERVICES=history,matching \ -- Spin-up only the provided services 151 | -e LOG_LEVEL=debug,info \ -- Logging level 152 | -e DYNAMIC_CONFIG_FILE_PATH=config/foo.yaml -- Dynamic config file to be watched 153 | temporalio/server: 154 | ``` 155 | 156 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | Create new release 2 | ================== 3 | 4 | To update the image tag for a release: 5 | 6 | * In the file [.env](./.env) update the version variable to be changed 7 | 8 | ``` 9 | TEMPORAL_VERSION=1.16.2 10 | TEMPORAL_UI_VERSION=2.7.1 11 | ``` 12 | * Commit the change and submit a PR 13 | -------------------------------------------------------------------------------- /deployment/grafana/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM grafana/grafana:7.5.16 2 | ADD ./provisioning /etc/grafana/provisioning 3 | ADD ./config.ini /etc/grafana/config.ini 4 | ADD ./dashboards /var/lib/grafana/dashboards -------------------------------------------------------------------------------- /deployment/grafana/config.ini: -------------------------------------------------------------------------------- 1 | [paths] 2 | provisioning = /etc/grafana/provisioning 3 | 4 | [server] 5 | enable_gzip = true 6 | 7 | [users] 8 | default_theme = light -------------------------------------------------------------------------------- /deployment/grafana/dashboards/dockermetrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "datasource", 8 | "uid": "grafana" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "target": { 15 | "limit": 100, 16 | "matchAny": false, 17 | "tags": [], 18 | "type": "dashboard" 19 | }, 20 | "type": "dashboard" 21 | } 22 | ] 23 | }, 24 | "description": "Draw some docker metrics", 25 | "editable": true, 26 | "fiscalYearStartMonth": 0, 27 | "graphTooltip": 0, 28 | "links": [], 29 | "liveNow": false, 30 | "panels": [ 31 | { 32 | "datasource": { 33 | "type": "grafana", 34 | "uid": "grafana" 35 | }, 36 | "description": "Number of CPUs", 37 | "fieldConfig": { 38 | "defaults": { 39 | "color": { 40 | "mode": "thresholds" 41 | }, 42 | "mappings": [ 43 | { 44 | "options": { 45 | "match": "null", 46 | "result": { 47 | "text": "N/A" 48 | } 49 | }, 50 | "type": "special" 51 | } 52 | ], 53 | "thresholds": { 54 | "mode": "absolute", 55 | "steps": [ 56 | { 57 | "color": "green", 58 | "value": null 59 | }, 60 | { 61 | "color": "red", 62 | "value": 80 63 | } 64 | ] 65 | }, 66 | "unit": "none" 67 | }, 68 | "overrides": [] 69 | }, 70 | "gridPos": { 71 | "h": 3, 72 | "w": 24, 73 | "x": 0, 74 | "y": 0 75 | }, 76 | "id": 7, 77 | "links": [], 78 | "maxDataPoints": 100, 79 | "options": { 80 | "colorMode": "value", 81 | "graphMode": "none", 82 | "justifyMode": "auto", 83 | "orientation": "horizontal", 84 | "reduceOptions": { 85 | "calcs": [ 86 | "lastNotNull" 87 | ], 88 | "fields": "", 89 | "values": false 90 | }, 91 | "textMode": "auto" 92 | }, 93 | "pluginVersion": "9.0.7", 94 | "repeat": "instance", 95 | "targets": [ 96 | { 97 | "datasource": { 98 | "type": "datasource", 99 | "uid": "grafana" 100 | }, 101 | "expr": "engine_daemon_engine_cpus_cpus{instance=~'$instance'}", 102 | "intervalFactor": 2, 103 | "legendFormat": "", 104 | "metric": "engine_daemon_engine_cpus_cpus", 105 | "refId": "A", 106 | "step": 60 107 | } 108 | ], 109 | "title": "CPU Cores", 110 | "type": "stat" 111 | }, 112 | { 113 | "aliasColors": {}, 114 | "bars": false, 115 | "dashLength": 10, 116 | "dashes": false, 117 | "datasource": { 118 | "type": "grafana", 119 | "uid": "grafana" 120 | }, 121 | "description": "Measuring some percentiles performance", 122 | "fill": 1, 123 | "fillGradient": 0, 124 | "gridPos": { 125 | "h": 7, 126 | "w": 24, 127 | "x": 0, 128 | "y": 3 129 | }, 130 | "hiddenSeries": false, 131 | "id": 14, 132 | "legend": { 133 | "alignAsTable": false, 134 | "avg": false, 135 | "current": false, 136 | "hideEmpty": true, 137 | "hideZero": true, 138 | "max": false, 139 | "min": false, 140 | "show": true, 141 | "total": false, 142 | "values": false 143 | }, 144 | "lines": true, 145 | "linewidth": 1, 146 | "links": [], 147 | "nullPointMode": "null as zero", 148 | "options": { 149 | "alertThreshold": true 150 | }, 151 | "percentage": false, 152 | "pluginVersion": "9.0.7", 153 | "pointradius": 5, 154 | "points": false, 155 | "renderer": "flot", 156 | "repeat": "instance", 157 | "seriesOverrides": [], 158 | "spaceLength": 10, 159 | "stack": false, 160 | "steppedLine": false, 161 | "targets": [ 162 | { 163 | "datasource": { 164 | "type": "datasource", 165 | "uid": "grafana" 166 | }, 167 | "expr": "histogram_quantile(0.99, rate(engine_daemon_container_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 168 | "intervalFactor": 2, 169 | "legendFormat": "{{action}} 99", 170 | "refId": "A", 171 | "step": 4 172 | }, 173 | { 174 | "datasource": { 175 | "type": "datasource", 176 | "uid": "grafana" 177 | }, 178 | "expr": "histogram_quantile(0.90, rate(engine_daemon_container_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 179 | "intervalFactor": 2, 180 | "legendFormat": "{{action}} 90", 181 | "refId": "B", 182 | "step": 4 183 | }, 184 | { 185 | "datasource": { 186 | "type": "datasource", 187 | "uid": "grafana" 188 | }, 189 | "expr": "histogram_quantile(0.50, rate(engine_daemon_container_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 190 | "intervalFactor": 2, 191 | "legendFormat": "{{action}} 50", 192 | "refId": "C", 193 | "step": 4 194 | }, 195 | { 196 | "datasource": { 197 | "type": "datasource", 198 | "uid": "grafana" 199 | }, 200 | "expr": "histogram_quantile(0.25, rate(engine_daemon_container_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 201 | "intervalFactor": 2, 202 | "legendFormat": "{{action}} 25", 203 | "refId": "D", 204 | "step": 4 205 | } 206 | ], 207 | "thresholds": [], 208 | "timeRegions": [], 209 | "title": "Time x Container Action percentile", 210 | "tooltip": { 211 | "shared": true, 212 | "sort": 0, 213 | "value_type": "individual" 214 | }, 215 | "type": "graph", 216 | "xaxis": { 217 | "mode": "time", 218 | "show": true, 219 | "values": [] 220 | }, 221 | "yaxes": [ 222 | { 223 | "format": "short", 224 | "logBase": 1, 225 | "show": true 226 | }, 227 | { 228 | "format": "short", 229 | "logBase": 1, 230 | "show": true 231 | } 232 | ], 233 | "yaxis": { 234 | "align": false 235 | } 236 | }, 237 | { 238 | "aliasColors": {}, 239 | "bars": false, 240 | "dashLength": 10, 241 | "dashes": false, 242 | "datasource": { 243 | "type": "grafana", 244 | "uid": "grafana" 245 | }, 246 | "fill": 1, 247 | "fillGradient": 0, 248 | "gridPos": { 249 | "h": 7, 250 | "w": 24, 251 | "x": 0, 252 | "y": 10 253 | }, 254 | "hiddenSeries": false, 255 | "id": 15, 256 | "legend": { 257 | "avg": false, 258 | "current": false, 259 | "hideEmpty": true, 260 | "hideZero": true, 261 | "max": false, 262 | "min": false, 263 | "show": true, 264 | "total": false, 265 | "values": false 266 | }, 267 | "lines": true, 268 | "linewidth": 1, 269 | "links": [], 270 | "nullPointMode": "null", 271 | "options": { 272 | "alertThreshold": true 273 | }, 274 | "percentage": false, 275 | "pluginVersion": "9.0.7", 276 | "pointradius": 5, 277 | "points": false, 278 | "renderer": "flot", 279 | "repeat": "instance", 280 | "seriesOverrides": [], 281 | "spaceLength": 10, 282 | "stack": false, 283 | "steppedLine": false, 284 | "targets": [ 285 | { 286 | "datasource": { 287 | "type": "datasource", 288 | "uid": "grafana" 289 | }, 290 | "expr": "engine_daemon_container_actions_seconds_count{instance=~'$instance'}", 291 | "intervalFactor": 2, 292 | "legendFormat": "{{action}}", 293 | "metric": "engine_daemon_container_actions_seconds_count", 294 | "refId": "A", 295 | "step": 4 296 | } 297 | ], 298 | "thresholds": [], 299 | "timeRegions": [], 300 | "title": "Total Container Actions", 301 | "tooltip": { 302 | "shared": true, 303 | "sort": 2, 304 | "value_type": "individual" 305 | }, 306 | "type": "graph", 307 | "xaxis": { 308 | "mode": "time", 309 | "show": true, 310 | "values": [] 311 | }, 312 | "yaxes": [ 313 | { 314 | "format": "short", 315 | "logBase": 1, 316 | "show": true 317 | }, 318 | { 319 | "format": "short", 320 | "logBase": 1, 321 | "show": true 322 | } 323 | ], 324 | "yaxis": { 325 | "align": false 326 | } 327 | }, 328 | { 329 | "aliasColors": {}, 330 | "bars": false, 331 | "dashLength": 10, 332 | "dashes": false, 333 | "datasource": { 334 | "type": "grafana", 335 | "uid": "grafana" 336 | }, 337 | "description": "Measuring some percentiles performance", 338 | "fill": 1, 339 | "fillGradient": 0, 340 | "gridPos": { 341 | "h": 7, 342 | "w": 24, 343 | "x": 0, 344 | "y": 17 345 | }, 346 | "hiddenSeries": false, 347 | "id": 22, 348 | "legend": { 349 | "alignAsTable": false, 350 | "avg": false, 351 | "current": false, 352 | "hideEmpty": true, 353 | "hideZero": true, 354 | "max": false, 355 | "min": false, 356 | "show": true, 357 | "total": false, 358 | "values": false 359 | }, 360 | "lines": true, 361 | "linewidth": 1, 362 | "links": [], 363 | "nullPointMode": "null as zero", 364 | "options": { 365 | "alertThreshold": true 366 | }, 367 | "percentage": false, 368 | "pluginVersion": "9.0.7", 369 | "pointradius": 5, 370 | "points": false, 371 | "renderer": "flot", 372 | "repeat": "instance", 373 | "seriesOverrides": [], 374 | "spaceLength": 10, 375 | "stack": false, 376 | "steppedLine": false, 377 | "targets": [ 378 | { 379 | "datasource": { 380 | "type": "datasource", 381 | "uid": "grafana" 382 | }, 383 | "expr": "histogram_quantile(0.99, rate(engine_daemon_network_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 384 | "intervalFactor": 2, 385 | "legendFormat": "{{action}} 99", 386 | "refId": "A", 387 | "step": 4 388 | }, 389 | { 390 | "datasource": { 391 | "type": "datasource", 392 | "uid": "grafana" 393 | }, 394 | "expr": "histogram_quantile(0.90, rate(engine_daemon_network_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 395 | "intervalFactor": 2, 396 | "legendFormat": "{{action}} 90", 397 | "refId": "B", 398 | "step": 4 399 | }, 400 | { 401 | "datasource": { 402 | "type": "datasource", 403 | "uid": "grafana" 404 | }, 405 | "expr": "histogram_quantile(0.50, rate(engine_daemon_network_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 406 | "intervalFactor": 2, 407 | "legendFormat": "{{action}} 50", 408 | "refId": "C", 409 | "step": 4 410 | }, 411 | { 412 | "datasource": { 413 | "type": "datasource", 414 | "uid": "grafana" 415 | }, 416 | "expr": "histogram_quantile(0.25, rate(engine_daemon_network_actions_seconds_bucket{instance=~'$instance'}[$interval]))", 417 | "intervalFactor": 2, 418 | "legendFormat": "{{action}} 25", 419 | "refId": "D", 420 | "step": 4 421 | } 422 | ], 423 | "thresholds": [], 424 | "timeRegions": [], 425 | "title": "Time x Network Action percentile", 426 | "tooltip": { 427 | "shared": true, 428 | "sort": 0, 429 | "value_type": "individual" 430 | }, 431 | "type": "graph", 432 | "xaxis": { 433 | "mode": "time", 434 | "show": true, 435 | "values": [] 436 | }, 437 | "yaxes": [ 438 | { 439 | "format": "short", 440 | "logBase": 1, 441 | "show": true 442 | }, 443 | { 444 | "format": "short", 445 | "logBase": 1, 446 | "show": true 447 | } 448 | ], 449 | "yaxis": { 450 | "align": false 451 | } 452 | }, 453 | { 454 | "aliasColors": {}, 455 | "bars": false, 456 | "dashLength": 10, 457 | "dashes": false, 458 | "datasource": { 459 | "type": "grafana", 460 | "uid": "grafana" 461 | }, 462 | "fill": 1, 463 | "fillGradient": 0, 464 | "gridPos": { 465 | "h": 7, 466 | "w": 24, 467 | "x": 0, 468 | "y": 24 469 | }, 470 | "hiddenSeries": false, 471 | "id": 19, 472 | "legend": { 473 | "avg": false, 474 | "current": false, 475 | "hideEmpty": true, 476 | "hideZero": true, 477 | "max": false, 478 | "min": false, 479 | "show": true, 480 | "total": false, 481 | "values": false 482 | }, 483 | "lines": true, 484 | "linewidth": 1, 485 | "links": [], 486 | "nullPointMode": "null as zero", 487 | "options": { 488 | "alertThreshold": true 489 | }, 490 | "percentage": false, 491 | "pluginVersion": "9.0.7", 492 | "pointradius": 5, 493 | "points": false, 494 | "renderer": "flot", 495 | "repeat": "instance", 496 | "seriesOverrides": [], 497 | "spaceLength": 10, 498 | "stack": false, 499 | "steppedLine": false, 500 | "targets": [ 501 | { 502 | "datasource": { 503 | "type": "datasource", 504 | "uid": "grafana" 505 | }, 506 | "expr": "engine_daemon_network_actions_seconds_count{instance=~'$instance'}", 507 | "intervalFactor": 2, 508 | "legendFormat": "{{action}}", 509 | "metric": "engine_daemon_container_actions_seconds_count", 510 | "refId": "A", 511 | "step": 4 512 | } 513 | ], 514 | "thresholds": [], 515 | "timeRegions": [], 516 | "title": "Total Network Actions", 517 | "tooltip": { 518 | "shared": true, 519 | "sort": 2, 520 | "value_type": "individual" 521 | }, 522 | "type": "graph", 523 | "xaxis": { 524 | "mode": "time", 525 | "show": true, 526 | "values": [] 527 | }, 528 | "yaxes": [ 529 | { 530 | "format": "none", 531 | "logBase": 1, 532 | "show": true 533 | }, 534 | { 535 | "format": "none", 536 | "logBase": 1, 537 | "show": true 538 | } 539 | ], 540 | "yaxis": { 541 | "align": false 542 | } 543 | }, 544 | { 545 | "aliasColors": {}, 546 | "bars": false, 547 | "dashLength": 10, 548 | "dashes": false, 549 | "datasource": { 550 | "type": "grafana", 551 | "uid": "grafana" 552 | }, 553 | "description": "Measuring histogram on some percentile", 554 | "fill": 1, 555 | "fillGradient": 0, 556 | "gridPos": { 557 | "h": 7, 558 | "w": 24, 559 | "x": 0, 560 | "y": 31 561 | }, 562 | "hiddenSeries": false, 563 | "id": 21, 564 | "legend": { 565 | "alignAsTable": false, 566 | "avg": false, 567 | "current": false, 568 | "hideEmpty": true, 569 | "hideZero": true, 570 | "max": false, 571 | "min": false, 572 | "show": true, 573 | "total": false, 574 | "values": false 575 | }, 576 | "lines": true, 577 | "linewidth": 1, 578 | "links": [], 579 | "nullPointMode": "null as zero", 580 | "options": { 581 | "alertThreshold": true 582 | }, 583 | "percentage": false, 584 | "pluginVersion": "9.0.7", 585 | "pointradius": 5, 586 | "points": false, 587 | "renderer": "flot", 588 | "repeat": "instance", 589 | "seriesOverrides": [], 590 | "spaceLength": 10, 591 | "stack": false, 592 | "steppedLine": false, 593 | "targets": [ 594 | { 595 | "datasource": { 596 | "type": "datasource", 597 | "uid": "grafana" 598 | }, 599 | "expr": "histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket{instance=~'$instance'}[$interval]))", 600 | "intervalFactor": 2, 601 | "legendFormat": "99", 602 | "refId": "D", 603 | "step": 4 604 | }, 605 | { 606 | "datasource": { 607 | "type": "datasource", 608 | "uid": "grafana" 609 | }, 610 | "expr": "histogram_quantile(0.90, rate(etcd_disk_wal_fsync_duration_seconds_bucket{instance=~'$instance'}[$interval]))", 611 | "intervalFactor": 2, 612 | "legendFormat": "90", 613 | "refId": "A", 614 | "step": 4 615 | }, 616 | { 617 | "datasource": { 618 | "type": "datasource", 619 | "uid": "grafana" 620 | }, 621 | "expr": "histogram_quantile(0.50, rate(etcd_disk_wal_fsync_duration_seconds_bucket{instance=~'$instance'}[$interval]))", 622 | "intervalFactor": 2, 623 | "legendFormat": "50", 624 | "refId": "B", 625 | "step": 4 626 | }, 627 | { 628 | "datasource": { 629 | "type": "datasource", 630 | "uid": "grafana" 631 | }, 632 | "expr": "histogram_quantile(0.10, rate(etcd_disk_wal_fsync_duration_seconds_bucket{instance=~'$instance'}[$interval]))", 633 | "intervalFactor": 2, 634 | "legendFormat": "10", 635 | "refId": "C", 636 | "step": 4 637 | } 638 | ], 639 | "thresholds": [], 640 | "timeRegions": [], 641 | "title": "etcd fsync wall percentile", 642 | "tooltip": { 643 | "shared": true, 644 | "sort": 0, 645 | "value_type": "individual" 646 | }, 647 | "type": "graph", 648 | "xaxis": { 649 | "mode": "time", 650 | "show": true, 651 | "values": [] 652 | }, 653 | "yaxes": [ 654 | { 655 | "format": "short", 656 | "logBase": 1, 657 | "show": true 658 | }, 659 | { 660 | "format": "short", 661 | "logBase": 1, 662 | "show": true 663 | } 664 | ], 665 | "yaxis": { 666 | "align": false 667 | } 668 | }, 669 | { 670 | "aliasColors": {}, 671 | "bars": false, 672 | "dashLength": 10, 673 | "dashes": false, 674 | "datasource": { 675 | "type": "grafana", 676 | "uid": "grafana" 677 | }, 678 | "decimals": 0, 679 | "fill": 1, 680 | "fillGradient": 0, 681 | "gridPos": { 682 | "h": 7, 683 | "w": 24, 684 | "x": 0, 685 | "y": 38 686 | }, 687 | "hiddenSeries": false, 688 | "id": 20, 689 | "legend": { 690 | "alignAsTable": false, 691 | "avg": false, 692 | "current": true, 693 | "max": true, 694 | "min": true, 695 | "show": true, 696 | "total": false, 697 | "values": true 698 | }, 699 | "lines": true, 700 | "linewidth": 1, 701 | "links": [], 702 | "nullPointMode": "null", 703 | "options": { 704 | "alertThreshold": true 705 | }, 706 | "percentage": false, 707 | "pluginVersion": "9.0.7", 708 | "pointradius": 5, 709 | "points": false, 710 | "renderer": "flot", 711 | "repeat": "instance", 712 | "seriesOverrides": [], 713 | "spaceLength": 10, 714 | "stack": false, 715 | "steppedLine": false, 716 | "targets": [ 717 | { 718 | "datasource": { 719 | "type": "datasource", 720 | "uid": "grafana" 721 | }, 722 | "expr": "engine_daemon_events_subscribers_total{instance=~'$instance'}", 723 | "intervalFactor": 2, 724 | "legendFormat": " ", 725 | "refId": "A", 726 | "step": 4 727 | } 728 | ], 729 | "thresholds": [], 730 | "timeRegions": [], 731 | "title": "Event Subscribers", 732 | "tooltip": { 733 | "shared": true, 734 | "sort": 0, 735 | "value_type": "individual" 736 | }, 737 | "type": "graph", 738 | "xaxis": { 739 | "mode": "time", 740 | "show": true, 741 | "values": [] 742 | }, 743 | "yaxes": [ 744 | { 745 | "format": "short", 746 | "logBase": 1, 747 | "show": true 748 | }, 749 | { 750 | "format": "short", 751 | "logBase": 1, 752 | "show": true 753 | } 754 | ], 755 | "yaxis": { 756 | "align": false 757 | } 758 | }, 759 | { 760 | "aliasColors": {}, 761 | "bars": false, 762 | "dashLength": 10, 763 | "dashes": false, 764 | "datasource": { 765 | "type": "grafana", 766 | "uid": "grafana" 767 | }, 768 | "decimals": 0, 769 | "fill": 1, 770 | "fillGradient": 0, 771 | "gridPos": { 772 | "h": 7, 773 | "w": 24, 774 | "x": 0, 775 | "y": 45 776 | }, 777 | "hiddenSeries": false, 778 | "id": 23, 779 | "legend": { 780 | "avg": false, 781 | "current": false, 782 | "hideEmpty": true, 783 | "hideZero": true, 784 | "max": false, 785 | "min": false, 786 | "show": true, 787 | "total": false, 788 | "values": false 789 | }, 790 | "lines": true, 791 | "linewidth": 1, 792 | "links": [], 793 | "nullPointMode": "null", 794 | "options": { 795 | "alertThreshold": true 796 | }, 797 | "percentage": false, 798 | "pluginVersion": "9.0.7", 799 | "pointradius": 5, 800 | "points": false, 801 | "renderer": "flot", 802 | "repeat": "instance", 803 | "seriesOverrides": [], 804 | "spaceLength": 10, 805 | "stack": false, 806 | "steppedLine": false, 807 | "targets": [ 808 | { 809 | "datasource": { 810 | "type": "datasource", 811 | "uid": "grafana" 812 | }, 813 | "refId": "A" 814 | } 815 | ], 816 | "thresholds": [], 817 | "timeRegions": [], 818 | "title": "Image Builds", 819 | "tooltip": { 820 | "shared": true, 821 | "sort": 0, 822 | "value_type": "individual" 823 | }, 824 | "type": "graph", 825 | "xaxis": { 826 | "mode": "time", 827 | "show": true, 828 | "values": [] 829 | }, 830 | "yaxes": [ 831 | { 832 | "format": "short", 833 | "logBase": 1, 834 | "show": true 835 | }, 836 | { 837 | "format": "short", 838 | "logBase": 1, 839 | "show": true 840 | } 841 | ], 842 | "yaxis": { 843 | "align": false 844 | } 845 | } 846 | ], 847 | "schemaVersion": 36, 848 | "style": "dark", 849 | "tags": [ 850 | "docker", 851 | "docker metrics", 852 | "docker engine" 853 | ], 854 | "templating": { 855 | "list": [ 856 | { 857 | "auto": true, 858 | "auto_count": 30, 859 | "auto_min": "10s", 860 | "current": { 861 | "selected": true, 862 | "text": "auto", 863 | "value": "$__auto_interval_interval" 864 | }, 865 | "hide": 0, 866 | "label": "Interval", 867 | "name": "interval", 868 | "options": [ 869 | { 870 | "selected": true, 871 | "text": "auto", 872 | "value": "$__auto_interval_interval" 873 | }, 874 | { 875 | "selected": false, 876 | "text": "30s", 877 | "value": "30s" 878 | }, 879 | { 880 | "selected": false, 881 | "text": "1m", 882 | "value": "1m" 883 | }, 884 | { 885 | "selected": false, 886 | "text": "2m", 887 | "value": "2m" 888 | }, 889 | { 890 | "selected": false, 891 | "text": "3m", 892 | "value": "3m" 893 | }, 894 | { 895 | "selected": false, 896 | "text": "5m", 897 | "value": "5m" 898 | }, 899 | { 900 | "selected": false, 901 | "text": "7m", 902 | "value": "7m" 903 | }, 904 | { 905 | "selected": false, 906 | "text": "10m", 907 | "value": "10m" 908 | }, 909 | { 910 | "selected": false, 911 | "text": "30m", 912 | "value": "30m" 913 | }, 914 | { 915 | "selected": false, 916 | "text": "1h", 917 | "value": "1h" 918 | }, 919 | { 920 | "selected": false, 921 | "text": "6h", 922 | "value": "6h" 923 | }, 924 | { 925 | "selected": false, 926 | "text": "12h", 927 | "value": "12h" 928 | }, 929 | { 930 | "selected": false, 931 | "text": "1d", 932 | "value": "1d" 933 | }, 934 | { 935 | "selected": false, 936 | "text": "7d", 937 | "value": "7d" 938 | }, 939 | { 940 | "selected": false, 941 | "text": "14d", 942 | "value": "14d" 943 | }, 944 | { 945 | "selected": false, 946 | "text": "30d", 947 | "value": "30d" 948 | } 949 | ], 950 | "query": "30s,1m,2m,3m,5m,7m,10m,30m,1h,6h,12h,1d,7d,14d,30d", 951 | "queryValue": "", 952 | "refresh": 2, 953 | "skipUrlSync": false, 954 | "type": "interval" 955 | }, 956 | { 957 | "current": { 958 | "selected": true, 959 | "text": [], 960 | "value": [] 961 | }, 962 | "datasource": { 963 | "uid": "$datasource" 964 | }, 965 | "definition": "", 966 | "error": { 967 | "message": "Datasource $datasource was not found" 968 | }, 969 | "hide": 0, 970 | "includeAll": true, 971 | "label": "Instance", 972 | "multi": true, 973 | "name": "instance", 974 | "options": [], 975 | "query": "engine_daemon_engine_info", 976 | "refresh": 1, 977 | "regex": "/instance=\"([^\"]+)\"/", 978 | "skipUrlSync": false, 979 | "sort": 0, 980 | "type": "query", 981 | "useTags": false 982 | } 983 | ] 984 | }, 985 | "time": { 986 | "from": "now-1h", 987 | "to": "now" 988 | }, 989 | "timepicker": { 990 | "refresh_intervals": [ 991 | "5s", 992 | "10s", 993 | "30s", 994 | "1m", 995 | "5m", 996 | "15m", 997 | "30m", 998 | "1h", 999 | "2h", 1000 | "1d" 1001 | ], 1002 | "time_options": [ 1003 | "5m", 1004 | "15m", 1005 | "1h", 1006 | "6h", 1007 | "12h", 1008 | "24h", 1009 | "2d", 1010 | "7d", 1011 | "30d" 1012 | ] 1013 | }, 1014 | "timezone": "browser", 1015 | "title": "Docker Engine Metrics", 1016 | "uid": "ngW7QSi4k", 1017 | "version": 1, 1018 | "weekStart": "" 1019 | } -------------------------------------------------------------------------------- /deployment/grafana/dashboards/postgres.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "datasource", 8 | "uid": "grafana" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "target": { 15 | "limit": 100, 16 | "matchAny": false, 17 | "tags": [], 18 | "type": "dashboard" 19 | }, 20 | "type": "dashboard" 21 | } 22 | ] 23 | }, 24 | "description": "Dashboard for postgres_exporter prometheus metrics", 25 | "editable": true, 26 | "gnetId": 9628, 27 | "graphTooltip": 0, 28 | "id": null, 29 | "iteration": 1547234558060, 30 | "links": [], 31 | "panels": [ 32 | { 33 | "datasource": { 34 | "type": "grafana", 35 | "uid": "grafana" 36 | }, 37 | "collapsed": false, 38 | "gridPos": { 39 | "h": 1, 40 | "w": 24, 41 | "x": 0, 42 | "y": 0 43 | }, 44 | "id": 34, 45 | "panels": [], 46 | "title": "General Counters, CPU, Memory and File Descriptor Stats", 47 | "type": "row" 48 | }, 49 | { 50 | "cacheTimeout": null, 51 | "colorBackground": false, 52 | "colorValue": true, 53 | "colors": [ 54 | "#299c46", 55 | "#7eb26d", 56 | "#d44a3a" 57 | ], 58 | "datasource": { 59 | "type": "datasource", 60 | "uid": "grafana" 61 | }, 62 | "format": "none", 63 | "gauge": { 64 | "maxValue": 100, 65 | "minValue": 0, 66 | "show": false, 67 | "thresholdLabels": false, 68 | "thresholdMarkers": true 69 | }, 70 | "gridPos": { 71 | "h": 2, 72 | "w": 4, 73 | "x": 0, 74 | "y": 1 75 | }, 76 | "id": 36, 77 | "interval": null, 78 | "links": [], 79 | "mappingType": 1, 80 | "mappingTypes": [ 81 | { 82 | "name": "value to text", 83 | "value": 1 84 | }, 85 | { 86 | "name": "range to text", 87 | "value": 2 88 | } 89 | ], 90 | "maxDataPoints": 100, 91 | "nullPointMode": "connected", 92 | "nullText": null, 93 | "postfix": "", 94 | "postfixFontSize": "50%", 95 | "prefix": "", 96 | "prefixFontSize": "50%", 97 | "rangeMaps": [ 98 | { 99 | "from": "null", 100 | "text": "N/A", 101 | "to": "null" 102 | } 103 | ], 104 | "sparkline": { 105 | "fillColor": "rgba(31, 118, 189, 0.18)", 106 | "full": false, 107 | "lineColor": "rgb(31, 120, 193)", 108 | "show": false 109 | }, 110 | "tableColumn": "", 111 | "targets": [ 112 | { 113 | "expr": "pg_static{release=\"$release\", instance=\"$instance\"}", 114 | "format": "time_series", 115 | "intervalFactor": 1, 116 | "legendFormat": "{{short_version}}", 117 | "refId": "A" 118 | } 119 | ], 120 | "thresholds": "", 121 | "title": "Version", 122 | "type": "singlestat", 123 | "valueFontSize": "80%", 124 | "valueMaps": [ 125 | { 126 | "op": "=", 127 | "text": "N/A", 128 | "value": "null" 129 | } 130 | ], 131 | "valueName": "name" 132 | }, 133 | { 134 | "cacheTimeout": null, 135 | "colorBackground": false, 136 | "colorValue": false, 137 | "colors": [ 138 | "#299c46", 139 | "rgba(237, 129, 40, 0.89)", 140 | "#d44a3a" 141 | ], 142 | "datasource": { 143 | "type": "datasource", 144 | "uid": "grafana" 145 | }, 146 | "description": "start time of the process", 147 | "format": "dateTimeFromNow", 148 | "gauge": { 149 | "maxValue": 100, 150 | "minValue": 0, 151 | "show": false, 152 | "thresholdLabels": false, 153 | "thresholdMarkers": true 154 | }, 155 | "gridPos": { 156 | "h": 2, 157 | "w": 4, 158 | "x": 4, 159 | "y": 1 160 | }, 161 | "id": 28, 162 | "interval": null, 163 | "links": [], 164 | "mappingType": 1, 165 | "mappingTypes": [ 166 | { 167 | "name": "value to text", 168 | "value": 1 169 | }, 170 | { 171 | "name": "range to text", 172 | "value": 2 173 | } 174 | ], 175 | "maxDataPoints": 100, 176 | "nullPointMode": "connected", 177 | "nullText": null, 178 | "postfix": "", 179 | "postfixFontSize": "110%", 180 | "prefix": "", 181 | "prefixFontSize": "110%", 182 | "rangeMaps": [ 183 | { 184 | "from": "null", 185 | "text": "N/A", 186 | "to": "null" 187 | } 188 | ], 189 | "sparkline": { 190 | "fillColor": "rgba(31, 118, 189, 0.18)", 191 | "full": false, 192 | "lineColor": "rgb(31, 120, 193)", 193 | "show": false 194 | }, 195 | "tableColumn": "", 196 | "targets": [ 197 | { 198 | "expr": "process_start_time_seconds{release=\"$release\", instance=\"$instance\"} * 1000", 199 | "format": "time_series", 200 | "intervalFactor": 2, 201 | "legendFormat": "", 202 | "refId": "A" 203 | } 204 | ], 205 | "thresholds": "", 206 | "title": "Start Time", 207 | "type": "singlestat", 208 | "valueFontSize": "110%", 209 | "valueMaps": [ 210 | { 211 | "op": "=", 212 | "text": "N/A", 213 | "value": "null" 214 | } 215 | ], 216 | "valueName": "avg" 217 | }, 218 | { 219 | "cacheTimeout": null, 220 | "colorBackground": false, 221 | "colorValue": false, 222 | "colors": [ 223 | "rgba(245, 54, 54, 0.9)", 224 | "rgba(237, 129, 40, 0.89)", 225 | "rgba(50, 172, 45, 0.97)" 226 | ], 227 | "datasource": { 228 | "type": "datasource", 229 | "uid": "grafana" 230 | }, 231 | "format": "decbytes", 232 | "gauge": { 233 | "maxValue": 100, 234 | "minValue": 0, 235 | "show": false, 236 | "thresholdLabels": false, 237 | "thresholdMarkers": true 238 | }, 239 | "gridPos": { 240 | "h": 2, 241 | "w": 4, 242 | "x": 8, 243 | "y": 1 244 | }, 245 | "height": "200px", 246 | "id": 10, 247 | "interval": null, 248 | "links": [], 249 | "mappingType": 1, 250 | "mappingTypes": [ 251 | { 252 | "name": "value to text", 253 | "value": 1 254 | }, 255 | { 256 | "name": "range to text", 257 | "value": 2 258 | } 259 | ], 260 | "maxDataPoints": 100, 261 | "nullPointMode": "connected", 262 | "nullText": null, 263 | "postfix": "", 264 | "postfixFontSize": "50%", 265 | "prefix": "", 266 | "prefixFontSize": "50%", 267 | "rangeMaps": [ 268 | { 269 | "from": "null", 270 | "text": "N/A", 271 | "to": "null" 272 | } 273 | ], 274 | "sparkline": { 275 | "fillColor": "rgba(31, 118, 189, 0.18)", 276 | "full": false, 277 | "lineColor": "rgb(31, 120, 193)", 278 | "show": false 279 | }, 280 | "tableColumn": "", 281 | "targets": [ 282 | { 283 | "expr": "SUM(pg_stat_database_tup_fetched{datname=~\"$datname\", instance=~\"$instance\"})", 284 | "format": "time_series", 285 | "intervalFactor": 2, 286 | "refId": "A", 287 | "step": 4 288 | } 289 | ], 290 | "thresholds": "", 291 | "title": "Current fetch data", 292 | "type": "singlestat", 293 | "valueFontSize": "80%", 294 | "valueMaps": [ 295 | { 296 | "op": "=", 297 | "text": "N/A", 298 | "value": "null" 299 | } 300 | ], 301 | "valueName": "current" 302 | }, 303 | { 304 | "cacheTimeout": null, 305 | "colorBackground": false, 306 | "colorValue": false, 307 | "colors": [ 308 | "rgba(245, 54, 54, 0.9)", 309 | "rgba(237, 129, 40, 0.89)", 310 | "rgba(50, 172, 45, 0.97)" 311 | ], 312 | "datasource": { 313 | "type": "datasource", 314 | "uid": "grafana" 315 | }, 316 | "format": "decbytes", 317 | "gauge": { 318 | "maxValue": 100, 319 | "minValue": 0, 320 | "show": false, 321 | "thresholdLabels": false, 322 | "thresholdMarkers": true 323 | }, 324 | "gridPos": { 325 | "h": 2, 326 | "w": 4, 327 | "x": 12, 328 | "y": 1 329 | }, 330 | "height": "200px", 331 | "id": 11, 332 | "interval": null, 333 | "links": [], 334 | "mappingType": 1, 335 | "mappingTypes": [ 336 | { 337 | "name": "value to text", 338 | "value": 1 339 | }, 340 | { 341 | "name": "range to text", 342 | "value": 2 343 | } 344 | ], 345 | "maxDataPoints": 100, 346 | "nullPointMode": "connected", 347 | "nullText": null, 348 | "postfix": "", 349 | "postfixFontSize": "50%", 350 | "prefix": "", 351 | "prefixFontSize": "50%", 352 | "rangeMaps": [ 353 | { 354 | "from": "null", 355 | "text": "N/A", 356 | "to": "null" 357 | } 358 | ], 359 | "sparkline": { 360 | "fillColor": "rgba(31, 118, 189, 0.18)", 361 | "full": false, 362 | "lineColor": "rgb(31, 120, 193)", 363 | "show": false 364 | }, 365 | "tableColumn": "", 366 | "targets": [ 367 | { 368 | "expr": "SUM(pg_stat_database_tup_inserted{release=\"$release\", datname=~\"$datname\", instance=~\"$instance\"})", 369 | "format": "time_series", 370 | "intervalFactor": 2, 371 | "refId": "A", 372 | "step": 4 373 | } 374 | ], 375 | "thresholds": "", 376 | "title": "Current insert data", 377 | "type": "singlestat", 378 | "valueFontSize": "80%", 379 | "valueMaps": [ 380 | { 381 | "op": "=", 382 | "text": "N/A", 383 | "value": "null" 384 | } 385 | ], 386 | "valueName": "current" 387 | }, 388 | { 389 | "cacheTimeout": null, 390 | "colorBackground": false, 391 | "colorValue": false, 392 | "colors": [ 393 | "rgba(245, 54, 54, 0.9)", 394 | "rgba(237, 129, 40, 0.89)", 395 | "rgba(50, 172, 45, 0.97)" 396 | ], 397 | "datasource": { 398 | "type": "datasource", 399 | "uid": "grafana" 400 | }, 401 | "format": "decbytes", 402 | "gauge": { 403 | "maxValue": 100, 404 | "minValue": 0, 405 | "show": false, 406 | "thresholdLabels": false, 407 | "thresholdMarkers": true 408 | }, 409 | "gridPos": { 410 | "h": 2, 411 | "w": 4, 412 | "x": 16, 413 | "y": 1 414 | }, 415 | "height": "200px", 416 | "id": 12, 417 | "interval": null, 418 | "links": [], 419 | "mappingType": 1, 420 | "mappingTypes": [ 421 | { 422 | "name": "value to text", 423 | "value": 1 424 | }, 425 | { 426 | "name": "range to text", 427 | "value": 2 428 | } 429 | ], 430 | "maxDataPoints": 100, 431 | "nullPointMode": "connected", 432 | "nullText": null, 433 | "postfix": "", 434 | "postfixFontSize": "50%", 435 | "prefix": "", 436 | "prefixFontSize": "50%", 437 | "rangeMaps": [ 438 | { 439 | "from": "null", 440 | "text": "N/A", 441 | "to": "null" 442 | } 443 | ], 444 | "sparkline": { 445 | "fillColor": "rgba(31, 118, 189, 0.18)", 446 | "full": false, 447 | "lineColor": "rgb(31, 120, 193)", 448 | "show": false 449 | }, 450 | "tableColumn": "", 451 | "targets": [ 452 | { 453 | "expr": "SUM(pg_stat_database_tup_updated{datname=~\"$datname\", instance=~\"$instance\"})", 454 | "format": "time_series", 455 | "intervalFactor": 2, 456 | "refId": "A", 457 | "step": 4 458 | } 459 | ], 460 | "thresholds": "", 461 | "title": "Current update data", 462 | "type": "singlestat", 463 | "valueFontSize": "80%", 464 | "valueMaps": [ 465 | { 466 | "op": "=", 467 | "text": "N/A", 468 | "value": "null" 469 | } 470 | ], 471 | "valueName": "current" 472 | }, 473 | { 474 | "cacheTimeout": null, 475 | "colorBackground": false, 476 | "colorValue": false, 477 | "colors": [ 478 | "#299c46", 479 | "rgba(237, 129, 40, 0.89)", 480 | "#d44a3a" 481 | ], 482 | "datasource": { 483 | "type": "datasource", 484 | "uid": "grafana" 485 | }, 486 | "format": "none", 487 | "gauge": { 488 | "maxValue": 100, 489 | "minValue": 0, 490 | "show": false, 491 | "thresholdLabels": false, 492 | "thresholdMarkers": true 493 | }, 494 | "gridPos": { 495 | "h": 2, 496 | "w": 4, 497 | "x": 20, 498 | "y": 1 499 | }, 500 | "id": 38, 501 | "interval": null, 502 | "links": [], 503 | "mappingType": 1, 504 | "mappingTypes": [ 505 | { 506 | "name": "value to text", 507 | "value": 1 508 | }, 509 | { 510 | "name": "range to text", 511 | "value": 2 512 | } 513 | ], 514 | "maxDataPoints": 100, 515 | "nullPointMode": "connected", 516 | "nullText": null, 517 | "postfix": "", 518 | "postfixFontSize": "50%", 519 | "prefix": "", 520 | "prefixFontSize": "50%", 521 | "rangeMaps": [ 522 | { 523 | "from": "null", 524 | "text": "N/A", 525 | "to": "null" 526 | } 527 | ], 528 | "sparkline": { 529 | "fillColor": "rgba(31, 118, 189, 0.18)", 530 | "full": false, 531 | "lineColor": "rgb(31, 120, 193)", 532 | "show": false 533 | }, 534 | "tableColumn": "", 535 | "targets": [ 536 | { 537 | "expr": "pg_settings_max_connections{release=\"$release\", instance=\"$instance\"}", 538 | "format": "time_series", 539 | "intervalFactor": 1, 540 | "refId": "A" 541 | } 542 | ], 543 | "thresholds": "", 544 | "title": "Max Connections", 545 | "type": "singlestat", 546 | "valueFontSize": "80%", 547 | "valueMaps": [ 548 | { 549 | "op": "=", 550 | "text": "N/A", 551 | "value": "null" 552 | } 553 | ], 554 | "valueName": "avg" 555 | }, 556 | { 557 | "aliasColors": {}, 558 | "bars": false, 559 | "dashLength": 10, 560 | "dashes": false, 561 | "datasource": { 562 | "type": "datasource", 563 | "uid": "grafana" 564 | }, 565 | "description": "Average user and system CPU time spent in seconds.", 566 | "fill": 1, 567 | "gridPos": { 568 | "h": 7, 569 | "w": 8, 570 | "x": 0, 571 | "y": 3 572 | }, 573 | "id": 22, 574 | "legend": { 575 | "alignAsTable": true, 576 | "avg": true, 577 | "current": true, 578 | "max": true, 579 | "min": true, 580 | "show": true, 581 | "total": false, 582 | "values": true 583 | }, 584 | "lines": true, 585 | "linewidth": 1, 586 | "links": [], 587 | "nullPointMode": "null", 588 | "percentage": false, 589 | "pointradius": 5, 590 | "points": false, 591 | "renderer": "flot", 592 | "seriesOverrides": [], 593 | "spaceLength": 10, 594 | "stack": false, 595 | "steppedLine": false, 596 | "targets": [ 597 | { 598 | "expr": "avg(rate(process_cpu_seconds_total{release=\"$release\", instance=\"$instance\"}[5m]) * 1000)", 599 | "format": "time_series", 600 | "intervalFactor": 2, 601 | "legendFormat": "CPU Time", 602 | "refId": "A" 603 | } 604 | ], 605 | "thresholds": [], 606 | "timeFrom": null, 607 | "timeShift": null, 608 | "title": "Average CPU Usage", 609 | "tooltip": { 610 | "shared": true, 611 | "sort": 0, 612 | "value_type": "individual" 613 | }, 614 | "type": "graph", 615 | "xaxis": { 616 | "buckets": null, 617 | "mode": "time", 618 | "name": null, 619 | "show": true, 620 | "values": [] 621 | }, 622 | "yaxes": [ 623 | { 624 | "format": "s", 625 | "label": null, 626 | "logBase": 1, 627 | "max": null, 628 | "min": null, 629 | "show": true 630 | }, 631 | { 632 | "format": "short", 633 | "label": null, 634 | "logBase": 1, 635 | "max": null, 636 | "min": null, 637 | "show": true 638 | } 639 | ], 640 | "yaxis": { 641 | "align": false, 642 | "alignLevel": null 643 | } 644 | }, 645 | { 646 | "aliasColors": {}, 647 | "bars": false, 648 | "dashLength": 10, 649 | "dashes": false, 650 | "datasource": { 651 | "type": "datasource", 652 | "uid": "grafana" 653 | }, 654 | "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", 655 | "fill": 1, 656 | "gridPos": { 657 | "h": 7, 658 | "w": 8, 659 | "x": 8, 660 | "y": 3 661 | }, 662 | "id": 24, 663 | "legend": { 664 | "alignAsTable": true, 665 | "avg": true, 666 | "current": true, 667 | "max": true, 668 | "min": true, 669 | "show": true, 670 | "total": false, 671 | "values": true 672 | }, 673 | "lines": true, 674 | "linewidth": 1, 675 | "links": [], 676 | "nullPointMode": "null", 677 | "percentage": false, 678 | "pointradius": 5, 679 | "points": false, 680 | "renderer": "flot", 681 | "seriesOverrides": [], 682 | "spaceLength": 10, 683 | "stack": false, 684 | "steppedLine": false, 685 | "targets": [ 686 | { 687 | "expr": "avg(rate(process_resident_memory_bytes{release=\"$release\", instance=\"$instance\"}[5m]))", 688 | "format": "time_series", 689 | "intervalFactor": 2, 690 | "legendFormat": "Resident Mem", 691 | "refId": "A" 692 | }, 693 | { 694 | "expr": "avg(rate(process_virtual_memory_bytes{release=\"$release\", instance=\"$instance\"}[5m]))", 695 | "format": "time_series", 696 | "intervalFactor": 2, 697 | "legendFormat": "Virtual Mem", 698 | "refId": "B" 699 | } 700 | ], 701 | "thresholds": [], 702 | "timeFrom": null, 703 | "timeShift": null, 704 | "title": "Average Memory Usage", 705 | "tooltip": { 706 | "shared": true, 707 | "sort": 0, 708 | "value_type": "individual" 709 | }, 710 | "type": "graph", 711 | "xaxis": { 712 | "buckets": null, 713 | "mode": "time", 714 | "name": null, 715 | "show": true, 716 | "values": [] 717 | }, 718 | "yaxes": [ 719 | { 720 | "decimals": null, 721 | "format": "decbytes", 722 | "label": null, 723 | "logBase": 1, 724 | "max": null, 725 | "min": null, 726 | "show": true 727 | }, 728 | { 729 | "format": "short", 730 | "label": null, 731 | "logBase": 1, 732 | "max": null, 733 | "min": null, 734 | "show": true 735 | } 736 | ], 737 | "yaxis": { 738 | "align": false, 739 | "alignLevel": null 740 | } 741 | }, 742 | { 743 | "aliasColors": {}, 744 | "bars": false, 745 | "dashLength": 10, 746 | "dashes": false, 747 | "datasource": { 748 | "type": "datasource", 749 | "uid": "grafana" 750 | }, 751 | "description": "Number of open file descriptors", 752 | "fill": 1, 753 | "gridPos": { 754 | "h": 7, 755 | "w": 8, 756 | "x": 16, 757 | "y": 3 758 | }, 759 | "id": 26, 760 | "legend": { 761 | "alignAsTable": true, 762 | "avg": true, 763 | "current": true, 764 | "max": true, 765 | "min": true, 766 | "show": true, 767 | "total": false, 768 | "values": true 769 | }, 770 | "lines": true, 771 | "linewidth": 1, 772 | "links": [], 773 | "nullPointMode": "null", 774 | "percentage": false, 775 | "pointradius": 5, 776 | "points": false, 777 | "renderer": "flot", 778 | "seriesOverrides": [], 779 | "spaceLength": 10, 780 | "stack": false, 781 | "steppedLine": false, 782 | "targets": [ 783 | { 784 | "expr": "process_open_fds{release=\"$release\", instance=\"$instance\"}", 785 | "format": "time_series", 786 | "intervalFactor": 2, 787 | "legendFormat": "Open FD", 788 | "refId": "A" 789 | } 790 | ], 791 | "thresholds": [], 792 | "timeFrom": null, 793 | "timeShift": null, 794 | "title": "Open File Descriptors", 795 | "tooltip": { 796 | "shared": true, 797 | "sort": 0, 798 | "value_type": "individual" 799 | }, 800 | "type": "graph", 801 | "xaxis": { 802 | "buckets": null, 803 | "mode": "time", 804 | "name": null, 805 | "show": true, 806 | "values": [] 807 | }, 808 | "yaxes": [ 809 | { 810 | "decimals": null, 811 | "format": "short", 812 | "label": null, 813 | "logBase": 1, 814 | "max": null, 815 | "min": null, 816 | "show": true 817 | }, 818 | { 819 | "format": "short", 820 | "label": null, 821 | "logBase": 1, 822 | "max": null, 823 | "min": null, 824 | "show": true 825 | } 826 | ], 827 | "yaxis": { 828 | "align": false, 829 | "alignLevel": null 830 | } 831 | }, 832 | { 833 | "collapsed": false, 834 | "gridPos": { 835 | "h": 1, 836 | "w": 24, 837 | "x": 0, 838 | "y": 10 839 | }, 840 | "id": 32, 841 | "panels": [], 842 | "title": "Settings", 843 | "type": "row" 844 | }, 845 | { 846 | "cacheTimeout": null, 847 | "colorBackground": false, 848 | "colorValue": false, 849 | "colors": [ 850 | "#299c46", 851 | "rgba(237, 129, 40, 0.89)", 852 | "#d44a3a" 853 | ], 854 | "datasource": { 855 | "type": "datasource", 856 | "uid": "grafana" 857 | }, 858 | "format": "bytes", 859 | "gauge": { 860 | "maxValue": 100, 861 | "minValue": 0, 862 | "show": false, 863 | "thresholdLabels": false, 864 | "thresholdMarkers": true 865 | }, 866 | "gridPos": { 867 | "h": 3, 868 | "w": 3, 869 | "x": 0, 870 | "y": 11 871 | }, 872 | "id": 40, 873 | "interval": null, 874 | "links": [], 875 | "mappingType": 1, 876 | "mappingTypes": [ 877 | { 878 | "name": "value to text", 879 | "value": 1 880 | }, 881 | { 882 | "name": "range to text", 883 | "value": 2 884 | } 885 | ], 886 | "maxDataPoints": 100, 887 | "nullPointMode": "connected", 888 | "nullText": null, 889 | "postfix": "", 890 | "postfixFontSize": "50%", 891 | "prefix": "", 892 | "prefixFontSize": "50%", 893 | "rangeMaps": [ 894 | { 895 | "from": "null", 896 | "text": "N/A", 897 | "to": "null" 898 | } 899 | ], 900 | "sparkline": { 901 | "fillColor": "rgba(31, 118, 189, 0.18)", 902 | "full": false, 903 | "lineColor": "rgb(31, 120, 193)", 904 | "show": false 905 | }, 906 | "tableColumn": "", 907 | "targets": [ 908 | { 909 | "expr": "pg_settings_shared_buffers_bytes{instance=\"$instance\"}", 910 | "format": "time_series", 911 | "intervalFactor": 1, 912 | "refId": "A" 913 | } 914 | ], 915 | "thresholds": "", 916 | "title": "Shared Buffers", 917 | "type": "singlestat", 918 | "valueFontSize": "80%", 919 | "valueMaps": [ 920 | { 921 | "op": "=", 922 | "text": "N/A", 923 | "value": "null" 924 | } 925 | ], 926 | "valueName": "current" 927 | }, 928 | { 929 | "cacheTimeout": null, 930 | "colorBackground": false, 931 | "colorValue": false, 932 | "colors": [ 933 | "#299c46", 934 | "rgba(237, 129, 40, 0.89)", 935 | "#d44a3a" 936 | ], 937 | "datasource": { 938 | "type": "datasource", 939 | "uid": "grafana" 940 | }, 941 | "format": "bytes", 942 | "gauge": { 943 | "maxValue": 100, 944 | "minValue": 0, 945 | "show": false, 946 | "thresholdLabels": false, 947 | "thresholdMarkers": true 948 | }, 949 | "gridPos": { 950 | "h": 3, 951 | "w": 3, 952 | "x": 3, 953 | "y": 11 954 | }, 955 | "id": 42, 956 | "interval": null, 957 | "links": [], 958 | "mappingType": 1, 959 | "mappingTypes": [ 960 | { 961 | "name": "value to text", 962 | "value": 1 963 | }, 964 | { 965 | "name": "range to text", 966 | "value": 2 967 | } 968 | ], 969 | "maxDataPoints": 100, 970 | "nullPointMode": "connected", 971 | "nullText": null, 972 | "postfix": "", 973 | "postfixFontSize": "50%", 974 | "prefix": "", 975 | "prefixFontSize": "50%", 976 | "rangeMaps": [ 977 | { 978 | "from": "null", 979 | "text": "N/A", 980 | "to": "null" 981 | } 982 | ], 983 | "sparkline": { 984 | "fillColor": "rgba(31, 118, 189, 0.18)", 985 | "full": false, 986 | "lineColor": "rgb(31, 120, 193)", 987 | "show": false 988 | }, 989 | "tableColumn": "", 990 | "targets": [ 991 | { 992 | "expr": "pg_settings_effective_cache_size_bytes{instance=\"$instance\"}", 993 | "format": "time_series", 994 | "intervalFactor": 1, 995 | "refId": "A" 996 | } 997 | ], 998 | "thresholds": "", 999 | "title": "Effective Cache", 1000 | "type": "singlestat", 1001 | "valueFontSize": "80%", 1002 | "valueMaps": [ 1003 | { 1004 | "op": "=", 1005 | "text": "N/A", 1006 | "value": "null" 1007 | } 1008 | ], 1009 | "valueName": "current" 1010 | }, 1011 | { 1012 | "cacheTimeout": null, 1013 | "colorBackground": false, 1014 | "colorValue": false, 1015 | "colors": [ 1016 | "#299c46", 1017 | "rgba(237, 129, 40, 0.89)", 1018 | "#d44a3a" 1019 | ], 1020 | "datasource": { 1021 | "type": "datasource", 1022 | "uid": "grafana" 1023 | }, 1024 | "format": "bytes", 1025 | "gauge": { 1026 | "maxValue": 100, 1027 | "minValue": 0, 1028 | "show": false, 1029 | "thresholdLabels": false, 1030 | "thresholdMarkers": true 1031 | }, 1032 | "gridPos": { 1033 | "h": 3, 1034 | "w": 3, 1035 | "x": 6, 1036 | "y": 11 1037 | }, 1038 | "id": 44, 1039 | "interval": null, 1040 | "links": [], 1041 | "mappingType": 1, 1042 | "mappingTypes": [ 1043 | { 1044 | "name": "value to text", 1045 | "value": 1 1046 | }, 1047 | { 1048 | "name": "range to text", 1049 | "value": 2 1050 | } 1051 | ], 1052 | "maxDataPoints": 100, 1053 | "nullPointMode": "connected", 1054 | "nullText": null, 1055 | "postfix": "", 1056 | "postfixFontSize": "50%", 1057 | "prefix": "", 1058 | "prefixFontSize": "50%", 1059 | "rangeMaps": [ 1060 | { 1061 | "from": "null", 1062 | "text": "N/A", 1063 | "to": "null" 1064 | } 1065 | ], 1066 | "sparkline": { 1067 | "fillColor": "rgba(31, 118, 189, 0.18)", 1068 | "full": false, 1069 | "lineColor": "rgb(31, 120, 193)", 1070 | "show": false 1071 | }, 1072 | "tableColumn": "", 1073 | "targets": [ 1074 | { 1075 | "expr": "pg_settings_maintenance_work_mem_bytes{instance=\"$instance\"}", 1076 | "format": "time_series", 1077 | "intervalFactor": 1, 1078 | "refId": "A" 1079 | } 1080 | ], 1081 | "thresholds": "", 1082 | "title": "Maintenance Work Mem", 1083 | "type": "singlestat", 1084 | "valueFontSize": "80%", 1085 | "valueMaps": [ 1086 | { 1087 | "op": "=", 1088 | "text": "N/A", 1089 | "value": "null" 1090 | } 1091 | ], 1092 | "valueName": "current" 1093 | }, 1094 | { 1095 | "cacheTimeout": null, 1096 | "colorBackground": false, 1097 | "colorValue": false, 1098 | "colors": [ 1099 | "#299c46", 1100 | "rgba(237, 129, 40, 0.89)", 1101 | "#d44a3a" 1102 | ], 1103 | "datasource": { 1104 | "type": "datasource", 1105 | "uid": "grafana" 1106 | }, 1107 | "format": "bytes", 1108 | "gauge": { 1109 | "maxValue": 100, 1110 | "minValue": 0, 1111 | "show": false, 1112 | "thresholdLabels": false, 1113 | "thresholdMarkers": true 1114 | }, 1115 | "gridPos": { 1116 | "h": 3, 1117 | "w": 3, 1118 | "x": 9, 1119 | "y": 11 1120 | }, 1121 | "id": 46, 1122 | "interval": null, 1123 | "links": [], 1124 | "mappingType": 1, 1125 | "mappingTypes": [ 1126 | { 1127 | "name": "value to text", 1128 | "value": 1 1129 | }, 1130 | { 1131 | "name": "range to text", 1132 | "value": 2 1133 | } 1134 | ], 1135 | "maxDataPoints": 100, 1136 | "nullPointMode": "connected", 1137 | "nullText": null, 1138 | "postfix": "", 1139 | "postfixFontSize": "50%", 1140 | "prefix": "", 1141 | "prefixFontSize": "50%", 1142 | "rangeMaps": [ 1143 | { 1144 | "from": "null", 1145 | "text": "N/A", 1146 | "to": "null" 1147 | } 1148 | ], 1149 | "sparkline": { 1150 | "fillColor": "rgba(31, 118, 189, 0.18)", 1151 | "full": false, 1152 | "lineColor": "rgb(31, 120, 193)", 1153 | "show": false 1154 | }, 1155 | "tableColumn": "", 1156 | "targets": [ 1157 | { 1158 | "expr": "pg_settings_work_mem_bytes{instance=\"$instance\"}", 1159 | "format": "time_series", 1160 | "intervalFactor": 1, 1161 | "legendFormat": "", 1162 | "refId": "A" 1163 | } 1164 | ], 1165 | "thresholds": "", 1166 | "title": "Work Mem", 1167 | "type": "singlestat", 1168 | "valueFontSize": "80%", 1169 | "valueMaps": [ 1170 | { 1171 | "op": "=", 1172 | "text": "N/A", 1173 | "value": "null" 1174 | } 1175 | ], 1176 | "valueName": "current" 1177 | }, 1178 | { 1179 | "cacheTimeout": null, 1180 | "colorBackground": false, 1181 | "colorValue": false, 1182 | "colors": [ 1183 | "#299c46", 1184 | "rgba(237, 129, 40, 0.89)", 1185 | "#d44a3a" 1186 | ], 1187 | "datasource": { 1188 | "type": "datasource", 1189 | "uid": "grafana" 1190 | }, 1191 | "decimals": 1, 1192 | "format": "bytes", 1193 | "gauge": { 1194 | "maxValue": 100, 1195 | "minValue": 0, 1196 | "show": false, 1197 | "thresholdLabels": false, 1198 | "thresholdMarkers": true 1199 | }, 1200 | "gridPos": { 1201 | "h": 3, 1202 | "w": 3, 1203 | "x": 12, 1204 | "y": 11 1205 | }, 1206 | "id": 48, 1207 | "interval": null, 1208 | "links": [], 1209 | "mappingType": 1, 1210 | "mappingTypes": [ 1211 | { 1212 | "name": "value to text", 1213 | "value": 1 1214 | }, 1215 | { 1216 | "name": "range to text", 1217 | "value": 2 1218 | } 1219 | ], 1220 | "maxDataPoints": 100, 1221 | "nullPointMode": "connected", 1222 | "nullText": null, 1223 | "postfix": "", 1224 | "postfixFontSize": "50%", 1225 | "prefix": "", 1226 | "prefixFontSize": "50%", 1227 | "rangeMaps": [ 1228 | { 1229 | "from": "null", 1230 | "text": "N/A", 1231 | "to": "null" 1232 | } 1233 | ], 1234 | "sparkline": { 1235 | "fillColor": "rgba(31, 118, 189, 0.18)", 1236 | "full": false, 1237 | "lineColor": "rgb(31, 120, 193)", 1238 | "show": false 1239 | }, 1240 | "tableColumn": "", 1241 | "targets": [ 1242 | { 1243 | "expr": "pg_settings_max_wal_size_bytes{instance=\"$instance\"}", 1244 | "format": "time_series", 1245 | "intervalFactor": 1, 1246 | "refId": "A" 1247 | } 1248 | ], 1249 | "thresholds": "", 1250 | "title": "Max WAL Size", 1251 | "type": "singlestat", 1252 | "valueFontSize": "80%", 1253 | "valueMaps": [ 1254 | { 1255 | "op": "=", 1256 | "text": "N/A", 1257 | "value": "null" 1258 | } 1259 | ], 1260 | "valueName": "current" 1261 | }, 1262 | { 1263 | "cacheTimeout": null, 1264 | "colorBackground": false, 1265 | "colorValue": false, 1266 | "colors": [ 1267 | "#299c46", 1268 | "rgba(237, 129, 40, 0.89)", 1269 | "#d44a3a" 1270 | ], 1271 | "datasource": { 1272 | "type": "datasource", 1273 | "uid": "grafana" 1274 | }, 1275 | "format": "none", 1276 | "gauge": { 1277 | "maxValue": 100, 1278 | "minValue": 0, 1279 | "show": false, 1280 | "thresholdLabels": false, 1281 | "thresholdMarkers": true 1282 | }, 1283 | "gridPos": { 1284 | "h": 3, 1285 | "w": 3, 1286 | "x": 15, 1287 | "y": 11 1288 | }, 1289 | "id": 50, 1290 | "interval": null, 1291 | "links": [], 1292 | "mappingType": 1, 1293 | "mappingTypes": [ 1294 | { 1295 | "name": "value to text", 1296 | "value": 1 1297 | }, 1298 | { 1299 | "name": "range to text", 1300 | "value": 2 1301 | } 1302 | ], 1303 | "maxDataPoints": 100, 1304 | "nullPointMode": "connected", 1305 | "nullText": null, 1306 | "postfix": "", 1307 | "postfixFontSize": "50%", 1308 | "prefix": "", 1309 | "prefixFontSize": "50%", 1310 | "rangeMaps": [ 1311 | { 1312 | "from": "null", 1313 | "text": "N/A", 1314 | "to": "null" 1315 | } 1316 | ], 1317 | "sparkline": { 1318 | "fillColor": "rgba(31, 118, 189, 0.18)", 1319 | "full": false, 1320 | "lineColor": "rgb(31, 120, 193)", 1321 | "show": false 1322 | }, 1323 | "tableColumn": "", 1324 | "targets": [ 1325 | { 1326 | "expr": "pg_settings_random_page_cost{instance=\"$instance\"}", 1327 | "format": "time_series", 1328 | "intervalFactor": 1, 1329 | "refId": "A" 1330 | } 1331 | ], 1332 | "thresholds": "", 1333 | "title": "Random Page Cost", 1334 | "type": "singlestat", 1335 | "valueFontSize": "80%", 1336 | "valueMaps": [ 1337 | { 1338 | "op": "=", 1339 | "text": "N/A", 1340 | "value": "null" 1341 | } 1342 | ], 1343 | "valueName": "current" 1344 | }, 1345 | { 1346 | "cacheTimeout": null, 1347 | "colorBackground": false, 1348 | "colorValue": false, 1349 | "colors": [ 1350 | "#299c46", 1351 | "rgba(237, 129, 40, 0.89)", 1352 | "#d44a3a" 1353 | ], 1354 | "datasource": { 1355 | "type": "datasource", 1356 | "uid": "grafana" 1357 | }, 1358 | "format": "none", 1359 | "gauge": { 1360 | "maxValue": 100, 1361 | "minValue": 0, 1362 | "show": false, 1363 | "thresholdLabels": false, 1364 | "thresholdMarkers": true 1365 | }, 1366 | "gridPos": { 1367 | "h": 3, 1368 | "w": 2, 1369 | "x": 18, 1370 | "y": 11 1371 | }, 1372 | "id": 52, 1373 | "interval": null, 1374 | "links": [], 1375 | "mappingType": 1, 1376 | "mappingTypes": [ 1377 | { 1378 | "name": "value to text", 1379 | "value": 1 1380 | }, 1381 | { 1382 | "name": "range to text", 1383 | "value": 2 1384 | } 1385 | ], 1386 | "maxDataPoints": 100, 1387 | "nullPointMode": "connected", 1388 | "nullText": null, 1389 | "postfix": "", 1390 | "postfixFontSize": "50%", 1391 | "prefix": "", 1392 | "prefixFontSize": "50%", 1393 | "rangeMaps": [ 1394 | { 1395 | "from": "null", 1396 | "text": "N/A", 1397 | "to": "null" 1398 | } 1399 | ], 1400 | "sparkline": { 1401 | "fillColor": "rgba(31, 118, 189, 0.18)", 1402 | "full": false, 1403 | "lineColor": "rgb(31, 120, 193)", 1404 | "show": false 1405 | }, 1406 | "tableColumn": "", 1407 | "targets": [ 1408 | { 1409 | "expr": "pg_settings_seq_page_cost", 1410 | "format": "time_series", 1411 | "intervalFactor": 1, 1412 | "refId": "A" 1413 | } 1414 | ], 1415 | "thresholds": "", 1416 | "title": "Seq Page Cost", 1417 | "type": "singlestat", 1418 | "valueFontSize": "80%", 1419 | "valueMaps": [ 1420 | { 1421 | "op": "=", 1422 | "text": "N/A", 1423 | "value": "null" 1424 | } 1425 | ], 1426 | "valueName": "current" 1427 | }, 1428 | { 1429 | "cacheTimeout": null, 1430 | "colorBackground": false, 1431 | "colorValue": false, 1432 | "colors": [ 1433 | "#299c46", 1434 | "rgba(237, 129, 40, 0.89)", 1435 | "#d44a3a" 1436 | ], 1437 | "datasource": { 1438 | "type": "datasource", 1439 | "uid": "grafana" 1440 | }, 1441 | "format": "none", 1442 | "gauge": { 1443 | "maxValue": 100, 1444 | "minValue": 0, 1445 | "show": false, 1446 | "thresholdLabels": false, 1447 | "thresholdMarkers": true 1448 | }, 1449 | "gridPos": { 1450 | "h": 3, 1451 | "w": 2, 1452 | "x": 20, 1453 | "y": 11 1454 | }, 1455 | "id": 54, 1456 | "interval": null, 1457 | "links": [], 1458 | "mappingType": 1, 1459 | "mappingTypes": [ 1460 | { 1461 | "name": "value to text", 1462 | "value": 1 1463 | }, 1464 | { 1465 | "name": "range to text", 1466 | "value": 2 1467 | } 1468 | ], 1469 | "maxDataPoints": 100, 1470 | "nullPointMode": "connected", 1471 | "nullText": null, 1472 | "postfix": "", 1473 | "postfixFontSize": "50%", 1474 | "prefix": "", 1475 | "prefixFontSize": "50%", 1476 | "rangeMaps": [ 1477 | { 1478 | "from": "null", 1479 | "text": "N/A", 1480 | "to": "null" 1481 | } 1482 | ], 1483 | "sparkline": { 1484 | "fillColor": "rgba(31, 118, 189, 0.18)", 1485 | "full": false, 1486 | "lineColor": "rgb(31, 120, 193)", 1487 | "show": false 1488 | }, 1489 | "tableColumn": "", 1490 | "targets": [ 1491 | { 1492 | "expr": "pg_settings_max_worker_processes{instance=\"$instance\"}", 1493 | "format": "time_series", 1494 | "intervalFactor": 1, 1495 | "refId": "A" 1496 | } 1497 | ], 1498 | "thresholds": "", 1499 | "title": "Max Worker Processes", 1500 | "type": "singlestat", 1501 | "valueFontSize": "80%", 1502 | "valueMaps": [ 1503 | { 1504 | "op": "=", 1505 | "text": "N/A", 1506 | "value": "null" 1507 | } 1508 | ], 1509 | "valueName": "avg" 1510 | }, 1511 | { 1512 | "cacheTimeout": null, 1513 | "colorBackground": false, 1514 | "colorValue": false, 1515 | "colors": [ 1516 | "#299c46", 1517 | "rgba(237, 129, 40, 0.89)", 1518 | "#d44a3a" 1519 | ], 1520 | "datasource": { 1521 | "type": "datasource", 1522 | "uid": "grafana" 1523 | }, 1524 | "format": "none", 1525 | "gauge": { 1526 | "maxValue": 100, 1527 | "minValue": 0, 1528 | "show": false, 1529 | "thresholdLabels": false, 1530 | "thresholdMarkers": true 1531 | }, 1532 | "gridPos": { 1533 | "h": 3, 1534 | "w": 2, 1535 | "x": 22, 1536 | "y": 11 1537 | }, 1538 | "id": 56, 1539 | "interval": null, 1540 | "links": [], 1541 | "mappingType": 1, 1542 | "mappingTypes": [ 1543 | { 1544 | "name": "value to text", 1545 | "value": 1 1546 | }, 1547 | { 1548 | "name": "range to text", 1549 | "value": 2 1550 | } 1551 | ], 1552 | "maxDataPoints": 100, 1553 | "nullPointMode": "connected", 1554 | "nullText": null, 1555 | "postfix": "", 1556 | "postfixFontSize": "50%", 1557 | "prefix": "", 1558 | "prefixFontSize": "50%", 1559 | "rangeMaps": [ 1560 | { 1561 | "from": "null", 1562 | "text": "N/A", 1563 | "to": "null" 1564 | } 1565 | ], 1566 | "sparkline": { 1567 | "fillColor": "rgba(31, 118, 189, 0.18)", 1568 | "full": false, 1569 | "lineColor": "rgb(31, 120, 193)", 1570 | "show": false 1571 | }, 1572 | "tableColumn": "", 1573 | "targets": [ 1574 | { 1575 | "expr": "pg_settings_max_parallel_workers{instance=\"$instance\"}", 1576 | "format": "time_series", 1577 | "intervalFactor": 1, 1578 | "refId": "A" 1579 | } 1580 | ], 1581 | "thresholds": "", 1582 | "title": "Max Parallel Workers", 1583 | "type": "singlestat", 1584 | "valueFontSize": "80%", 1585 | "valueMaps": [ 1586 | { 1587 | "op": "=", 1588 | "text": "N/A", 1589 | "value": "null" 1590 | } 1591 | ], 1592 | "valueName": "current" 1593 | }, 1594 | { 1595 | "collapsed": false, 1596 | "gridPos": { 1597 | "h": 1, 1598 | "w": 24, 1599 | "x": 0, 1600 | "y": 14 1601 | }, 1602 | "id": 30, 1603 | "panels": [], 1604 | "title": "Database Stats", 1605 | "type": "row" 1606 | }, 1607 | { 1608 | "aliasColors": {}, 1609 | "bars": false, 1610 | "dashLength": 10, 1611 | "dashes": false, 1612 | "datasource": { 1613 | "type": "datasource", 1614 | "uid": "grafana" 1615 | }, 1616 | "fill": 1, 1617 | "gridPos": { 1618 | "h": 7, 1619 | "w": 8, 1620 | "x": 0, 1621 | "y": 15 1622 | }, 1623 | "id": 1, 1624 | "legend": { 1625 | "alignAsTable": true, 1626 | "avg": true, 1627 | "current": true, 1628 | "max": true, 1629 | "min": false, 1630 | "rightSide": true, 1631 | "show": true, 1632 | "sort": "current", 1633 | "sortDesc": true, 1634 | "total": false, 1635 | "values": true 1636 | }, 1637 | "lines": false, 1638 | "linewidth": 1, 1639 | "links": [], 1640 | "nullPointMode": "connected", 1641 | "percentage": false, 1642 | "pointradius": 3, 1643 | "points": true, 1644 | "renderer": "flot", 1645 | "seriesOverrides": [], 1646 | "spaceLength": 10, 1647 | "stack": false, 1648 | "steppedLine": false, 1649 | "targets": [ 1650 | { 1651 | "expr": "pg_stat_activity_count{datname=~\"$datname\", instance=~\"$instance\", state=\"active\"} !=0", 1652 | "format": "time_series", 1653 | "interval": "", 1654 | "intervalFactor": 2, 1655 | "legendFormat": "{{datname}}, s: {{state}}", 1656 | "refId": "A", 1657 | "step": 2 1658 | } 1659 | ], 1660 | "thresholds": [], 1661 | "timeFrom": null, 1662 | "timeShift": null, 1663 | "title": "Active sessions", 1664 | "tooltip": { 1665 | "shared": true, 1666 | "sort": 0, 1667 | "value_type": "individual" 1668 | }, 1669 | "type": "graph", 1670 | "xaxis": { 1671 | "buckets": null, 1672 | "mode": "time", 1673 | "name": null, 1674 | "show": true, 1675 | "values": [] 1676 | }, 1677 | "yaxes": [ 1678 | { 1679 | "decimals": 0, 1680 | "format": "none", 1681 | "label": null, 1682 | "logBase": 1, 1683 | "max": null, 1684 | "min": null, 1685 | "show": true 1686 | }, 1687 | { 1688 | "format": "short", 1689 | "label": null, 1690 | "logBase": 1, 1691 | "max": null, 1692 | "min": null, 1693 | "show": true 1694 | } 1695 | ], 1696 | "yaxis": { 1697 | "align": false, 1698 | "alignLevel": null 1699 | } 1700 | }, 1701 | { 1702 | "aliasColors": {}, 1703 | "bars": false, 1704 | "dashLength": 10, 1705 | "dashes": false, 1706 | "datasource": { 1707 | "type": "datasource", 1708 | "uid": "grafana" 1709 | }, 1710 | "fill": 1, 1711 | "gridPos": { 1712 | "h": 7, 1713 | "w": 8, 1714 | "x": 8, 1715 | "y": 15 1716 | }, 1717 | "id": 60, 1718 | "legend": { 1719 | "alignAsTable": true, 1720 | "avg": true, 1721 | "current": true, 1722 | "max": false, 1723 | "min": false, 1724 | "rightSide": true, 1725 | "show": true, 1726 | "total": true, 1727 | "values": true 1728 | }, 1729 | "lines": true, 1730 | "linewidth": 1, 1731 | "links": [], 1732 | "nullPointMode": "null", 1733 | "percentage": false, 1734 | "pointradius": 5, 1735 | "points": false, 1736 | "renderer": "flot", 1737 | "seriesOverrides": [], 1738 | "spaceLength": 10, 1739 | "stack": false, 1740 | "steppedLine": false, 1741 | "targets": [ 1742 | { 1743 | "expr": "irate(pg_stat_database_xact_commit{instance=\"$instance\", datname=~\"$datname\"}[5m])", 1744 | "format": "time_series", 1745 | "intervalFactor": 1, 1746 | "legendFormat": "{{datname}} commits", 1747 | "refId": "A" 1748 | }, 1749 | { 1750 | "expr": "irate(pg_stat_database_xact_rollback{instance=\"$instance\", datname=~\"$datname\"}[5m])", 1751 | "format": "time_series", 1752 | "intervalFactor": 1, 1753 | "legendFormat": "{{datname}} rollbacks", 1754 | "refId": "B" 1755 | } 1756 | ], 1757 | "thresholds": [], 1758 | "timeFrom": null, 1759 | "timeShift": null, 1760 | "title": "Transactions", 1761 | "tooltip": { 1762 | "shared": true, 1763 | "sort": 0, 1764 | "value_type": "individual" 1765 | }, 1766 | "type": "graph", 1767 | "xaxis": { 1768 | "buckets": null, 1769 | "mode": "time", 1770 | "name": null, 1771 | "show": true, 1772 | "values": [] 1773 | }, 1774 | "yaxes": [ 1775 | { 1776 | "format": "short", 1777 | "label": null, 1778 | "logBase": 1, 1779 | "max": null, 1780 | "min": null, 1781 | "show": true 1782 | }, 1783 | { 1784 | "format": "short", 1785 | "label": null, 1786 | "logBase": 1, 1787 | "max": null, 1788 | "min": null, 1789 | "show": true 1790 | } 1791 | ], 1792 | "yaxis": { 1793 | "align": false, 1794 | "alignLevel": null 1795 | } 1796 | }, 1797 | { 1798 | "aliasColors": {}, 1799 | "bars": false, 1800 | "dashLength": 10, 1801 | "dashes": false, 1802 | "datasource": { 1803 | "type": "datasource", 1804 | "uid": "grafana" 1805 | }, 1806 | "fill": 1, 1807 | "gridPos": { 1808 | "h": 7, 1809 | "w": 8, 1810 | "x": 16, 1811 | "y": 15 1812 | }, 1813 | "id": 8, 1814 | "legend": { 1815 | "alignAsTable": true, 1816 | "avg": true, 1817 | "current": true, 1818 | "max": false, 1819 | "min": false, 1820 | "rightSide": true, 1821 | "show": true, 1822 | "sideWidth": null, 1823 | "sort": "current", 1824 | "sortDesc": true, 1825 | "total": true, 1826 | "values": true 1827 | }, 1828 | "lines": true, 1829 | "linewidth": 1, 1830 | "links": [], 1831 | "nullPointMode": "null", 1832 | "percentage": false, 1833 | "pointradius": 5, 1834 | "points": false, 1835 | "renderer": "flot", 1836 | "seriesOverrides": [], 1837 | "spaceLength": 10, 1838 | "stack": false, 1839 | "steppedLine": false, 1840 | "targets": [ 1841 | { 1842 | "expr": "pg_stat_database_tup_updated{datname=~\"$datname\", instance=~\"$instance\"} != 0", 1843 | "format": "time_series", 1844 | "intervalFactor": 2, 1845 | "legendFormat": "{{datname}}", 1846 | "refId": "A", 1847 | "step": 2 1848 | } 1849 | ], 1850 | "thresholds": [], 1851 | "timeFrom": null, 1852 | "timeShift": null, 1853 | "title": "Update data", 1854 | "tooltip": { 1855 | "shared": true, 1856 | "sort": 0, 1857 | "value_type": "individual" 1858 | }, 1859 | "type": "graph", 1860 | "xaxis": { 1861 | "buckets": null, 1862 | "mode": "time", 1863 | "name": null, 1864 | "show": true, 1865 | "values": [] 1866 | }, 1867 | "yaxes": [ 1868 | { 1869 | "format": "bytes", 1870 | "label": null, 1871 | "logBase": 1, 1872 | "max": null, 1873 | "min": null, 1874 | "show": true 1875 | }, 1876 | { 1877 | "format": "short", 1878 | "label": null, 1879 | "logBase": 1, 1880 | "max": null, 1881 | "min": null, 1882 | "show": true 1883 | } 1884 | ], 1885 | "yaxis": { 1886 | "align": false, 1887 | "alignLevel": null 1888 | } 1889 | }, 1890 | { 1891 | "aliasColors": {}, 1892 | "bars": false, 1893 | "dashLength": 10, 1894 | "dashes": false, 1895 | "datasource": { 1896 | "type": "datasource", 1897 | "uid": "grafana" 1898 | }, 1899 | "fill": 1, 1900 | "gridPos": { 1901 | "h": 7, 1902 | "w": 8, 1903 | "x": 0, 1904 | "y": 22 1905 | }, 1906 | "id": 5, 1907 | "legend": { 1908 | "alignAsTable": true, 1909 | "avg": true, 1910 | "current": true, 1911 | "max": false, 1912 | "min": false, 1913 | "rightSide": true, 1914 | "show": true, 1915 | "sort": "current", 1916 | "sortDesc": true, 1917 | "total": true, 1918 | "values": true 1919 | }, 1920 | "lines": true, 1921 | "linewidth": 1, 1922 | "links": [], 1923 | "nullPointMode": "null", 1924 | "percentage": false, 1925 | "pointradius": 5, 1926 | "points": false, 1927 | "renderer": "flot", 1928 | "seriesOverrides": [], 1929 | "spaceLength": 10, 1930 | "stack": false, 1931 | "steppedLine": false, 1932 | "targets": [ 1933 | { 1934 | "expr": "pg_stat_database_tup_fetched{datname=~\"$datname\", instance=~\"$instance\"} != 0", 1935 | "format": "time_series", 1936 | "intervalFactor": 2, 1937 | "legendFormat": "{{datname}}", 1938 | "refId": "A", 1939 | "step": 2 1940 | } 1941 | ], 1942 | "thresholds": [], 1943 | "timeFrom": null, 1944 | "timeShift": null, 1945 | "title": "Fetch data (SELECT)", 1946 | "tooltip": { 1947 | "shared": true, 1948 | "sort": 0, 1949 | "value_type": "individual" 1950 | }, 1951 | "type": "graph", 1952 | "xaxis": { 1953 | "buckets": null, 1954 | "mode": "time", 1955 | "name": null, 1956 | "show": true, 1957 | "values": [] 1958 | }, 1959 | "yaxes": [ 1960 | { 1961 | "format": "bytes", 1962 | "label": null, 1963 | "logBase": 1, 1964 | "max": null, 1965 | "min": null, 1966 | "show": true 1967 | }, 1968 | { 1969 | "format": "short", 1970 | "label": null, 1971 | "logBase": 1, 1972 | "max": null, 1973 | "min": null, 1974 | "show": true 1975 | } 1976 | ], 1977 | "yaxis": { 1978 | "align": false, 1979 | "alignLevel": null 1980 | } 1981 | }, 1982 | { 1983 | "aliasColors": {}, 1984 | "bars": false, 1985 | "dashLength": 10, 1986 | "dashes": false, 1987 | "datasource": { 1988 | "type": "datasource", 1989 | "uid": "grafana" 1990 | }, 1991 | "fill": 1, 1992 | "gridPos": { 1993 | "h": 7, 1994 | "w": 8, 1995 | "x": 8, 1996 | "y": 22 1997 | }, 1998 | "id": 6, 1999 | "legend": { 2000 | "alignAsTable": true, 2001 | "avg": true, 2002 | "current": true, 2003 | "max": false, 2004 | "min": false, 2005 | "rightSide": true, 2006 | "show": true, 2007 | "sort": "current", 2008 | "sortDesc": true, 2009 | "total": true, 2010 | "values": true 2011 | }, 2012 | "lines": true, 2013 | "linewidth": 1, 2014 | "links": [], 2015 | "nullPointMode": "null", 2016 | "percentage": false, 2017 | "pointradius": 5, 2018 | "points": false, 2019 | "renderer": "flot", 2020 | "seriesOverrides": [], 2021 | "spaceLength": 10, 2022 | "stack": false, 2023 | "steppedLine": false, 2024 | "targets": [ 2025 | { 2026 | "expr": "pg_stat_database_tup_inserted{datname=~\"$datname\", instance=~\"$instance\"} != 0", 2027 | "format": "time_series", 2028 | "intervalFactor": 2, 2029 | "legendFormat": "{{datname}}", 2030 | "refId": "A", 2031 | "step": 2 2032 | } 2033 | ], 2034 | "thresholds": [], 2035 | "timeFrom": null, 2036 | "timeShift": null, 2037 | "title": "Insert data", 2038 | "tooltip": { 2039 | "shared": true, 2040 | "sort": 0, 2041 | "value_type": "individual" 2042 | }, 2043 | "type": "graph", 2044 | "xaxis": { 2045 | "buckets": null, 2046 | "mode": "time", 2047 | "name": null, 2048 | "show": true, 2049 | "values": [] 2050 | }, 2051 | "yaxes": [ 2052 | { 2053 | "format": "bytes", 2054 | "label": null, 2055 | "logBase": 1, 2056 | "max": null, 2057 | "min": null, 2058 | "show": true 2059 | }, 2060 | { 2061 | "format": "short", 2062 | "label": null, 2063 | "logBase": 1, 2064 | "max": null, 2065 | "min": null, 2066 | "show": true 2067 | } 2068 | ], 2069 | "yaxis": { 2070 | "align": false, 2071 | "alignLevel": null 2072 | } 2073 | }, 2074 | { 2075 | "aliasColors": {}, 2076 | "bars": false, 2077 | "dashLength": 10, 2078 | "dashes": false, 2079 | "datasource": { 2080 | "type": "datasource", 2081 | "uid": "grafana" 2082 | }, 2083 | "decimals": 0, 2084 | "fill": 1, 2085 | "gridPos": { 2086 | "h": 7, 2087 | "w": 8, 2088 | "x": 16, 2089 | "y": 22 2090 | }, 2091 | "id": 3, 2092 | "legend": { 2093 | "alignAsTable": true, 2094 | "avg": true, 2095 | "current": true, 2096 | "hideEmpty": false, 2097 | "max": false, 2098 | "min": false, 2099 | "rightSide": true, 2100 | "show": true, 2101 | "sort": "current", 2102 | "sortDesc": true, 2103 | "total": true, 2104 | "values": true 2105 | }, 2106 | "lines": true, 2107 | "linewidth": 1, 2108 | "links": [], 2109 | "nullPointMode": "null", 2110 | "percentage": false, 2111 | "pointradius": 5, 2112 | "points": false, 2113 | "renderer": "flot", 2114 | "seriesOverrides": [], 2115 | "spaceLength": 10, 2116 | "stack": false, 2117 | "steppedLine": false, 2118 | "targets": [ 2119 | { 2120 | "expr": "pg_locks_count{datname=~\"$datname\", instance=~\"$instance\", mode=~\"$mode\"} != 0", 2121 | "format": "time_series", 2122 | "intervalFactor": 2, 2123 | "legendFormat": "{{datname}},{{mode}}", 2124 | "refId": "A", 2125 | "step": 2 2126 | } 2127 | ], 2128 | "thresholds": [], 2129 | "timeFrom": null, 2130 | "timeShift": null, 2131 | "title": "Lock tables", 2132 | "tooltip": { 2133 | "shared": true, 2134 | "sort": 0, 2135 | "value_type": "individual" 2136 | }, 2137 | "type": "graph", 2138 | "xaxis": { 2139 | "buckets": null, 2140 | "mode": "time", 2141 | "name": null, 2142 | "show": true, 2143 | "values": [] 2144 | }, 2145 | "yaxes": [ 2146 | { 2147 | "decimals": 0, 2148 | "format": "short", 2149 | "label": null, 2150 | "logBase": 1, 2151 | "max": null, 2152 | "min": "0", 2153 | "show": true 2154 | }, 2155 | { 2156 | "format": "short", 2157 | "label": null, 2158 | "logBase": 1, 2159 | "max": null, 2160 | "min": null, 2161 | "show": true 2162 | } 2163 | ], 2164 | "yaxis": { 2165 | "align": false, 2166 | "alignLevel": null 2167 | } 2168 | }, 2169 | { 2170 | "aliasColors": {}, 2171 | "bars": false, 2172 | "dashLength": 10, 2173 | "dashes": false, 2174 | "datasource": { 2175 | "type": "datasource", 2176 | "uid": "grafana" 2177 | }, 2178 | "fill": 1, 2179 | "gridPos": { 2180 | "h": 7, 2181 | "w": 8, 2182 | "x": 0, 2183 | "y": 29 2184 | }, 2185 | "id": 14, 2186 | "legend": { 2187 | "alignAsTable": true, 2188 | "avg": true, 2189 | "current": true, 2190 | "max": false, 2191 | "min": false, 2192 | "rightSide": true, 2193 | "show": true, 2194 | "sort": "total", 2195 | "sortDesc": true, 2196 | "total": true, 2197 | "values": true 2198 | }, 2199 | "lines": true, 2200 | "linewidth": 1, 2201 | "links": [], 2202 | "nullPointMode": "null", 2203 | "percentage": false, 2204 | "pointradius": 5, 2205 | "points": false, 2206 | "renderer": "flot", 2207 | "seriesOverrides": [], 2208 | "spaceLength": 10, 2209 | "stack": false, 2210 | "steppedLine": false, 2211 | "targets": [ 2212 | { 2213 | "expr": "pg_stat_database_tup_returned{datname=~\"$datname\", instance=~\"$instance\"} != 0", 2214 | "format": "time_series", 2215 | "intervalFactor": 2, 2216 | "legendFormat": "{{datname}}", 2217 | "refId": "A", 2218 | "step": 2 2219 | } 2220 | ], 2221 | "thresholds": [], 2222 | "timeFrom": null, 2223 | "timeShift": null, 2224 | "title": "Return data", 2225 | "tooltip": { 2226 | "shared": true, 2227 | "sort": 0, 2228 | "value_type": "individual" 2229 | }, 2230 | "type": "graph", 2231 | "xaxis": { 2232 | "buckets": null, 2233 | "mode": "time", 2234 | "name": null, 2235 | "show": true, 2236 | "values": [] 2237 | }, 2238 | "yaxes": [ 2239 | { 2240 | "format": "bytes", 2241 | "label": null, 2242 | "logBase": 1, 2243 | "max": null, 2244 | "min": null, 2245 | "show": true 2246 | }, 2247 | { 2248 | "format": "short", 2249 | "label": null, 2250 | "logBase": 1, 2251 | "max": null, 2252 | "min": null, 2253 | "show": true 2254 | } 2255 | ], 2256 | "yaxis": { 2257 | "align": false, 2258 | "alignLevel": null 2259 | } 2260 | }, 2261 | { 2262 | "aliasColors": {}, 2263 | "bars": false, 2264 | "dashLength": 10, 2265 | "dashes": false, 2266 | "datasource": { 2267 | "type": "datasource", 2268 | "uid": "grafana" 2269 | }, 2270 | "fill": 1, 2271 | "gridPos": { 2272 | "h": 7, 2273 | "w": 8, 2274 | "x": 8, 2275 | "y": 29 2276 | }, 2277 | "id": 4, 2278 | "legend": { 2279 | "alignAsTable": true, 2280 | "avg": false, 2281 | "current": true, 2282 | "max": true, 2283 | "min": false, 2284 | "rightSide": true, 2285 | "show": true, 2286 | "sort": "current", 2287 | "sortDesc": false, 2288 | "total": false, 2289 | "values": true 2290 | }, 2291 | "lines": true, 2292 | "linewidth": 1, 2293 | "links": [], 2294 | "nullPointMode": "null", 2295 | "percentage": false, 2296 | "pointradius": 5, 2297 | "points": false, 2298 | "renderer": "flot", 2299 | "seriesOverrides": [], 2300 | "spaceLength": 10, 2301 | "stack": false, 2302 | "steppedLine": false, 2303 | "targets": [ 2304 | { 2305 | "expr": "pg_stat_activity_count{datname=~\"$datname\", instance=~\"$instance\", state=~\"idle|idle in transaction|idle in transaction (aborted)\"}", 2306 | "format": "time_series", 2307 | "intervalFactor": 2, 2308 | "legendFormat": "{{datname}}, s: {{state}}", 2309 | "refId": "A", 2310 | "step": 2 2311 | } 2312 | ], 2313 | "thresholds": [], 2314 | "timeFrom": null, 2315 | "timeShift": null, 2316 | "title": "Idle sessions", 2317 | "tooltip": { 2318 | "shared": true, 2319 | "sort": 0, 2320 | "value_type": "individual" 2321 | }, 2322 | "type": "graph", 2323 | "xaxis": { 2324 | "buckets": null, 2325 | "mode": "time", 2326 | "name": null, 2327 | "show": true, 2328 | "values": [] 2329 | }, 2330 | "yaxes": [ 2331 | { 2332 | "format": "short", 2333 | "label": null, 2334 | "logBase": 1, 2335 | "max": null, 2336 | "min": "0", 2337 | "show": true 2338 | }, 2339 | { 2340 | "format": "short", 2341 | "label": null, 2342 | "logBase": 1, 2343 | "max": null, 2344 | "min": null, 2345 | "show": true 2346 | } 2347 | ], 2348 | "yaxis": { 2349 | "align": false, 2350 | "alignLevel": null 2351 | } 2352 | }, 2353 | { 2354 | "aliasColors": {}, 2355 | "bars": false, 2356 | "dashLength": 10, 2357 | "dashes": false, 2358 | "datasource": { 2359 | "type": "datasource", 2360 | "uid": "grafana" 2361 | }, 2362 | "fill": 1, 2363 | "gridPos": { 2364 | "h": 7, 2365 | "w": 8, 2366 | "x": 16, 2367 | "y": 29 2368 | }, 2369 | "id": 7, 2370 | "legend": { 2371 | "alignAsTable": true, 2372 | "avg": true, 2373 | "current": true, 2374 | "max": false, 2375 | "min": false, 2376 | "rightSide": true, 2377 | "show": true, 2378 | "sort": "current", 2379 | "sortDesc": true, 2380 | "total": true, 2381 | "values": true 2382 | }, 2383 | "lines": true, 2384 | "linewidth": 1, 2385 | "links": [], 2386 | "nullPointMode": "null", 2387 | "percentage": false, 2388 | "pointradius": 5, 2389 | "points": false, 2390 | "renderer": "flot", 2391 | "seriesOverrides": [], 2392 | "spaceLength": 10, 2393 | "stack": false, 2394 | "steppedLine": false, 2395 | "targets": [ 2396 | { 2397 | "expr": "pg_stat_database_tup_deleted{datname=~\"$datname\", instance=~\"$instance\"} != 0", 2398 | "format": "time_series", 2399 | "intervalFactor": 2, 2400 | "legendFormat": "{{datname}}", 2401 | "refId": "A", 2402 | "step": 2 2403 | } 2404 | ], 2405 | "thresholds": [], 2406 | "timeFrom": null, 2407 | "timeShift": null, 2408 | "title": "Delete data", 2409 | "tooltip": { 2410 | "shared": true, 2411 | "sort": 0, 2412 | "value_type": "individual" 2413 | }, 2414 | "type": "graph", 2415 | "xaxis": { 2416 | "buckets": null, 2417 | "mode": "time", 2418 | "name": null, 2419 | "show": true, 2420 | "values": [] 2421 | }, 2422 | "yaxes": [ 2423 | { 2424 | "format": "bytes", 2425 | "label": null, 2426 | "logBase": 1, 2427 | "max": null, 2428 | "min": null, 2429 | "show": true 2430 | }, 2431 | { 2432 | "format": "short", 2433 | "label": null, 2434 | "logBase": 1, 2435 | "max": null, 2436 | "min": null, 2437 | "show": true 2438 | } 2439 | ], 2440 | "yaxis": { 2441 | "align": false, 2442 | "alignLevel": null 2443 | } 2444 | }, 2445 | { 2446 | "aliasColors": {}, 2447 | "bars": false, 2448 | "dashLength": 10, 2449 | "dashes": false, 2450 | "datasource": { 2451 | "type": "datasource", 2452 | "uid": "grafana" 2453 | }, 2454 | "decimals": 2, 2455 | "fill": 1, 2456 | "gridPos": { 2457 | "h": 7, 2458 | "w": 8, 2459 | "x": 0, 2460 | "y": 36 2461 | }, 2462 | "id": 62, 2463 | "legend": { 2464 | "alignAsTable": true, 2465 | "avg": true, 2466 | "current": true, 2467 | "max": false, 2468 | "min": false, 2469 | "rightSide": true, 2470 | "show": true, 2471 | "total": false, 2472 | "values": true 2473 | }, 2474 | "lines": true, 2475 | "linewidth": 1, 2476 | "links": [], 2477 | "nullPointMode": "null", 2478 | "percentage": false, 2479 | "pointradius": 5, 2480 | "points": false, 2481 | "renderer": "flot", 2482 | "seriesOverrides": [], 2483 | "spaceLength": 10, 2484 | "stack": false, 2485 | "steppedLine": false, 2486 | "targets": [ 2487 | { 2488 | "expr": "pg_stat_database_blks_hit{instance=\"$instance\", datname=~\"$datname\"} / (pg_stat_database_blks_read{instance=\"$instance\", datname=~\"$datname\"} + pg_stat_database_blks_hit{instance=\"$instance\", datname=~\"$datname\"})", 2489 | "format": "time_series", 2490 | "intervalFactor": 1, 2491 | "legendFormat": "{{ datname }}", 2492 | "refId": "A" 2493 | } 2494 | ], 2495 | "thresholds": [], 2496 | "timeFrom": null, 2497 | "timeShift": null, 2498 | "title": "Cache Hit Rate", 2499 | "tooltip": { 2500 | "shared": true, 2501 | "sort": 0, 2502 | "value_type": "individual" 2503 | }, 2504 | "type": "graph", 2505 | "xaxis": { 2506 | "buckets": null, 2507 | "mode": "time", 2508 | "name": null, 2509 | "show": true, 2510 | "values": [] 2511 | }, 2512 | "yaxes": [ 2513 | { 2514 | "decimals": 4, 2515 | "format": "percentunit", 2516 | "label": "", 2517 | "logBase": 1, 2518 | "max": null, 2519 | "min": null, 2520 | "show": true 2521 | }, 2522 | { 2523 | "format": "short", 2524 | "label": null, 2525 | "logBase": 1, 2526 | "max": null, 2527 | "min": null, 2528 | "show": true 2529 | } 2530 | ], 2531 | "yaxis": { 2532 | "align": false, 2533 | "alignLevel": null 2534 | } 2535 | }, 2536 | { 2537 | "aliasColors": {}, 2538 | "bars": false, 2539 | "dashLength": 10, 2540 | "dashes": false, 2541 | "datasource": { 2542 | "type": "datasource", 2543 | "uid": "grafana" 2544 | }, 2545 | "fill": 1, 2546 | "gridPos": { 2547 | "h": 7, 2548 | "w": 8, 2549 | "x": 8, 2550 | "y": 36 2551 | }, 2552 | "id": 64, 2553 | "legend": { 2554 | "alignAsTable": true, 2555 | "avg": true, 2556 | "current": true, 2557 | "max": true, 2558 | "min": true, 2559 | "rightSide": true, 2560 | "show": true, 2561 | "total": false, 2562 | "values": true 2563 | }, 2564 | "lines": true, 2565 | "linewidth": 1, 2566 | "links": [], 2567 | "nullPointMode": "null", 2568 | "percentage": false, 2569 | "pointradius": 5, 2570 | "points": false, 2571 | "renderer": "flot", 2572 | "seriesOverrides": [], 2573 | "spaceLength": 10, 2574 | "stack": false, 2575 | "steppedLine": false, 2576 | "targets": [ 2577 | { 2578 | "expr": "irate(pg_stat_bgwriter_buffers_backend{instance=\"$instance\"}[5m])", 2579 | "format": "time_series", 2580 | "intervalFactor": 1, 2581 | "legendFormat": "buffers_backend", 2582 | "refId": "A" 2583 | }, 2584 | { 2585 | "expr": "irate(pg_stat_bgwriter_buffers_alloc{instance=\"$instance\"}[5m])", 2586 | "format": "time_series", 2587 | "intervalFactor": 1, 2588 | "legendFormat": "buffers_alloc", 2589 | "refId": "B" 2590 | }, 2591 | { 2592 | "expr": "irate(pg_stat_bgwriter_buffers_backend_fsync{instance=\"$instance\"}[5m])", 2593 | "format": "time_series", 2594 | "intervalFactor": 1, 2595 | "legendFormat": "backend_fsync", 2596 | "refId": "C" 2597 | }, 2598 | { 2599 | "expr": "irate(pg_stat_bgwriter_buffers_checkpoint{instance=\"$instance\"}[5m])", 2600 | "format": "time_series", 2601 | "intervalFactor": 1, 2602 | "legendFormat": "buffers_checkpoint", 2603 | "refId": "D" 2604 | }, 2605 | { 2606 | "expr": "irate(pg_stat_bgwriter_buffers_clean{instance=\"$instance\"}[5m])", 2607 | "format": "time_series", 2608 | "intervalFactor": 1, 2609 | "legendFormat": "buffers_clean", 2610 | "refId": "E" 2611 | } 2612 | ], 2613 | "thresholds": [], 2614 | "timeFrom": null, 2615 | "timeShift": null, 2616 | "title": "Buffers (bgwriter)", 2617 | "tooltip": { 2618 | "shared": true, 2619 | "sort": 0, 2620 | "value_type": "individual" 2621 | }, 2622 | "type": "graph", 2623 | "xaxis": { 2624 | "buckets": null, 2625 | "mode": "time", 2626 | "name": null, 2627 | "show": true, 2628 | "values": [] 2629 | }, 2630 | "yaxes": [ 2631 | { 2632 | "format": "short", 2633 | "label": null, 2634 | "logBase": 1, 2635 | "max": null, 2636 | "min": null, 2637 | "show": true 2638 | }, 2639 | { 2640 | "format": "short", 2641 | "label": null, 2642 | "logBase": 1, 2643 | "max": null, 2644 | "min": null, 2645 | "show": true 2646 | } 2647 | ], 2648 | "yaxis": { 2649 | "align": false, 2650 | "alignLevel": null 2651 | } 2652 | }, 2653 | { 2654 | "aliasColors": {}, 2655 | "bars": false, 2656 | "dashLength": 10, 2657 | "dashes": false, 2658 | "datasource": { 2659 | "type": "datasource", 2660 | "uid": "grafana" 2661 | }, 2662 | "decimals": 0, 2663 | "fill": 1, 2664 | "gridPos": { 2665 | "h": 7, 2666 | "w": 8, 2667 | "x": 16, 2668 | "y": 36 2669 | }, 2670 | "id": 66, 2671 | "legend": { 2672 | "alignAsTable": true, 2673 | "avg": true, 2674 | "current": true, 2675 | "max": false, 2676 | "min": false, 2677 | "rightSide": true, 2678 | "show": true, 2679 | "total": true, 2680 | "values": true 2681 | }, 2682 | "lines": true, 2683 | "linewidth": 1, 2684 | "links": [], 2685 | "nullPointMode": "null", 2686 | "percentage": false, 2687 | "pointradius": 5, 2688 | "points": false, 2689 | "renderer": "flot", 2690 | "seriesOverrides": [], 2691 | "spaceLength": 10, 2692 | "stack": false, 2693 | "steppedLine": false, 2694 | "targets": [ 2695 | { 2696 | "expr": "irate(pg_stat_database_conflicts{instance=\"$instance\", datname=~\"$datname\"}[5m])", 2697 | "format": "time_series", 2698 | "intervalFactor": 1, 2699 | "legendFormat": "{{datname}} conflicts", 2700 | "refId": "B" 2701 | }, 2702 | { 2703 | "expr": "irate(pg_stat_database_deadlocks{instance=\"$instance\", datname=~\"$datname\"}[5m])", 2704 | "format": "time_series", 2705 | "intervalFactor": 1, 2706 | "legendFormat": "{{datname}} deadlocks", 2707 | "refId": "A" 2708 | } 2709 | ], 2710 | "thresholds": [], 2711 | "timeFrom": null, 2712 | "timeShift": null, 2713 | "title": "Conflicts/Deadlocks", 2714 | "tooltip": { 2715 | "shared": true, 2716 | "sort": 0, 2717 | "value_type": "individual" 2718 | }, 2719 | "type": "graph", 2720 | "xaxis": { 2721 | "buckets": null, 2722 | "mode": "time", 2723 | "name": null, 2724 | "show": true, 2725 | "values": [] 2726 | }, 2727 | "yaxes": [ 2728 | { 2729 | "format": "short", 2730 | "label": null, 2731 | "logBase": 1, 2732 | "max": null, 2733 | "min": "0", 2734 | "show": true 2735 | }, 2736 | { 2737 | "format": "short", 2738 | "label": null, 2739 | "logBase": 1, 2740 | "max": null, 2741 | "min": null, 2742 | "show": true 2743 | } 2744 | ], 2745 | "yaxis": { 2746 | "align": false, 2747 | "alignLevel": null 2748 | } 2749 | }, 2750 | { 2751 | "aliasColors": {}, 2752 | "bars": false, 2753 | "dashLength": 10, 2754 | "dashes": false, 2755 | "datasource": { 2756 | "type": "datasource", 2757 | "uid": "grafana" 2758 | }, 2759 | "description": "Total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.", 2760 | "fill": 1, 2761 | "gridPos": { 2762 | "h": 7, 2763 | "w": 8, 2764 | "x": 0, 2765 | "y": 43 2766 | }, 2767 | "id": 68, 2768 | "legend": { 2769 | "alignAsTable": true, 2770 | "avg": true, 2771 | "current": true, 2772 | "max": false, 2773 | "min": false, 2774 | "rightSide": true, 2775 | "show": true, 2776 | "total": true, 2777 | "values": true 2778 | }, 2779 | "lines": true, 2780 | "linewidth": 1, 2781 | "links": [], 2782 | "nullPointMode": "null", 2783 | "percentage": false, 2784 | "pointradius": 5, 2785 | "points": false, 2786 | "renderer": "flot", 2787 | "seriesOverrides": [], 2788 | "spaceLength": 10, 2789 | "stack": false, 2790 | "steppedLine": false, 2791 | "targets": [ 2792 | { 2793 | "expr": "irate(pg_stat_database_temp_bytes{instance=\"$instance\", datname=~\"$datname\"}[5m])", 2794 | "format": "time_series", 2795 | "intervalFactor": 1, 2796 | "legendFormat": "{{datname}}", 2797 | "refId": "A" 2798 | } 2799 | ], 2800 | "thresholds": [], 2801 | "timeFrom": null, 2802 | "timeShift": null, 2803 | "title": "Temp File (Bytes)", 2804 | "tooltip": { 2805 | "shared": true, 2806 | "sort": 0, 2807 | "value_type": "individual" 2808 | }, 2809 | "type": "graph", 2810 | "xaxis": { 2811 | "buckets": null, 2812 | "mode": "time", 2813 | "name": null, 2814 | "show": true, 2815 | "values": [] 2816 | }, 2817 | "yaxes": [ 2818 | { 2819 | "format": "bytes", 2820 | "label": null, 2821 | "logBase": 1, 2822 | "max": null, 2823 | "min": "0", 2824 | "show": true 2825 | }, 2826 | { 2827 | "format": "short", 2828 | "label": null, 2829 | "logBase": 1, 2830 | "max": null, 2831 | "min": null, 2832 | "show": true 2833 | } 2834 | ], 2835 | "yaxis": { 2836 | "align": false, 2837 | "alignLevel": null 2838 | } 2839 | }, 2840 | { 2841 | "aliasColors": {}, 2842 | "bars": false, 2843 | "dashLength": 10, 2844 | "dashes": false, 2845 | "datasource": { 2846 | "type": "datasource", 2847 | "uid": "grafana" 2848 | }, 2849 | "fill": 1, 2850 | "gridPos": { 2851 | "h": 7, 2852 | "w": 16, 2853 | "x": 8, 2854 | "y": 43 2855 | }, 2856 | "id": 70, 2857 | "legend": { 2858 | "alignAsTable": true, 2859 | "avg": true, 2860 | "current": true, 2861 | "max": true, 2862 | "min": true, 2863 | "show": true, 2864 | "total": false, 2865 | "values": true 2866 | }, 2867 | "lines": true, 2868 | "linewidth": 1, 2869 | "links": [], 2870 | "nullPointMode": "null", 2871 | "percentage": false, 2872 | "pointradius": 5, 2873 | "points": false, 2874 | "renderer": "flot", 2875 | "seriesOverrides": [], 2876 | "spaceLength": 10, 2877 | "stack": false, 2878 | "steppedLine": false, 2879 | "targets": [ 2880 | { 2881 | "expr": "irate(pg_stat_bgwriter_checkpoint_write_time{instance=\"$instance\"}[5m])", 2882 | "format": "time_series", 2883 | "intervalFactor": 1, 2884 | "legendFormat": "write_time - Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk.", 2885 | "refId": "B" 2886 | }, 2887 | { 2888 | "expr": "irate(pg_stat_bgwriter_checkpoint_sync_time{instance=\"$instance\"}[5m])", 2889 | "format": "time_series", 2890 | "intervalFactor": 1, 2891 | "legendFormat": "sync_time - Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk.", 2892 | "refId": "A" 2893 | } 2894 | ], 2895 | "thresholds": [], 2896 | "timeFrom": null, 2897 | "timeShift": null, 2898 | "title": "Checkpoint Stats", 2899 | "tooltip": { 2900 | "shared": true, 2901 | "sort": 0, 2902 | "value_type": "individual" 2903 | }, 2904 | "type": "graph", 2905 | "xaxis": { 2906 | "buckets": null, 2907 | "mode": "time", 2908 | "name": null, 2909 | "show": true, 2910 | "values": [] 2911 | }, 2912 | "yaxes": [ 2913 | { 2914 | "format": "ms", 2915 | "label": null, 2916 | "logBase": 1, 2917 | "max": null, 2918 | "min": null, 2919 | "show": true 2920 | }, 2921 | { 2922 | "format": "short", 2923 | "label": null, 2924 | "logBase": 1, 2925 | "max": null, 2926 | "min": null, 2927 | "show": true 2928 | } 2929 | ], 2930 | "yaxis": { 2931 | "align": false, 2932 | "alignLevel": null 2933 | } 2934 | } 2935 | ], 2936 | "refresh": "10s", 2937 | "schemaVersion": 16, 2938 | "style": "dark", 2939 | "tags": [ 2940 | "postgres", 2941 | "db", 2942 | "stats" 2943 | ], 2944 | "templating": { 2945 | "list": [ 2946 | { 2947 | "auto": true, 2948 | "auto_count": 200, 2949 | "auto_min": "1s", 2950 | "current": { 2951 | "text": "auto", 2952 | "value": "$__auto_interval_interval" 2953 | }, 2954 | "hide": 0, 2955 | "label": "Interval", 2956 | "name": "interval", 2957 | "options": [ 2958 | { 2959 | "selected": true, 2960 | "text": "auto", 2961 | "value": "$__auto_interval_interval" 2962 | }, 2963 | { 2964 | "selected": false, 2965 | "text": "1s", 2966 | "value": "1s" 2967 | }, 2968 | { 2969 | "selected": false, 2970 | "text": "5s", 2971 | "value": "5s" 2972 | }, 2973 | { 2974 | "selected": false, 2975 | "text": "1m", 2976 | "value": "1m" 2977 | }, 2978 | { 2979 | "selected": false, 2980 | "text": "5m", 2981 | "value": "5m" 2982 | }, 2983 | { 2984 | "selected": false, 2985 | "text": "1h", 2986 | "value": "1h" 2987 | }, 2988 | { 2989 | "selected": false, 2990 | "text": "6h", 2991 | "value": "6h" 2992 | }, 2993 | { 2994 | "selected": false, 2995 | "text": "1d", 2996 | "value": "1d" 2997 | } 2998 | ], 2999 | "query": "1s,5s,1m,5m,1h,6h,1d", 3000 | "refresh": 2, 3001 | "type": "interval" 3002 | }, 3003 | { 3004 | "allValue": null, 3005 | "current": {}, 3006 | "datasource": { 3007 | "type": "datasource", 3008 | "uid": "grafana" 3009 | }, 3010 | "hide": 0, 3011 | "includeAll": false, 3012 | "label": "Namespace", 3013 | "multi": false, 3014 | "name": "namespace", 3015 | "options": [], 3016 | "query": "query_result(pg_exporter_last_scrape_duration_seconds)", 3017 | "refresh": 2, 3018 | "regex": "/.*kubernetes_namespace=\"([^\"]+).*/", 3019 | "sort": 1, 3020 | "tagValuesQuery": "", 3021 | "tags": [], 3022 | "tagsQuery": "", 3023 | "type": "query", 3024 | "useTags": false 3025 | }, 3026 | { 3027 | "allValue": null, 3028 | "current": {}, 3029 | "datasource": { 3030 | "type": "datasource", 3031 | "uid": "grafana" 3032 | }, 3033 | "hide": 0, 3034 | "includeAll": false, 3035 | "label": "Release", 3036 | "multi": false, 3037 | "name": "release", 3038 | "options": [], 3039 | "query": "query_result(pg_exporter_last_scrape_duration_seconds{kubernetes_namespace=\"$namespace\"})", 3040 | "refresh": 2, 3041 | "regex": "/.*release=\"([^\"]+)/", 3042 | "sort": 1, 3043 | "tagValuesQuery": "", 3044 | "tags": [], 3045 | "tagsQuery": "", 3046 | "type": "query", 3047 | "useTags": false 3048 | }, 3049 | { 3050 | "allValue": null, 3051 | "current": {}, 3052 | "datasource": { 3053 | "type": "datasource", 3054 | "uid": "grafana" 3055 | }, 3056 | "hide": 0, 3057 | "includeAll": false, 3058 | "label": "Instance", 3059 | "multi": false, 3060 | "name": "instance", 3061 | "options": [], 3062 | "query": "query_result(up{release=\"$release\"})", 3063 | "refresh": 1, 3064 | "regex": "/.*instance=\"([^\"]+).*/", 3065 | "sort": 1, 3066 | "tagValuesQuery": "", 3067 | "tags": [], 3068 | "tagsQuery": "", 3069 | "type": "query", 3070 | "useTags": false 3071 | }, 3072 | { 3073 | "allValue": null, 3074 | "current": {}, 3075 | "datasource": { 3076 | "type": "datasource", 3077 | "uid": "grafana" 3078 | }, 3079 | "hide": 0, 3080 | "includeAll": true, 3081 | "label": "Database", 3082 | "multi": true, 3083 | "name": "datname", 3084 | "options": [], 3085 | "query": "label_values(datname)", 3086 | "refresh": 1, 3087 | "regex": "", 3088 | "sort": 1, 3089 | "tagValuesQuery": "", 3090 | "tags": [], 3091 | "tagsQuery": "", 3092 | "type": "query", 3093 | "useTags": false 3094 | }, 3095 | { 3096 | "allValue": null, 3097 | "current": {}, 3098 | "datasource": { 3099 | "type": "datasource", 3100 | "uid": "grafana" 3101 | }, 3102 | "hide": 0, 3103 | "includeAll": true, 3104 | "label": "Lock table", 3105 | "multi": true, 3106 | "name": "mode", 3107 | "options": [], 3108 | "query": "label_values({mode=~\"accessexclusivelock|accesssharelock|exclusivelock|rowexclusivelock|rowsharelock|sharelock|sharerowexclusivelock|shareupdateexclusivelock\"}, mode)", 3109 | "refresh": 1, 3110 | "regex": "", 3111 | "sort": 0, 3112 | "tagValuesQuery": "", 3113 | "tags": [], 3114 | "tagsQuery": "", 3115 | "type": "query", 3116 | "useTags": false 3117 | } 3118 | ] 3119 | }, 3120 | "time": { 3121 | "from": "now-6h", 3122 | "to": "now" 3123 | }, 3124 | "timepicker": { 3125 | "refresh_intervals": [ 3126 | "5s", 3127 | "10s", 3128 | "30s", 3129 | "1m", 3130 | "5m", 3131 | "15m", 3132 | "30m", 3133 | "1h", 3134 | "2h", 3135 | "1d" 3136 | ], 3137 | "time_options": [ 3138 | "5m", 3139 | "15m", 3140 | "1h", 3141 | "6h", 3142 | "12h", 3143 | "24h", 3144 | "2d", 3145 | "7d", 3146 | "30d" 3147 | ] 3148 | }, 3149 | "timezone": "", 3150 | "title": "PostgreSQL Database", 3151 | "uid": "000000039", 3152 | "version": 13 3153 | } -------------------------------------------------------------------------------- /deployment/grafana/dashboards/sdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "-- Grafana --", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "target": { 12 | "limit": 100, 13 | "matchAny": false, 14 | "tags": [], 15 | "type": "dashboard" 16 | }, 17 | "type": "dashboard" 18 | } 19 | ] 20 | }, 21 | "editable": true, 22 | "fiscalYearStartMonth": 0, 23 | "graphTooltip": 0, 24 | "id": 1, 25 | "iteration": 1642562334429, 26 | "links": [], 27 | "liveNow": false, 28 | "panels": [ 29 | { 30 | "collapsed": false, 31 | "gridPos": { 32 | "h": 1, 33 | "w": 24, 34 | "x": 0, 35 | "y": 0 36 | }, 37 | "id": 8, 38 | "panels": [], 39 | "title": "RPC Overview ($Namespace)", 40 | "type": "row" 41 | }, 42 | { 43 | "aliasColors": {}, 44 | "bars": false, 45 | "dashLength": 10, 46 | "dashes": false, 47 | "datasource": "$datasource", 48 | "fieldConfig": { 49 | "defaults": { 50 | "links": [] 51 | }, 52 | "overrides": [] 53 | }, 54 | "fill": 1, 55 | "fillGradient": 0, 56 | "gridPos": { 57 | "h": 10, 58 | "w": 8, 59 | "x": 0, 60 | "y": 1 61 | }, 62 | "hiddenSeries": false, 63 | "id": 2, 64 | "legend": { 65 | "avg": false, 66 | "current": false, 67 | "max": false, 68 | "min": false, 69 | "show": true, 70 | "total": false, 71 | "values": false 72 | }, 73 | "lines": true, 74 | "linewidth": 1, 75 | "nullPointMode": "null", 76 | "options": { 77 | "alertThreshold": true 78 | }, 79 | "percentage": false, 80 | "pluginVersion": "8.3.4", 81 | "pointradius": 2, 82 | "points": false, 83 | "renderer": "flot", 84 | "seriesOverrides": [], 85 | "spaceLength": 10, 86 | "stack": false, 87 | "steppedLine": false, 88 | "targets": [ 89 | { 90 | "datasource": "$datasource", 91 | "exemplar": true, 92 | "expr": "sum(rate(temporal_request_latency_seconds_bucket[5m]))", 93 | "interval": "", 94 | "legendFormat": "requests", 95 | "refId": "A" 96 | }, 97 | { 98 | "datasource": "$datasource", 99 | "exemplar": true, 100 | "expr": "sum(rate(temporal_request_latency_seconds_bucket[5m]))", 101 | "hide": false, 102 | "interval": "", 103 | "legendFormat": "failures", 104 | "refId": "B" 105 | } 106 | ], 107 | "thresholds": [], 108 | "timeRegions": [], 109 | "title": "Requests Vs Failures", 110 | "tooltip": { 111 | "shared": true, 112 | "sort": 0, 113 | "value_type": "individual" 114 | }, 115 | "type": "graph", 116 | "xaxis": { 117 | "mode": "time", 118 | "show": true, 119 | "values": [] 120 | }, 121 | "yaxes": [ 122 | { 123 | "format": "short", 124 | "logBase": 1, 125 | "show": true 126 | }, 127 | { 128 | "format": "short", 129 | "logBase": 1, 130 | "show": true 131 | } 132 | ], 133 | "yaxis": { 134 | "align": false 135 | } 136 | }, 137 | { 138 | "aliasColors": {}, 139 | "bars": false, 140 | "dashLength": 10, 141 | "dashes": false, 142 | "datasource": "$datasource", 143 | "fieldConfig": { 144 | "defaults": { 145 | "links": [] 146 | }, 147 | "overrides": [] 148 | }, 149 | "fill": 1, 150 | "fillGradient": 0, 151 | "gridPos": { 152 | "h": 10, 153 | "w": 7, 154 | "x": 8, 155 | "y": 1 156 | }, 157 | "hiddenSeries": false, 158 | "id": 5, 159 | "legend": { 160 | "avg": false, 161 | "current": false, 162 | "max": false, 163 | "min": false, 164 | "show": true, 165 | "total": false, 166 | "values": false 167 | }, 168 | "lines": true, 169 | "linewidth": 1, 170 | "nullPointMode": "null", 171 | "options": { 172 | "alertThreshold": true 173 | }, 174 | "percentage": false, 175 | "pluginVersion": "8.3.4", 176 | "pointradius": 2, 177 | "points": false, 178 | "renderer": "flot", 179 | "seriesOverrides": [], 180 | "spaceLength": 10, 181 | "stack": false, 182 | "steppedLine": false, 183 | "targets": [ 184 | { 185 | "datasource": "$datasource", 186 | "exemplar": true, 187 | "expr": "sum by (operation) ((rate(temporal_request_latency_seconds_bucket[5m])))", 188 | "interval": "", 189 | "legendFormat": "{{operation }}", 190 | "refId": "A" 191 | } 192 | ], 193 | "thresholds": [], 194 | "timeRegions": [], 195 | "title": "RPC Requests Per Operation", 196 | "tooltip": { 197 | "shared": true, 198 | "sort": 0, 199 | "value_type": "individual" 200 | }, 201 | "type": "graph", 202 | "xaxis": { 203 | "mode": "time", 204 | "show": true, 205 | "values": [] 206 | }, 207 | "yaxes": [ 208 | { 209 | "format": "short", 210 | "logBase": 1, 211 | "show": true 212 | }, 213 | { 214 | "format": "short", 215 | "logBase": 1, 216 | "show": true 217 | } 218 | ], 219 | "yaxis": { 220 | "align": false 221 | } 222 | }, 223 | { 224 | "aliasColors": {}, 225 | "bars": false, 226 | "dashLength": 10, 227 | "dashes": false, 228 | "datasource": "$datasource", 229 | "fieldConfig": { 230 | "defaults": { 231 | "links": [] 232 | }, 233 | "overrides": [] 234 | }, 235 | "fill": 1, 236 | "fillGradient": 0, 237 | "gridPos": { 238 | "h": 10, 239 | "w": 9, 240 | "x": 15, 241 | "y": 1 242 | }, 243 | "hiddenSeries": false, 244 | "id": 4, 245 | "legend": { 246 | "avg": false, 247 | "current": false, 248 | "max": false, 249 | "min": false, 250 | "show": true, 251 | "total": false, 252 | "values": false 253 | }, 254 | "lines": true, 255 | "linewidth": 1, 256 | "nullPointMode": "null", 257 | "options": { 258 | "alertThreshold": true 259 | }, 260 | "percentage": false, 261 | "pluginVersion": "8.3.4", 262 | "pointradius": 2, 263 | "points": false, 264 | "renderer": "flot", 265 | "seriesOverrides": [], 266 | "spaceLength": 10, 267 | "stack": false, 268 | "steppedLine": false, 269 | "targets": [ 270 | { 271 | "datasource": "$datasource", 272 | "exemplar": true, 273 | "expr": "sum by (operation) (rate(temporal_request_latency_seconds_bucket[5m]))", 274 | "interval": "", 275 | "legendFormat": "{{operation }}", 276 | "refId": "A" 277 | } 278 | ], 279 | "thresholds": [], 280 | "timeRegions": [], 281 | "title": "RPC Failures Per Operation", 282 | "tooltip": { 283 | "shared": true, 284 | "sort": 0, 285 | "value_type": "individual" 286 | }, 287 | "type": "graph", 288 | "xaxis": { 289 | "mode": "time", 290 | "show": true, 291 | "values": [] 292 | }, 293 | "yaxes": [ 294 | { 295 | "format": "short", 296 | "logBase": 1, 297 | "show": true 298 | }, 299 | { 300 | "format": "short", 301 | "logBase": 1, 302 | "show": true 303 | } 304 | ], 305 | "yaxis": { 306 | "align": false 307 | } 308 | }, 309 | { 310 | "aliasColors": {}, 311 | "bars": false, 312 | "dashLength": 10, 313 | "dashes": false, 314 | "datasource": "$datasource", 315 | "fieldConfig": { 316 | "defaults": { 317 | "links": [] 318 | }, 319 | "overrides": [] 320 | }, 321 | "fill": 1, 322 | "fillGradient": 0, 323 | "gridPos": { 324 | "h": 9, 325 | "w": 24, 326 | "x": 0, 327 | "y": 11 328 | }, 329 | "hiddenSeries": false, 330 | "id": 6, 331 | "legend": { 332 | "avg": false, 333 | "current": false, 334 | "max": false, 335 | "min": false, 336 | "show": true, 337 | "total": false, 338 | "values": false 339 | }, 340 | "lines": true, 341 | "linewidth": 1, 342 | "nullPointMode": "null", 343 | "options": { 344 | "alertThreshold": true 345 | }, 346 | "percentage": false, 347 | "pluginVersion": "8.3.4", 348 | "pointradius": 2, 349 | "points": false, 350 | "renderer": "flot", 351 | "seriesOverrides": [], 352 | "spaceLength": 10, 353 | "stack": false, 354 | "steppedLine": false, 355 | "targets": [ 356 | { 357 | "datasource": "$datasource", 358 | "exemplar": true, 359 | "expr": "histogram_quantile(0.95, sum by (namespace, operation, le) (rate(temporal_request_latency_seconds_bucket[5m])))", 360 | "interval": "", 361 | "legendFormat": "{{ namespace }} - {{operation }}", 362 | "refId": "A" 363 | } 364 | ], 365 | "thresholds": [], 366 | "timeRegions": [], 367 | "title": "RPC Latencies ($Namespace)", 368 | "tooltip": { 369 | "shared": true, 370 | "sort": 0, 371 | "value_type": "individual" 372 | }, 373 | "type": "graph", 374 | "xaxis": { 375 | "mode": "time", 376 | "show": true, 377 | "values": [] 378 | }, 379 | "yaxes": [ 380 | { 381 | "format": "dtdurations", 382 | "logBase": 1, 383 | "show": true 384 | }, 385 | { 386 | "format": "short", 387 | "logBase": 1, 388 | "show": true 389 | } 390 | ], 391 | "yaxis": { 392 | "align": false 393 | } 394 | }, 395 | { 396 | "collapsed": true, 397 | "gridPos": { 398 | "h": 1, 399 | "w": 24, 400 | "x": 0, 401 | "y": 20 402 | }, 403 | "id": 12, 404 | "panels": [ 405 | { 406 | "aliasColors": {}, 407 | "bars": false, 408 | "dashLength": 10, 409 | "dashes": false, 410 | "datasource": "$datasource", 411 | "fieldConfig": { 412 | "defaults": { 413 | "links": [] 414 | }, 415 | "overrides": [] 416 | }, 417 | "fill": 1, 418 | "fillGradient": 0, 419 | "gridPos": { 420 | "h": 8, 421 | "w": 12, 422 | "x": 0, 423 | "y": 21 424 | }, 425 | "hiddenSeries": false, 426 | "id": 10, 427 | "legend": { 428 | "avg": false, 429 | "current": false, 430 | "max": false, 431 | "min": false, 432 | "show": true, 433 | "total": false, 434 | "values": false 435 | }, 436 | "lines": true, 437 | "linewidth": 1, 438 | "nullPointMode": "null", 439 | "options": { 440 | "alertThreshold": true 441 | }, 442 | "percentage": false, 443 | "pluginVersion": "8.3.4", 444 | "pointradius": 2, 445 | "points": false, 446 | "renderer": "flot", 447 | "seriesOverrides": [], 448 | "spaceLength": 10, 449 | "stack": false, 450 | "steppedLine": false, 451 | "targets": [ 452 | { 453 | "datasource": "$datasource", 454 | "exemplar": true, 455 | "expr": "rate(temporal_workflow_completed_total[5m])", 456 | "interval": "", 457 | "legendFormat": "{{ workflow_type }}", 458 | "refId": "A" 459 | }, 460 | { 461 | "datasource": "$datasource", 462 | "exemplar": true, 463 | "expr": "sum(rate(temporal_workflow_failed_total[5m]))", 464 | "hide": false, 465 | "interval": "", 466 | "legendFormat": "failed", 467 | "refId": "B" 468 | }, 469 | { 470 | "datasource": "$datasource", 471 | "exemplar": true, 472 | "expr": "sum(rate(temporal_workflow_canceled_total[5m]))", 473 | "hide": false, 474 | "interval": "", 475 | "legendFormat": "cancelled", 476 | "refId": "C" 477 | }, 478 | { 479 | "datasource": "$datasource", 480 | "exemplar": true, 481 | "expr": "sum(rate(temporal_workflow_continue_as_new_total[5m]))", 482 | "hide": false, 483 | "interval": "", 484 | "legendFormat": "continued_as_new", 485 | "refId": "D" 486 | } 487 | ], 488 | "thresholds": [], 489 | "timeRegions": [], 490 | "title": "Workflow Completion", 491 | "tooltip": { 492 | "shared": true, 493 | "sort": 0, 494 | "value_type": "individual" 495 | }, 496 | "type": "graph", 497 | "xaxis": { 498 | "mode": "time", 499 | "show": true, 500 | "values": [] 501 | }, 502 | "yaxes": [ 503 | { 504 | "format": "short", 505 | "logBase": 1, 506 | "show": true 507 | }, 508 | { 509 | "format": "short", 510 | "logBase": 1, 511 | "show": true 512 | } 513 | ], 514 | "yaxis": { 515 | "align": false 516 | } 517 | }, 518 | { 519 | "aliasColors": {}, 520 | "bars": false, 521 | "dashLength": 10, 522 | "dashes": false, 523 | "datasource": "$datasource", 524 | "fieldConfig": { 525 | "defaults": { 526 | "links": [] 527 | }, 528 | "overrides": [] 529 | }, 530 | "fill": 1, 531 | "fillGradient": 0, 532 | "gridPos": { 533 | "h": 8, 534 | "w": 12, 535 | "x": 12, 536 | "y": 21 537 | }, 538 | "hiddenSeries": false, 539 | "id": 15, 540 | "legend": { 541 | "avg": false, 542 | "current": false, 543 | "max": false, 544 | "min": false, 545 | "show": true, 546 | "total": false, 547 | "values": false 548 | }, 549 | "lines": true, 550 | "linewidth": 1, 551 | "nullPointMode": "null", 552 | "options": { 553 | "alertThreshold": true 554 | }, 555 | "percentage": false, 556 | "pluginVersion": "8.3.4", 557 | "pointradius": 2, 558 | "points": false, 559 | "renderer": "flot", 560 | "seriesOverrides": [], 561 | "spaceLength": 10, 562 | "stack": false, 563 | "steppedLine": false, 564 | "targets": [ 565 | { 566 | "datasource": "$datasource", 567 | "exemplar": true, 568 | "expr": "histogram_quantile(0.95, sum(rate(temporal_workflow_endtoend_latency_seconds_bucket[5m])) by (namespace, workflow_type, le))", 569 | "interval": "", 570 | "legendFormat": "{{ namespace }} - {{ workflow_type }}", 571 | "refId": "A" 572 | } 573 | ], 574 | "thresholds": [], 575 | "timeRegions": [], 576 | "title": "Workflow End-To-End Latencies", 577 | "tooltip": { 578 | "shared": true, 579 | "sort": 0, 580 | "value_type": "individual" 581 | }, 582 | "type": "graph", 583 | "xaxis": { 584 | "mode": "time", 585 | "show": true, 586 | "values": [] 587 | }, 588 | "yaxes": [ 589 | { 590 | "format": "short", 591 | "logBase": 1, 592 | "show": true 593 | }, 594 | { 595 | "format": "short", 596 | "logBase": 1, 597 | "show": true 598 | } 599 | ], 600 | "yaxis": { 601 | "align": false 602 | } 603 | }, 604 | { 605 | "aliasColors": {}, 606 | "bars": false, 607 | "dashLength": 10, 608 | "dashes": false, 609 | "datasource": "$datasource", 610 | "fieldConfig": { 611 | "defaults": { 612 | "links": [] 613 | }, 614 | "overrides": [] 615 | }, 616 | "fill": 1, 617 | "fillGradient": 0, 618 | "gridPos": { 619 | "h": 8, 620 | "w": 12, 621 | "x": 0, 622 | "y": 29 623 | }, 624 | "hiddenSeries": false, 625 | "id": 16, 626 | "legend": { 627 | "avg": false, 628 | "current": false, 629 | "max": false, 630 | "min": false, 631 | "show": true, 632 | "total": false, 633 | "values": false 634 | }, 635 | "lines": true, 636 | "linewidth": 1, 637 | "nullPointMode": "null", 638 | "options": { 639 | "alertThreshold": true 640 | }, 641 | "percentage": false, 642 | "pluginVersion": "8.3.4", 643 | "pointradius": 2, 644 | "points": false, 645 | "renderer": "flot", 646 | "seriesOverrides": [], 647 | "spaceLength": 10, 648 | "stack": false, 649 | "steppedLine": false, 650 | "targets": [ 651 | { 652 | "datasource": "$datasource", 653 | "exemplar": true, 654 | "expr": "sum by (namespace, workflow_type) (rate(temporal_workflow_completed_total[5m]))", 655 | "interval": "", 656 | "legendFormat": "{{ namespace }} - {{ workflow_type }}", 657 | "refId": "A" 658 | } 659 | ], 660 | "thresholds": [], 661 | "timeRegions": [], 662 | "title": "Workflow Success By Type", 663 | "tooltip": { 664 | "shared": true, 665 | "sort": 0, 666 | "value_type": "individual" 667 | }, 668 | "type": "graph", 669 | "xaxis": { 670 | "mode": "time", 671 | "show": true, 672 | "values": [] 673 | }, 674 | "yaxes": [ 675 | { 676 | "format": "short", 677 | "logBase": 1, 678 | "show": true 679 | }, 680 | { 681 | "format": "short", 682 | "logBase": 1, 683 | "show": true 684 | } 685 | ], 686 | "yaxis": { 687 | "align": false 688 | } 689 | }, 690 | { 691 | "aliasColors": {}, 692 | "bars": false, 693 | "dashLength": 10, 694 | "dashes": false, 695 | "datasource": "$datasource", 696 | "fieldConfig": { 697 | "defaults": { 698 | "links": [] 699 | }, 700 | "overrides": [] 701 | }, 702 | "fill": 1, 703 | "fillGradient": 0, 704 | "gridPos": { 705 | "h": 8, 706 | "w": 12, 707 | "x": 12, 708 | "y": 29 709 | }, 710 | "hiddenSeries": false, 711 | "id": 17, 712 | "legend": { 713 | "avg": false, 714 | "current": false, 715 | "max": false, 716 | "min": false, 717 | "show": true, 718 | "total": false, 719 | "values": false 720 | }, 721 | "lines": true, 722 | "linewidth": 1, 723 | "nullPointMode": "null", 724 | "options": { 725 | "alertThreshold": true 726 | }, 727 | "percentage": false, 728 | "pluginVersion": "8.3.4", 729 | "pointradius": 2, 730 | "points": false, 731 | "renderer": "flot", 732 | "seriesOverrides": [], 733 | "spaceLength": 10, 734 | "stack": false, 735 | "steppedLine": false, 736 | "targets": [ 737 | { 738 | "datasource": "$datasource", 739 | "exemplar": true, 740 | "expr": "sum by (namespace, task_queue) (rate(temporal_workflow_task_schedule_to_start_latency_seconds_bucket[5m]))", 741 | "interval": "", 742 | "legendFormat": "{{ namespace }} - {{ task_queue }}", 743 | "refId": "A" 744 | } 745 | ], 746 | "thresholds": [], 747 | "timeRegions": [], 748 | "title": "Workflow Task End-to-End Latency", 749 | "tooltip": { 750 | "shared": true, 751 | "sort": 0, 752 | "value_type": "individual" 753 | }, 754 | "type": "graph", 755 | "xaxis": { 756 | "mode": "time", 757 | "show": true, 758 | "values": [] 759 | }, 760 | "yaxes": [ 761 | { 762 | "format": "short", 763 | "logBase": 1, 764 | "show": true 765 | }, 766 | { 767 | "format": "short", 768 | "logBase": 1, 769 | "show": true 770 | } 771 | ], 772 | "yaxis": { 773 | "align": false 774 | } 775 | } 776 | ], 777 | "title": "Workflows", 778 | "type": "row" 779 | }, 780 | { 781 | "collapsed": false, 782 | "gridPos": { 783 | "h": 1, 784 | "w": 24, 785 | "x": 0, 786 | "y": 21 787 | }, 788 | "id": 20, 789 | "panels": [], 790 | "title": "Workflow Task Processing", 791 | "type": "row" 792 | }, 793 | { 794 | "aliasColors": {}, 795 | "bars": false, 796 | "dashLength": 10, 797 | "dashes": false, 798 | "datasource": "$datasource", 799 | "fieldConfig": { 800 | "defaults": { 801 | "links": [] 802 | }, 803 | "overrides": [] 804 | }, 805 | "fill": 1, 806 | "fillGradient": 0, 807 | "gridPos": { 808 | "h": 8, 809 | "w": 12, 810 | "x": 0, 811 | "y": 22 812 | }, 813 | "hiddenSeries": false, 814 | "id": 21, 815 | "legend": { 816 | "avg": false, 817 | "current": false, 818 | "max": false, 819 | "min": false, 820 | "show": true, 821 | "total": false, 822 | "values": false 823 | }, 824 | "lines": true, 825 | "linewidth": 1, 826 | "nullPointMode": "null", 827 | "options": { 828 | "alertThreshold": true 829 | }, 830 | "percentage": false, 831 | "pluginVersion": "8.3.4", 832 | "pointradius": 2, 833 | "points": false, 834 | "renderer": "flot", 835 | "seriesOverrides": [], 836 | "spaceLength": 10, 837 | "stack": false, 838 | "steppedLine": false, 839 | "targets": [ 840 | { 841 | "datasource": "$datasource", 842 | "exemplar": true, 843 | "expr": "sum by (namespace, workflow_type) (rate(temporal_workflow_failed_total[5m]))", 844 | "interval": "", 845 | "legendFormat": "{{ namespace }} - {{ workflow_type }}", 846 | "refId": "A" 847 | } 848 | ], 849 | "thresholds": [], 850 | "timeRegions": [], 851 | "title": "Workflow Fail by Type", 852 | "tooltip": { 853 | "shared": true, 854 | "sort": 0, 855 | "value_type": "individual" 856 | }, 857 | "type": "graph", 858 | "xaxis": { 859 | "mode": "time", 860 | "show": true, 861 | "values": [] 862 | }, 863 | "yaxes": [ 864 | { 865 | "format": "short", 866 | "logBase": 1, 867 | "show": true 868 | }, 869 | { 870 | "format": "short", 871 | "logBase": 1, 872 | "show": true 873 | } 874 | ], 875 | "yaxis": { 876 | "align": false 877 | } 878 | }, 879 | { 880 | "aliasColors": {}, 881 | "bars": false, 882 | "dashLength": 10, 883 | "dashes": false, 884 | "datasource": "$datasource", 885 | "fieldConfig": { 886 | "defaults": { 887 | "links": [] 888 | }, 889 | "overrides": [] 890 | }, 891 | "fill": 1, 892 | "fillGradient": 0, 893 | "gridPos": { 894 | "h": 8, 895 | "w": 12, 896 | "x": 12, 897 | "y": 22 898 | }, 899 | "hiddenSeries": false, 900 | "id": 18, 901 | "legend": { 902 | "avg": false, 903 | "current": false, 904 | "max": false, 905 | "min": false, 906 | "show": true, 907 | "total": false, 908 | "values": false 909 | }, 910 | "lines": true, 911 | "linewidth": 1, 912 | "nullPointMode": "null", 913 | "options": { 914 | "alertThreshold": true 915 | }, 916 | "percentage": false, 917 | "pluginVersion": "8.3.4", 918 | "pointradius": 2, 919 | "points": false, 920 | "renderer": "flot", 921 | "seriesOverrides": [], 922 | "spaceLength": 10, 923 | "stack": false, 924 | "steppedLine": false, 925 | "targets": [ 926 | { 927 | "datasource": "$datasource", 928 | "exemplar": true, 929 | "expr": "sum by (namespace) (rate(temporal_workflow_task_queue_poll_succeed_total[5m]))", 930 | "interval": "", 931 | "legendFormat": "{{ namespace }}", 932 | "refId": "A" 933 | } 934 | ], 935 | "thresholds": [], 936 | "timeRegions": [], 937 | "title": "Workflow Task Throughput By Namespace", 938 | "tooltip": { 939 | "shared": true, 940 | "sort": 0, 941 | "value_type": "individual" 942 | }, 943 | "type": "graph", 944 | "xaxis": { 945 | "mode": "time", 946 | "show": true, 947 | "values": [] 948 | }, 949 | "yaxes": [ 950 | { 951 | "format": "short", 952 | "logBase": 1, 953 | "show": true 954 | }, 955 | { 956 | "format": "short", 957 | "logBase": 1, 958 | "show": true 959 | } 960 | ], 961 | "yaxis": { 962 | "align": false 963 | } 964 | }, 965 | { 966 | "aliasColors": {}, 967 | "bars": false, 968 | "dashLength": 10, 969 | "dashes": false, 970 | "datasource": "$datasource", 971 | "fieldConfig": { 972 | "defaults": { 973 | "links": [] 974 | }, 975 | "overrides": [] 976 | }, 977 | "fill": 1, 978 | "fillGradient": 0, 979 | "gridPos": { 980 | "h": 8, 981 | "w": 24, 982 | "x": 0, 983 | "y": 30 984 | }, 985 | "hiddenSeries": false, 986 | "id": 14, 987 | "legend": { 988 | "avg": false, 989 | "current": false, 990 | "max": false, 991 | "min": false, 992 | "show": true, 993 | "total": false, 994 | "values": false 995 | }, 996 | "lines": true, 997 | "linewidth": 1, 998 | "nullPointMode": "null", 999 | "options": { 1000 | "alertThreshold": true 1001 | }, 1002 | "percentage": false, 1003 | "pluginVersion": "8.3.4", 1004 | "pointradius": 2, 1005 | "points": false, 1006 | "renderer": "flot", 1007 | "seriesOverrides": [], 1008 | "spaceLength": 10, 1009 | "stack": false, 1010 | "steppedLine": false, 1011 | "targets": [ 1012 | { 1013 | "datasource": "$datasource", 1014 | "exemplar": true, 1015 | "expr": "sum by (namespace) (rate(temporal_workflow_task_queue_poll_empty[5m]))", 1016 | "interval": "", 1017 | "legendFormat": "Empty Poll - {{ namespace }}", 1018 | "refId": "A" 1019 | } 1020 | ], 1021 | "thresholds": [], 1022 | "timeRegions": [], 1023 | "title": "Empty Polls", 1024 | "tooltip": { 1025 | "shared": true, 1026 | "sort": 0, 1027 | "value_type": "individual" 1028 | }, 1029 | "type": "graph", 1030 | "xaxis": { 1031 | "mode": "time", 1032 | "show": true, 1033 | "values": [] 1034 | }, 1035 | "yaxes": [ 1036 | { 1037 | "format": "short", 1038 | "logBase": 1, 1039 | "show": true 1040 | }, 1041 | { 1042 | "format": "short", 1043 | "logBase": 1, 1044 | "show": true 1045 | } 1046 | ], 1047 | "yaxis": { 1048 | "align": false 1049 | } 1050 | }, 1051 | { 1052 | "aliasColors": {}, 1053 | "bars": false, 1054 | "dashLength": 10, 1055 | "dashes": false, 1056 | "datasource": "$datasource", 1057 | "fieldConfig": { 1058 | "defaults": { 1059 | "links": [] 1060 | }, 1061 | "overrides": [] 1062 | }, 1063 | "fill": 1, 1064 | "fillGradient": 0, 1065 | "gridPos": { 1066 | "h": 8, 1067 | "w": 12, 1068 | "x": 0, 1069 | "y": 38 1070 | }, 1071 | "hiddenSeries": false, 1072 | "id": 25, 1073 | "legend": { 1074 | "avg": false, 1075 | "current": false, 1076 | "max": false, 1077 | "min": false, 1078 | "show": true, 1079 | "total": false, 1080 | "values": false 1081 | }, 1082 | "lines": true, 1083 | "linewidth": 1, 1084 | "nullPointMode": "null", 1085 | "options": { 1086 | "alertThreshold": true 1087 | }, 1088 | "percentage": false, 1089 | "pluginVersion": "8.3.4", 1090 | "pointradius": 2, 1091 | "points": false, 1092 | "renderer": "flot", 1093 | "seriesOverrides": [], 1094 | "spaceLength": 10, 1095 | "stack": false, 1096 | "steppedLine": false, 1097 | "targets": [ 1098 | { 1099 | "datasource": "$datasource", 1100 | "exemplar": true, 1101 | "expr": "histogram_quantile(0.95, sum(rate(temporal_workflow_task_execution_latency_seconds_bucket[5m])) by (namespace, le))", 1102 | "interval": "", 1103 | "legendFormat": "{{ namespace }}", 1104 | "refId": "A" 1105 | } 1106 | ], 1107 | "thresholds": [], 1108 | "timeRegions": [], 1109 | "title": "Workflow Task Execution Latency By Namespace", 1110 | "tooltip": { 1111 | "shared": true, 1112 | "sort": 0, 1113 | "value_type": "individual" 1114 | }, 1115 | "type": "graph", 1116 | "xaxis": { 1117 | "mode": "time", 1118 | "show": true, 1119 | "values": [] 1120 | }, 1121 | "yaxes": [ 1122 | { 1123 | "format": "dtdurations", 1124 | "logBase": 1, 1125 | "show": true 1126 | }, 1127 | { 1128 | "format": "short", 1129 | "logBase": 1, 1130 | "show": true 1131 | } 1132 | ], 1133 | "yaxis": { 1134 | "align": false 1135 | } 1136 | }, 1137 | { 1138 | "aliasColors": {}, 1139 | "bars": false, 1140 | "dashLength": 10, 1141 | "dashes": false, 1142 | "datasource": "$datasource", 1143 | "fieldConfig": { 1144 | "defaults": { 1145 | "links": [] 1146 | }, 1147 | "overrides": [] 1148 | }, 1149 | "fill": 1, 1150 | "fillGradient": 0, 1151 | "gridPos": { 1152 | "h": 8, 1153 | "w": 12, 1154 | "x": 12, 1155 | "y": 38 1156 | }, 1157 | "hiddenSeries": false, 1158 | "id": 23, 1159 | "legend": { 1160 | "avg": false, 1161 | "current": false, 1162 | "max": false, 1163 | "min": false, 1164 | "show": true, 1165 | "total": false, 1166 | "values": false 1167 | }, 1168 | "lines": true, 1169 | "linewidth": 1, 1170 | "nullPointMode": "null", 1171 | "options": { 1172 | "alertThreshold": true 1173 | }, 1174 | "percentage": false, 1175 | "pluginVersion": "8.3.4", 1176 | "pointradius": 2, 1177 | "points": false, 1178 | "renderer": "flot", 1179 | "seriesOverrides": [], 1180 | "spaceLength": 10, 1181 | "stack": false, 1182 | "steppedLine": false, 1183 | "targets": [ 1184 | { 1185 | "datasource": "$datasource", 1186 | "exemplar": true, 1187 | "expr": "histogram_quantile(0.95, sum(rate(temporal_workflow_task_execution_latency_seconds_bucket[5m])) by (namespace, workflow_type, le))", 1188 | "interval": "", 1189 | "legendFormat": "{{ namespace }} -- {{ workflow_type }}", 1190 | "refId": "A" 1191 | } 1192 | ], 1193 | "thresholds": [], 1194 | "timeRegions": [], 1195 | "title": "Workflow Task Backlog By Workflow Type", 1196 | "tooltip": { 1197 | "shared": true, 1198 | "sort": 0, 1199 | "value_type": "individual" 1200 | }, 1201 | "type": "graph", 1202 | "xaxis": { 1203 | "mode": "time", 1204 | "show": true, 1205 | "values": [] 1206 | }, 1207 | "yaxes": [ 1208 | { 1209 | "format": "dtdurations", 1210 | "logBase": 1, 1211 | "show": true 1212 | }, 1213 | { 1214 | "format": "short", 1215 | "logBase": 1, 1216 | "show": true 1217 | } 1218 | ], 1219 | "yaxis": { 1220 | "align": false 1221 | } 1222 | }, 1223 | { 1224 | "collapsed": false, 1225 | "gridPos": { 1226 | "h": 1, 1227 | "w": 24, 1228 | "x": 0, 1229 | "y": 46 1230 | }, 1231 | "id": 42, 1232 | "panels": [], 1233 | "title": "Activities", 1234 | "type": "row" 1235 | }, 1236 | { 1237 | "aliasColors": {}, 1238 | "bars": false, 1239 | "dashLength": 10, 1240 | "dashes": false, 1241 | "datasource": "$datasource", 1242 | "fieldConfig": { 1243 | "defaults": { 1244 | "links": [] 1245 | }, 1246 | "overrides": [] 1247 | }, 1248 | "fill": 1, 1249 | "fillGradient": 0, 1250 | "gridPos": { 1251 | "h": 8, 1252 | "w": 12, 1253 | "x": 0, 1254 | "y": 47 1255 | }, 1256 | "hiddenSeries": false, 1257 | "id": 38, 1258 | "legend": { 1259 | "avg": false, 1260 | "current": false, 1261 | "max": false, 1262 | "min": false, 1263 | "show": true, 1264 | "total": false, 1265 | "values": false 1266 | }, 1267 | "lines": true, 1268 | "linewidth": 1, 1269 | "nullPointMode": "null", 1270 | "options": { 1271 | "alertThreshold": true 1272 | }, 1273 | "percentage": false, 1274 | "pluginVersion": "8.3.4", 1275 | "pointradius": 2, 1276 | "points": false, 1277 | "renderer": "flot", 1278 | "seriesOverrides": [], 1279 | "spaceLength": 10, 1280 | "stack": false, 1281 | "steppedLine": false, 1282 | "targets": [ 1283 | { 1284 | "datasource": "$datasource", 1285 | "exemplar": true, 1286 | "expr": "sum by (namespace) (rate(temporal_activity_execution_latency_seconds_count[5m]))", 1287 | "interval": "", 1288 | "legendFormat": "latency count", 1289 | "refId": "A" 1290 | } 1291 | ], 1292 | "thresholds": [], 1293 | "timeRegions": [], 1294 | "title": "Activity Throughput By Namespace", 1295 | "tooltip": { 1296 | "shared": true, 1297 | "sort": 0, 1298 | "value_type": "individual" 1299 | }, 1300 | "type": "graph", 1301 | "xaxis": { 1302 | "mode": "time", 1303 | "show": true, 1304 | "values": [] 1305 | }, 1306 | "yaxes": [ 1307 | { 1308 | "format": "short", 1309 | "logBase": 1, 1310 | "show": true 1311 | }, 1312 | { 1313 | "format": "short", 1314 | "logBase": 1, 1315 | "show": true 1316 | } 1317 | ], 1318 | "yaxis": { 1319 | "align": false 1320 | } 1321 | }, 1322 | { 1323 | "aliasColors": {}, 1324 | "bars": false, 1325 | "dashLength": 10, 1326 | "dashes": false, 1327 | "datasource": "$datasource", 1328 | "fieldConfig": { 1329 | "defaults": { 1330 | "links": [] 1331 | }, 1332 | "overrides": [] 1333 | }, 1334 | "fill": 1, 1335 | "fillGradient": 0, 1336 | "gridPos": { 1337 | "h": 8, 1338 | "w": 12, 1339 | "x": 12, 1340 | "y": 47 1341 | }, 1342 | "hiddenSeries": false, 1343 | "id": 40, 1344 | "legend": { 1345 | "avg": false, 1346 | "current": false, 1347 | "max": false, 1348 | "min": false, 1349 | "show": true, 1350 | "total": false, 1351 | "values": false 1352 | }, 1353 | "lines": true, 1354 | "linewidth": 1, 1355 | "nullPointMode": "null", 1356 | "options": { 1357 | "alertThreshold": true 1358 | }, 1359 | "percentage": false, 1360 | "pluginVersion": "8.3.4", 1361 | "pointradius": 2, 1362 | "points": false, 1363 | "renderer": "flot", 1364 | "seriesOverrides": [], 1365 | "spaceLength": 10, 1366 | "stack": false, 1367 | "steppedLine": false, 1368 | "targets": [ 1369 | { 1370 | "datasource": "$datasource", 1371 | "exemplar": true, 1372 | "expr": "sum by (namespace, activity_type) (rate(temporal_activity_execution_latency_seconds_count[5m]))", 1373 | "interval": "", 1374 | "legendFormat": "{{ activity_type }}", 1375 | "refId": "A" 1376 | } 1377 | ], 1378 | "thresholds": [], 1379 | "timeRegions": [], 1380 | "title": "Activity Throughput By Activity Type", 1381 | "tooltip": { 1382 | "shared": true, 1383 | "sort": 0, 1384 | "value_type": "individual" 1385 | }, 1386 | "type": "graph", 1387 | "xaxis": { 1388 | "mode": "time", 1389 | "show": true, 1390 | "values": [] 1391 | }, 1392 | "yaxes": [ 1393 | { 1394 | "format": "short", 1395 | "logBase": 1, 1396 | "show": true 1397 | }, 1398 | { 1399 | "format": "short", 1400 | "logBase": 1, 1401 | "show": true 1402 | } 1403 | ], 1404 | "yaxis": { 1405 | "align": false 1406 | } 1407 | }, 1408 | { 1409 | "aliasColors": {}, 1410 | "bars": false, 1411 | "dashLength": 10, 1412 | "dashes": false, 1413 | "datasource": "$datasource", 1414 | "fieldConfig": { 1415 | "defaults": { 1416 | "links": [] 1417 | }, 1418 | "overrides": [] 1419 | }, 1420 | "fill": 1, 1421 | "fillGradient": 0, 1422 | "gridPos": { 1423 | "h": 9, 1424 | "w": 24, 1425 | "x": 0, 1426 | "y": 55 1427 | }, 1428 | "hiddenSeries": false, 1429 | "id": 44, 1430 | "legend": { 1431 | "avg": false, 1432 | "current": false, 1433 | "max": false, 1434 | "min": false, 1435 | "show": true, 1436 | "total": false, 1437 | "values": false 1438 | }, 1439 | "lines": true, 1440 | "linewidth": 1, 1441 | "nullPointMode": "null", 1442 | "options": { 1443 | "alertThreshold": true 1444 | }, 1445 | "percentage": false, 1446 | "pluginVersion": "8.3.4", 1447 | "pointradius": 2, 1448 | "points": false, 1449 | "renderer": "flot", 1450 | "seriesOverrides": [], 1451 | "spaceLength": 10, 1452 | "stack": false, 1453 | "steppedLine": false, 1454 | "targets": [ 1455 | { 1456 | "datasource": "$datasource", 1457 | "exemplar": true, 1458 | "expr": "sum by (namespace, activity_type) (rate(temporal_activity_execution_failed_total[5m]))", 1459 | "interval": "", 1460 | "legendFormat": "{{ namespace }} - {{ activity_type }}", 1461 | "refId": "A" 1462 | } 1463 | ], 1464 | "thresholds": [], 1465 | "timeRegions": [], 1466 | "title": "Failed Activity by Type", 1467 | "tooltip": { 1468 | "shared": true, 1469 | "sort": 0, 1470 | "value_type": "individual" 1471 | }, 1472 | "type": "graph", 1473 | "xaxis": { 1474 | "mode": "time", 1475 | "show": true, 1476 | "values": [] 1477 | }, 1478 | "yaxes": [ 1479 | { 1480 | "format": "short", 1481 | "logBase": 1, 1482 | "show": true 1483 | }, 1484 | { 1485 | "format": "short", 1486 | "logBase": 1, 1487 | "show": true 1488 | } 1489 | ], 1490 | "yaxis": { 1491 | "align": false 1492 | } 1493 | }, 1494 | { 1495 | "aliasColors": {}, 1496 | "bars": false, 1497 | "dashLength": 10, 1498 | "dashes": false, 1499 | "datasource": "$datasource", 1500 | "fieldConfig": { 1501 | "defaults": { 1502 | "links": [] 1503 | }, 1504 | "overrides": [] 1505 | }, 1506 | "fill": 1, 1507 | "fillGradient": 0, 1508 | "gridPos": { 1509 | "h": 8, 1510 | "w": 12, 1511 | "x": 0, 1512 | "y": 64 1513 | }, 1514 | "hiddenSeries": false, 1515 | "id": 46, 1516 | "legend": { 1517 | "avg": false, 1518 | "current": false, 1519 | "max": false, 1520 | "min": false, 1521 | "show": true, 1522 | "total": false, 1523 | "values": false 1524 | }, 1525 | "lines": true, 1526 | "linewidth": 1, 1527 | "nullPointMode": "null", 1528 | "options": { 1529 | "alertThreshold": true 1530 | }, 1531 | "percentage": false, 1532 | "pluginVersion": "8.3.4", 1533 | "pointradius": 2, 1534 | "points": false, 1535 | "renderer": "flot", 1536 | "seriesOverrides": [], 1537 | "spaceLength": 10, 1538 | "stack": false, 1539 | "steppedLine": false, 1540 | "targets": [ 1541 | { 1542 | "datasource": "$datasource", 1543 | "exemplar": true, 1544 | "expr": "histogram_quantile(0.95, sum(rate(temporal_activity_execution_latency_seconds_bucket[5m])) by (namespace, activity_type, le))", 1545 | "interval": "", 1546 | "legendFormat": "{{ namespace }} - {{ activity_type }}", 1547 | "refId": "A" 1548 | } 1549 | ], 1550 | "thresholds": [], 1551 | "timeRegions": [], 1552 | "title": "Activity Execution Latencies", 1553 | "tooltip": { 1554 | "shared": true, 1555 | "sort": 0, 1556 | "value_type": "individual" 1557 | }, 1558 | "type": "graph", 1559 | "xaxis": { 1560 | "mode": "time", 1561 | "show": true, 1562 | "values": [] 1563 | }, 1564 | "yaxes": [ 1565 | { 1566 | "format": "dtdurations", 1567 | "logBase": 1, 1568 | "show": true 1569 | }, 1570 | { 1571 | "format": "short", 1572 | "logBase": 1, 1573 | "show": true 1574 | } 1575 | ], 1576 | "yaxis": { 1577 | "align": false 1578 | } 1579 | }, 1580 | { 1581 | "aliasColors": {}, 1582 | "bars": false, 1583 | "dashLength": 10, 1584 | "dashes": false, 1585 | "datasource": "$datasource", 1586 | "fieldConfig": { 1587 | "defaults": { 1588 | "links": [] 1589 | }, 1590 | "overrides": [] 1591 | }, 1592 | "fill": 1, 1593 | "fillGradient": 0, 1594 | "gridPos": { 1595 | "h": 8, 1596 | "w": 12, 1597 | "x": 12, 1598 | "y": 64 1599 | }, 1600 | "hiddenSeries": false, 1601 | "id": 48, 1602 | "legend": { 1603 | "avg": false, 1604 | "current": false, 1605 | "max": false, 1606 | "min": false, 1607 | "show": true, 1608 | "total": false, 1609 | "values": false 1610 | }, 1611 | "lines": true, 1612 | "linewidth": 1, 1613 | "nullPointMode": "null", 1614 | "options": { 1615 | "alertThreshold": true 1616 | }, 1617 | "percentage": false, 1618 | "pluginVersion": "8.3.4", 1619 | "pointradius": 2, 1620 | "points": false, 1621 | "renderer": "flot", 1622 | "seriesOverrides": [], 1623 | "spaceLength": 10, 1624 | "stack": false, 1625 | "steppedLine": false, 1626 | "targets": [ 1627 | { 1628 | "datasource": "$datasource", 1629 | "exemplar": true, 1630 | "expr": "histogram_quantile(0.95, sum(rate(temporal_activity_succeed_endtoend_latency_seconds_bucket[5m])) by (namespace, activity_type, le))", 1631 | "interval": "", 1632 | "legendFormat": "{{ activity_type }}", 1633 | "refId": "A" 1634 | } 1635 | ], 1636 | "thresholds": [], 1637 | "timeRegions": [], 1638 | "title": "Activity End-To-End Latencies", 1639 | "tooltip": { 1640 | "shared": true, 1641 | "sort": 0, 1642 | "value_type": "individual" 1643 | }, 1644 | "type": "graph", 1645 | "xaxis": { 1646 | "mode": "time", 1647 | "show": true, 1648 | "values": [] 1649 | }, 1650 | "yaxes": [ 1651 | { 1652 | "format": "dtdurations", 1653 | "logBase": 1, 1654 | "show": true 1655 | }, 1656 | { 1657 | "format": "short", 1658 | "logBase": 1, 1659 | "show": true 1660 | } 1661 | ], 1662 | "yaxis": { 1663 | "align": false 1664 | } 1665 | }, 1666 | { 1667 | "collapsed": false, 1668 | "gridPos": { 1669 | "h": 1, 1670 | "w": 24, 1671 | "x": 0, 1672 | "y": 72 1673 | }, 1674 | "id": 34, 1675 | "panels": [], 1676 | "title": "Activity Task Processing", 1677 | "type": "row" 1678 | }, 1679 | { 1680 | "aliasColors": {}, 1681 | "bars": false, 1682 | "dashLength": 10, 1683 | "dashes": false, 1684 | "datasource": "$datasource", 1685 | "fieldConfig": { 1686 | "defaults": { 1687 | "links": [] 1688 | }, 1689 | "overrides": [] 1690 | }, 1691 | "fill": 1, 1692 | "fillGradient": 0, 1693 | "gridPos": { 1694 | "h": 8, 1695 | "w": 12, 1696 | "x": 0, 1697 | "y": 73 1698 | }, 1699 | "hiddenSeries": false, 1700 | "id": 31, 1701 | "legend": { 1702 | "avg": false, 1703 | "current": false, 1704 | "max": false, 1705 | "min": false, 1706 | "show": true, 1707 | "total": false, 1708 | "values": false 1709 | }, 1710 | "lines": true, 1711 | "linewidth": 1, 1712 | "nullPointMode": "null", 1713 | "options": { 1714 | "alertThreshold": true 1715 | }, 1716 | "percentage": false, 1717 | "pluginVersion": "8.3.4", 1718 | "pointradius": 2, 1719 | "points": false, 1720 | "renderer": "flot", 1721 | "seriesOverrides": [], 1722 | "spaceLength": 10, 1723 | "stack": false, 1724 | "steppedLine": false, 1725 | "targets": [ 1726 | { 1727 | "datasource": "$datasource", 1728 | "exemplar": true, 1729 | "expr": "sum by (namespace) (rate(temporal_activity_poll_no_task[5m]))", 1730 | "interval": "", 1731 | "legendFormat": "{{ namespace }}", 1732 | "refId": "A" 1733 | } 1734 | ], 1735 | "thresholds": [], 1736 | "timeRegions": [], 1737 | "title": "Empty Activity Polls By Namespace", 1738 | "tooltip": { 1739 | "shared": true, 1740 | "sort": 0, 1741 | "value_type": "individual" 1742 | }, 1743 | "type": "graph", 1744 | "xaxis": { 1745 | "mode": "time", 1746 | "show": true, 1747 | "values": [] 1748 | }, 1749 | "yaxes": [ 1750 | { 1751 | "format": "short", 1752 | "logBase": 1, 1753 | "show": true 1754 | }, 1755 | { 1756 | "format": "short", 1757 | "logBase": 1, 1758 | "show": true 1759 | } 1760 | ], 1761 | "yaxis": { 1762 | "align": false 1763 | } 1764 | }, 1765 | { 1766 | "aliasColors": {}, 1767 | "bars": false, 1768 | "dashLength": 10, 1769 | "dashes": false, 1770 | "datasource": "$datasource", 1771 | "fieldConfig": { 1772 | "defaults": { 1773 | "links": [] 1774 | }, 1775 | "overrides": [] 1776 | }, 1777 | "fill": 1, 1778 | "fillGradient": 0, 1779 | "gridPos": { 1780 | "h": 8, 1781 | "w": 12, 1782 | "x": 12, 1783 | "y": 73 1784 | }, 1785 | "hiddenSeries": false, 1786 | "id": 32, 1787 | "legend": { 1788 | "avg": false, 1789 | "current": false, 1790 | "max": false, 1791 | "min": false, 1792 | "show": true, 1793 | "total": false, 1794 | "values": false 1795 | }, 1796 | "lines": true, 1797 | "linewidth": 1, 1798 | "nullPointMode": "null", 1799 | "options": { 1800 | "alertThreshold": true 1801 | }, 1802 | "percentage": false, 1803 | "pluginVersion": "8.3.4", 1804 | "pointradius": 2, 1805 | "points": false, 1806 | "renderer": "flot", 1807 | "seriesOverrides": [], 1808 | "spaceLength": 10, 1809 | "stack": false, 1810 | "steppedLine": false, 1811 | "targets": [ 1812 | { 1813 | "datasource": "$datasource", 1814 | "exemplar": true, 1815 | "expr": "histogram_quantile(0.95, sum(rate(temporal_activity_schedule_to_start_latency_seconds_bucket[5m])) by (namespace, le))", 1816 | "interval": "", 1817 | "legendFormat": "", 1818 | "refId": "A" 1819 | } 1820 | ], 1821 | "thresholds": [], 1822 | "timeRegions": [], 1823 | "title": "Activity Task Backlog By Namespace", 1824 | "tooltip": { 1825 | "shared": true, 1826 | "sort": 0, 1827 | "value_type": "individual" 1828 | }, 1829 | "type": "graph", 1830 | "xaxis": { 1831 | "mode": "time", 1832 | "show": true, 1833 | "values": [] 1834 | }, 1835 | "yaxes": [ 1836 | { 1837 | "format": "dtdurationms", 1838 | "logBase": 1, 1839 | "show": true 1840 | }, 1841 | { 1842 | "format": "short", 1843 | "logBase": 1, 1844 | "show": true 1845 | } 1846 | ], 1847 | "yaxis": { 1848 | "align": false 1849 | } 1850 | }, 1851 | { 1852 | "aliasColors": {}, 1853 | "bars": false, 1854 | "dashLength": 10, 1855 | "dashes": false, 1856 | "datasource": "$datasource", 1857 | "fieldConfig": { 1858 | "defaults": { 1859 | "links": [] 1860 | }, 1861 | "overrides": [] 1862 | }, 1863 | "fill": 1, 1864 | "fillGradient": 0, 1865 | "gridPos": { 1866 | "h": 8, 1867 | "w": 12, 1868 | "x": 0, 1869 | "y": 81 1870 | }, 1871 | "hiddenSeries": false, 1872 | "id": 36, 1873 | "legend": { 1874 | "avg": false, 1875 | "current": false, 1876 | "max": false, 1877 | "min": false, 1878 | "show": true, 1879 | "total": false, 1880 | "values": false 1881 | }, 1882 | "lines": true, 1883 | "linewidth": 1, 1884 | "nullPointMode": "null", 1885 | "options": { 1886 | "alertThreshold": true 1887 | }, 1888 | "percentage": false, 1889 | "pluginVersion": "8.3.4", 1890 | "pointradius": 2, 1891 | "points": false, 1892 | "renderer": "flot", 1893 | "seriesOverrides": [], 1894 | "spaceLength": 10, 1895 | "stack": false, 1896 | "steppedLine": false, 1897 | "targets": [ 1898 | { 1899 | "datasource": "$datasource", 1900 | "exemplar": true, 1901 | "expr": "histogram_quantile(0.95, sum(rate(temporal_activity_schedule_to_start_latency_seconds_bucket[5m])) by (namespace, activity_type, le))", 1902 | "interval": "", 1903 | "legendFormat": "{{ activity_type }}", 1904 | "refId": "A" 1905 | } 1906 | ], 1907 | "thresholds": [], 1908 | "timeRegions": [], 1909 | "title": "Activity Task Backlog By Activity Type", 1910 | "tooltip": { 1911 | "shared": true, 1912 | "sort": 0, 1913 | "value_type": "individual" 1914 | }, 1915 | "type": "graph", 1916 | "xaxis": { 1917 | "mode": "time", 1918 | "show": true, 1919 | "values": [] 1920 | }, 1921 | "yaxes": [ 1922 | { 1923 | "format": "dtdurationms", 1924 | "logBase": 1, 1925 | "show": true 1926 | }, 1927 | { 1928 | "format": "short", 1929 | "logBase": 1, 1930 | "show": true 1931 | } 1932 | ], 1933 | "yaxis": { 1934 | "align": false 1935 | } 1936 | } 1937 | ], 1938 | "schemaVersion": 34, 1939 | "style": "dark", 1940 | "tags": [], 1941 | "templating": { 1942 | "list": [ 1943 | { 1944 | "current": { 1945 | "selected": false, 1946 | "text": "default", 1947 | "value": "default" 1948 | }, 1949 | "description": null, 1950 | "error": null, 1951 | "hide": 0, 1952 | "includeAll": false, 1953 | "label": null, 1954 | "multi": false, 1955 | "name": "datasource", 1956 | "options": [], 1957 | "query": "prometheus", 1958 | "queryValue": "", 1959 | "refresh": 1, 1960 | "regex": "", 1961 | "skipUrlSync": false, 1962 | "type": "datasource" 1963 | }, 1964 | { 1965 | "allValue": ".*", 1966 | "current": { 1967 | "selected": true, 1968 | "text": "All", 1969 | "value": "$__all" 1970 | }, 1971 | "hide": 0, 1972 | "includeAll": true, 1973 | "multi": false, 1974 | "name": "Namespace", 1975 | "options": [ 1976 | { 1977 | "selected": true, 1978 | "text": "All", 1979 | "value": "$__all" 1980 | } 1981 | ], 1982 | "query": "", 1983 | "queryValue": "", 1984 | "skipUrlSync": false, 1985 | "type": "custom" 1986 | }, 1987 | { 1988 | "allValue": ".*", 1989 | "current": { 1990 | "selected": true, 1991 | "text": "All", 1992 | "value": "$__all" 1993 | }, 1994 | "hide": 0, 1995 | "includeAll": true, 1996 | "multi": false, 1997 | "name": "WorkflowType", 1998 | "options": [ 1999 | { 2000 | "selected": true, 2001 | "text": "All", 2002 | "value": "$__all" 2003 | } 2004 | ], 2005 | "query": "", 2006 | "skipUrlSync": false, 2007 | "type": "custom" 2008 | } 2009 | ] 2010 | }, 2011 | "time": { 2012 | "from": "now-1h", 2013 | "to": "now" 2014 | }, 2015 | "timepicker": { 2016 | "refresh_intervals": [ 2017 | "30s" 2018 | ] 2019 | }, 2020 | "timezone": "", 2021 | "title": "Temporal SDK Metrics", 2022 | "uid": "XXEJjl17k", 2023 | "version": 1, 2024 | "weekStart": "" 2025 | } -------------------------------------------------------------------------------- /deployment/grafana/provisioning/dashboards/all.yml: -------------------------------------------------------------------------------- 1 | - name: 'default' 2 | org_id: 1 3 | folder: '' 4 | type: 'file' 5 | options: 6 | folder: '/var/lib/grafana/dashboards' -------------------------------------------------------------------------------- /deployment/grafana/provisioning/datasources/all.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: 'Temporal Prometheus' 5 | type: 'prometheus' 6 | org_id: 1 7 | url: 'http://prometheus:9090' 8 | is_default: true 9 | version: 1 10 | editable: true 11 | - name: 'Loki' 12 | type: loki 13 | access: proxy 14 | url: 'http://loki:3100' 15 | jsonData: 16 | maxLines: 1000 -------------------------------------------------------------------------------- /deployment/loki/local-config.yaml: -------------------------------------------------------------------------------- 1 | auth_enabled: false 2 | 3 | server: 4 | http_listen_port: 3100 5 | log_level: error 6 | 7 | ingester: 8 | wal: 9 | dir: "/tmp/wal" 10 | lifecycler: 11 | address: 127.0.0.1 12 | ring: 13 | kvstore: 14 | store: inmemory 15 | replication_factor: 1 16 | final_sleep: 0s 17 | chunk_idle_period: 5m 18 | chunk_retain_period: 30s 19 | 20 | schema_config: 21 | configs: 22 | - from: 2022-11-20 23 | store: boltdb 24 | object_store: filesystem 25 | schema: v9 26 | index: 27 | prefix: index_ 28 | period: 168h 29 | 30 | storage_config: 31 | boltdb: 32 | directory: /tmp/loki/index 33 | 34 | filesystem: 35 | directory: /tmp/loki/chunks 36 | 37 | limits_config: 38 | enforce_metric_name: false 39 | reject_old_samples: true 40 | reject_old_samples_max_age: 168h 41 | 42 | chunk_store_config: 43 | max_look_back_period: 0 44 | 45 | table_manager: 46 | chunk_tables_provisioning: 47 | inactive_read_throughput: 0 48 | inactive_write_throughput: 0 49 | provisioned_read_throughput: 0 50 | provisioned_write_throughput: 0 51 | index_tables_provisioning: 52 | inactive_read_throughput: 0 53 | inactive_write_throughput: 0 54 | provisioned_read_throughput: 0 55 | provisioned_write_throughput: 0 56 | retention_deletes_enabled: false 57 | retention_period: 0 -------------------------------------------------------------------------------- /deployment/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | 3 | events { 4 | worker_connections 2048; 5 | } 6 | 7 | http { 8 | grpc_connect_timeout 75; 9 | proxy_read_timeout 1d; 10 | proxy_connect_timeout 1d; 11 | proxy_send_timeout 1d; 12 | 13 | upstream frontend_hosts { 14 | server temporal-frontend:7237 max_fails=0; 15 | server temporal-frontend2:7236 max_fails=0; 16 | 17 | keepalive 64; 18 | keepalive_time 1d; 19 | keepalive_timeout 75s; 20 | keepalive_requests 100000; 21 | } 22 | 23 | server { 24 | listen 7233 http2; 25 | location / { 26 | grpc_pass grpc://frontend_hosts; 27 | proxy_set_header Connection ""; 28 | proxy_http_version 1.1; 29 | } 30 | 31 | # Standard HTTP-to-gRPC status code mappings 32 | # Ref: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md 33 | error_page 400 = @grpc_internal; 34 | error_page 401 = @grpc_unauthenticated; 35 | error_page 403 = @grpc_permission_denied; 36 | error_page 404 = @grpc_unimplemented; 37 | error_page 429 = @grpc_unavailable; 38 | error_page 502 = @grpc_unavailable; 39 | error_page 503 = @grpc_unavailable; 40 | error_page 504 = @grpc_unavailable; 41 | # NGINX-to-gRPC status code mappings 42 | # Ref: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md 43 | # 44 | error_page 405 = @grpc_internal; # Method not allowed 45 | error_page 408 = @grpc_deadline_exceeded; # Request timeout 46 | error_page 413 = @grpc_resource_exhausted; # Payload too large 47 | error_page 414 = @grpc_resource_exhausted; # Request URI too large 48 | error_page 415 = @grpc_internal; # Unsupported media type; 49 | error_page 426 = @grpc_internal; # HTTP request was sent to HTTPS port 50 | error_page 495 = @grpc_unauthenticated; # Client certificate authentication error 51 | error_page 496 = @grpc_unauthenticated; # Client certificate not presented 52 | error_page 497 = @grpc_internal; # HTTP request was sent to mutual TLS port 53 | error_page 500 = @grpc_internal; # Server error 54 | error_page 501 = @grpc_internal; # Not implemented 55 | # gRPC error responses 56 | # Ref: https://github.com/grpc/grpc-go/blob/master/codes/codes.go 57 | # 58 | location @grpc_deadline_exceeded { 59 | add_header grpc-status 4; 60 | add_header grpc-message 'deadline exceeded'; 61 | return 204; 62 | } 63 | location @grpc_permission_denied { 64 | add_header grpc-status 7; 65 | add_header grpc-message 'permission denied'; 66 | return 204; 67 | } 68 | location @grpc_resource_exhausted { 69 | add_header grpc-status 8; 70 | add_header grpc-message 'resource exhausted'; 71 | return 204; 72 | } 73 | location @grpc_unimplemented { 74 | add_header grpc-status 12; 75 | add_header grpc-message unimplemented; 76 | return 204; 77 | } 78 | location @grpc_internal { 79 | add_header grpc-status 13; 80 | add_header grpc-message 'internal error'; 81 | return 204; 82 | } 83 | location @grpc_unavailable { 84 | add_header grpc-status 14; 85 | add_header grpc-message unavailable; 86 | return 204; 87 | } 88 | location @grpc_unauthenticated { 89 | add_header grpc-status 16; 90 | add_header grpc-message unauthenticated; 91 | return 204; 92 | } 93 | default_type application/grpc; # Ensure gRPC for all error responses 94 | } 95 | } -------------------------------------------------------------------------------- /deployment/otel/otel-config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | memory_ballast: 3 | size_mib: 512 4 | zpages: 5 | endpoint: 0.0.0.0:55679 6 | 7 | receivers: 8 | otlp: 9 | protocols: 10 | grpc: 11 | http: 12 | 13 | processors: 14 | batch: 15 | 16 | exporters: 17 | logging: 18 | logLevel: debug 19 | jaeger: 20 | endpoint: jaeger-all-in-one:14250 21 | tls: 22 | insecure: true 23 | 24 | service: 25 | pipelines: 26 | traces: 27 | receivers: [ otlp ] 28 | processors: [ batch ] 29 | exporters: [ jaeger ] 30 | extensions: [ memory_ballast, zpages ] -------------------------------------------------------------------------------- /deployment/prometheus/config.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 10s 3 | scrape_configs: 4 | - job_name: 'temporalmetrics' 5 | metrics_path: /metrics 6 | scheme: http 7 | static_configs: 8 | # Server metrics target 9 | - targets: 10 | - 'host.docker.internal:8000' 11 | - 'host.docker.internal:8001' 12 | - 'host.docker.internal:8002' 13 | - 'host.docker.internal:8003' 14 | - 'host.docker.internal:8004' 15 | labels: 16 | group: 'server-metrics' 17 | 18 | # Local app targets (if configured) 19 | - targets: 20 | - 'host.docker.internal:8077' 21 | - 'host.docker.internal:8078' 22 | labels: 23 | group: 'sdk-metrics' 24 | # Docker metrics 25 | - targets: 26 | - 'host.docker.internal:9323' 27 | labels: 28 | group: 'docker-metrics' 29 | # Postgres Exporter 30 | - targets: 31 | - 'host.docker.internal:9187' 32 | labels: 33 | group: 'postgres-metrics' 34 | - job_name: 'springbootjavasdk' 35 | metrics_path: /actuator/prometheus 36 | scheme: http 37 | static_configs: 38 | - targets: 39 | - 'host.docker.internal:3030' 40 | labels: 41 | group: 'spring-boot-metrics' -------------------------------------------------------------------------------- /docker-compose-cass-es.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | cassandra: 4 | container_name: temporal-cassandra 5 | image: cassandra:${CASSANDRA_VERSION} 6 | networks: 7 | - temporal-network 8 | ports: 9 | - 9042:9042 10 | volumes: 11 | - /var/lib/cassandra 12 | elasticsearch: 13 | container_name: temporal-elasticsearch 14 | environment: 15 | - cluster.routing.allocation.disk.threshold_enabled=true 16 | - cluster.routing.allocation.disk.watermark.low=512mb 17 | - cluster.routing.allocation.disk.watermark.high=256mb 18 | - cluster.routing.allocation.disk.watermark.flood_stage=128mb 19 | - discovery.type=single-node 20 | - ES_JAVA_OPTS=-Xms256m -Xmx256m 21 | - xpack.security.enabled=false 22 | image: elasticsearch:${ELASTICSEARCH_VERSION} 23 | networks: 24 | - temporal-network 25 | ports: 26 | - 9200:9200 27 | volumes: 28 | - /var/lib/elasticsearch/data 29 | temporal: 30 | container_name: temporal 31 | depends_on: 32 | - cassandra 33 | - elasticsearch 34 | environment: 35 | - CASSANDRA_SEEDS=cassandra 36 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-cass.yaml 37 | - ENABLE_ES=true 38 | - ES_SEEDS=elasticsearch 39 | - ES_VERSION=v7 40 | - TEMPORAL_ADDRESS=temporal:7233 41 | - TEMPORAL_CLI_ADDRESS=temporal:7233 42 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 43 | networks: 44 | - temporal-network 45 | ports: 46 | - 7233:7233 47 | volumes: 48 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 49 | temporal-admin-tools: 50 | container_name: temporal-admin-tools 51 | depends_on: 52 | - temporal 53 | environment: 54 | - TEMPORAL_ADDRESS=temporal:7233 55 | - TEMPORAL_CLI_ADDRESS=temporal:7233 56 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 57 | networks: 58 | - temporal-network 59 | stdin_open: true 60 | tty: true 61 | temporal-ui: 62 | container_name: temporal-ui 63 | depends_on: 64 | - temporal 65 | environment: 66 | - TEMPORAL_ADDRESS=temporal:7233 67 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 68 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 69 | networks: 70 | - temporal-network 71 | ports: 72 | - 8080:8080 73 | networks: 74 | temporal-network: 75 | driver: bridge 76 | name: temporal-network 77 | -------------------------------------------------------------------------------- /docker-compose-multirole.yaml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | 3 | x-logging: &loki-logging 4 | logging: 5 | driver: loki 6 | options: 7 | loki-url: "http://host.docker.internal:3100/loki/api/v1/push" 8 | mode: non-blocking 9 | max-buffer-size: 4m 10 | loki-retries: "3" 11 | 12 | services: 13 | loki: 14 | container_name: loki 15 | image: grafana/loki:latest 16 | ports: 17 | - published: 3100 18 | target: 3100 19 | command: -config.file=/etc/loki/local-config.yaml 20 | volumes: 21 | - type: bind 22 | source: ./deployment/loki/local-config.yaml 23 | target: /etc/loki/local-config.yaml 24 | depends_on: 25 | - grafana 26 | networks: 27 | - temporal-network 28 | 29 | elasticsearch: 30 | <<: *loki-logging 31 | container_name: temporal-elasticsearch 32 | environment: 33 | - discovery.type=single-node 34 | - ES_JAVA_OPTS=-Xms512m -Xmx512m 35 | - xpack.security.enabled=false 36 | image: elasticsearch:${ELASTICSEARCH_VERSION} 37 | ports: 38 | - published: 9200 39 | target: 9200 40 | networks: 41 | - temporal-network 42 | 43 | postgresql: 44 | <<: *loki-logging 45 | container_name: temporal-postgresql 46 | environment: 47 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 48 | POSTGRES_USER: ${POSTGRES_USER} 49 | image: postgres:${POSTGRESQL_VERSION} 50 | expose: 51 | - ${POSTGRES_DEFAULT_PORT} 52 | volumes: 53 | - /var/lib/postgresql/data 54 | networks: 55 | - temporal-network 56 | 57 | temporal-history: 58 | <<: *loki-logging 59 | container_name: temporal-history 60 | depends_on: 61 | - elasticsearch 62 | - postgresql 63 | environment: 64 | - DB=postgres12 65 | - DB_PORT=${POSTGRES_DEFAULT_PORT} 66 | - POSTGRES_USER=${POSTGRES_USER} 67 | - POSTGRES_PWD=${POSTGRES_PASSWORD} 68 | - POSTGRES_SEEDS=postgresql 69 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 70 | - TEMPORAL_HISTORY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 71 | - TEMPORAL_VISIBILITY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 72 | - SERVICES=history 73 | - PROMETHEUS_ENDPOINT=0.0.0.0:8000 74 | - ENABLE_ES=true 75 | - ES_SEEDS=elasticsearch 76 | - ES_VERSION=v7 77 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 78 | - TEMPORAL_ADDRESS=temporal-nginx:7233 79 | # use temporalio/auto-setup to automatically setup DB schema and namespaces 80 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 81 | ports: 82 | - published: 7234 83 | target: 7234 84 | - published: 8000 85 | target: 8000 86 | restart: on-failure 87 | volumes: 88 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 89 | networks: 90 | - temporal-network 91 | 92 | temporal-matching: 93 | <<: *loki-logging 94 | container_name: temporal-matching 95 | depends_on: 96 | - temporal-history 97 | environment: 98 | - DB=postgres12 99 | - DB_PORT=${POSTGRES_DEFAULT_PORT} 100 | - POSTGRES_USER=${POSTGRES_USER} 101 | - POSTGRES_PWD=${POSTGRES_PASSWORD} 102 | - POSTGRES_SEEDS=postgresql 103 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 104 | - TEMPORAL_HISTORY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 105 | - TEMPORAL_VISIBILITY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 106 | - SERVICES=matching 107 | - PROMETHEUS_ENDPOINT=0.0.0.0:8001 108 | - ENABLE_ES=true 109 | - ES_SEEDS=elasticsearch 110 | - ES_VERSION=v7 111 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 112 | - TEMPORAL_ADDRESS=temporal-nginx:7233 113 | image: temporalio/server:${TEMPORAL_VERSION} 114 | ports: 115 | - published: 7235 116 | target: 7235 117 | - published: 8001 118 | target: 8001 119 | restart: on-failure 120 | volumes: 121 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 122 | networks: 123 | - temporal-network 124 | 125 | temporal-frontend: 126 | <<: *loki-logging 127 | container_name: temporal-frontend 128 | depends_on: 129 | - temporal-matching 130 | environment: 131 | - DB=postgres12 132 | - DB_PORT=${POSTGRES_DEFAULT_PORT} 133 | - POSTGRES_USER=${POSTGRES_USER} 134 | - POSTGRES_PWD=${POSTGRES_PASSWORD} 135 | - POSTGRES_SEEDS=postgresql 136 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 137 | - TEMPORAL_HISTORY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 138 | - TEMPORAL_VISIBILITY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 139 | - SERVICES=frontend 140 | - FRONTEND_GRPC_PORT=7237 141 | - PROMETHEUS_ENDPOINT=0.0.0.0:8002 142 | - ENABLE_ES=true 143 | - ES_SEEDS=elasticsearch 144 | - ES_VERSION=v7 145 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 146 | - TEMPORAL_ADDRESS=temporal-nginx:7233 147 | image: temporalio/server:${TEMPORAL_VERSION} 148 | ports: 149 | - published: 7237 150 | target: 7237 151 | - published: 8002 152 | target: 8002 153 | restart: on-failure 154 | volumes: 155 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 156 | networks: 157 | - temporal-network 158 | 159 | temporal-frontend2: 160 | <<: *loki-logging 161 | container_name: temporal-frontend2 162 | depends_on: 163 | - temporal-matching 164 | environment: 165 | - DB=postgres12 166 | - DB_PORT=${POSTGRES_DEFAULT_PORT} 167 | - POSTGRES_USER=${POSTGRES_USER} 168 | - POSTGRES_PWD=${POSTGRES_PASSWORD} 169 | - POSTGRES_SEEDS=postgresql 170 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 171 | - TEMPORAL_HISTORY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 172 | - TEMPORAL_VISIBILITY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 173 | - SERVICES=frontend 174 | # set different frontend grpc port 175 | - FRONTEND_GRPC_PORT=7236 176 | # set different membership port than temporal-frontend 177 | - FRONTEND_MEMBERSHIP_PORT=6936 178 | - PROMETHEUS_ENDPOINT=0.0.0.0:8004 179 | - ENABLE_ES=true 180 | - ES_SEEDS=elasticsearch 181 | - ES_VERSION=v7 182 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 183 | - TEMPORAL_ADDRESS=temporal-nginx:7233 184 | image: temporalio/server:${TEMPORAL_VERSION} 185 | ports: 186 | - published: 7236 187 | target: 7236 188 | - published: 8004 189 | target: 8004 190 | restart: on-failure 191 | volumes: 192 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 193 | networks: 194 | - temporal-network 195 | 196 | temporal-worker: 197 | <<: *loki-logging 198 | container_name: temporal-worker 199 | depends_on: 200 | - temporal-nginx 201 | environment: 202 | - DB=postgres12 203 | - DB_PORT=${POSTGRES_DEFAULT_PORT} 204 | - POSTGRES_USER=${POSTGRES_USER} 205 | - POSTGRES_PWD=${POSTGRES_PASSWORD} 206 | - POSTGRES_SEEDS=postgresql 207 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 208 | - TEMPORAL_HISTORY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 209 | - TEMPORAL_VISIBILITY_NAMESPACEDEFAULT_ARCHIVAL_FILESTORE=enabled 210 | - SERVICES=worker 211 | - PROMETHEUS_ENDPOINT=0.0.0.0:8003 212 | # set to nginx 213 | - PUBLIC_FRONTEND_ADDRESS=temporal-nginx:7233 214 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 215 | - TEMPORAL_ADDRESS=temporal-nginx:7233 216 | - ENABLE_ES=true 217 | - ES_SEEDS=elasticsearch 218 | - ES_VERSION=v7 219 | image: temporalio/server:${TEMPORAL_VERSION} 220 | ports: 221 | - published: 7232 222 | target: 7232 223 | - published: 8003 224 | target: 8003 225 | restart: on-failure 226 | volumes: 227 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 228 | networks: 229 | - temporal-network 230 | 231 | temporal-admin-tools: 232 | <<: *loki-logging 233 | container_name: temporal-admin-tools 234 | depends_on: 235 | - temporal-nginx 236 | environment: 237 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 238 | - TEMPORAL_ADDRESS=temporal-nginx:7233 239 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 240 | stdin_open: true 241 | tty: true 242 | networks: 243 | - temporal-network 244 | 245 | temporal-ui: 246 | container_name: temporal-ui 247 | depends_on: 248 | - temporal-nginx 249 | environment: 250 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 251 | - TEMPORAL_CLI_ADDRESS=temporal-nginx:7233 252 | - TEMPORAL_ADDRESS=temporal-nginx:7233 253 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 254 | ports: 255 | - 8080:8080 256 | networks: 257 | - temporal-network 258 | 259 | prometheus: 260 | container_name: prometheus 261 | image: prom/prometheus:v2.37.0 262 | ports: 263 | - published: 9090 264 | target: 9090 265 | volumes: 266 | - type: bind 267 | source: ./deployment/prometheus/config.yml 268 | target: /etc/prometheus/prometheus.yml 269 | depends_on: 270 | - temporal-worker 271 | networks: 272 | - temporal-network 273 | 274 | grafana: 275 | container_name: grafana 276 | image: grafana/grafana:7.5.16 277 | build: './deployment/grafana' 278 | environment: 279 | - GF_AUTH_DISABLE_LOGIN_FORM=true 280 | - GF_AUTH_ANONYMOUS_ENABLED=true 281 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin 282 | ports: 283 | - published: 8085 284 | target: 3000 285 | volumes: 286 | - type: bind 287 | source: ./deployment/grafana/provisioning/datasources 288 | target: /etc/grafana/provisioning/datasources 289 | depends_on: 290 | - prometheus 291 | networks: 292 | - temporal-network 293 | 294 | jaeger-all-in-one: 295 | image: jaegertracing/all-in-one:1.37 296 | ports: 297 | - published: 16686 298 | target: 16686 299 | - published: 14268 300 | target: 14268 301 | - published: 14250 302 | target: 14250 303 | networks: 304 | - temporal-network 305 | 306 | otel-collector: 307 | image: otel/opentelemetry-collector:0.47.0 308 | command: [ "--config=/etc/otel-collector-config.yaml" ] 309 | volumes: 310 | - type: bind 311 | source: ./deployment/otel/otel-config.yaml 312 | target: /etc/otel-collector-config.yaml 313 | ports: 314 | - published: 1888 315 | target: 1888 316 | - published: 13133 317 | target: 13133 318 | - published: 4317 319 | target: 4317 320 | - published: 55670 321 | target: 55670 322 | depends_on: 323 | - jaeger-all-in-one 324 | networks: 325 | - temporal-network 326 | 327 | temporal-nginx: 328 | <<: *loki-logging 329 | image: nginx:1.22.1 330 | container_name: temporal-nginx 331 | restart: unless-stopped 332 | depends_on: 333 | - temporal-frontend 334 | - temporal-frontend2 335 | ports: 336 | - 7233:7233 337 | volumes: 338 | - ./deployment/nginx/nginx.conf:/etc/nginx/nginx.conf 339 | networks: 340 | - temporal-network 341 | 342 | networks: 343 | temporal-network: 344 | driver: bridge 345 | name: temporal-network 346 | -------------------------------------------------------------------------------- /docker-compose-mysql-es.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | elasticsearch: 4 | container_name: temporal-elasticsearch 5 | environment: 6 | - cluster.routing.allocation.disk.threshold_enabled=true 7 | - cluster.routing.allocation.disk.watermark.low=512mb 8 | - cluster.routing.allocation.disk.watermark.high=256mb 9 | - cluster.routing.allocation.disk.watermark.flood_stage=128mb 10 | - discovery.type=single-node 11 | - ES_JAVA_OPTS=-Xms256m -Xmx256m 12 | - xpack.security.enabled=false 13 | image: elasticsearch:${ELASTICSEARCH_VERSION} 14 | networks: 15 | - temporal-network 16 | ports: 17 | - 9200:9200 18 | volumes: 19 | - /var/lib/elasticsearch/data 20 | mysql: 21 | container_name: temporal-mysql 22 | environment: 23 | - MYSQL_ROOT_PASSWORD=root 24 | image: mysql:${MYSQL_VERSION} 25 | networks: 26 | - temporal-network 27 | ports: 28 | - 3306:3306 29 | volumes: 30 | - /var/lib/mysql 31 | temporal: 32 | container_name: temporal 33 | depends_on: 34 | - mysql 35 | - elasticsearch 36 | environment: 37 | - DB=mysql8 38 | - MYSQL_USER=root 39 | - MYSQL_PWD=root 40 | - MYSQL_SEEDS=mysql 41 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 42 | - ENABLE_ES=true 43 | - ES_SEEDS=elasticsearch 44 | - ES_VERSION=v7 45 | - TEMPORAL_ADDRESS=temporal:7233 46 | - TEMPORAL_CLI_ADDRESS=temporal:7233 47 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 48 | networks: 49 | - temporal-network 50 | ports: 51 | - 7233:7233 52 | volumes: 53 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 54 | temporal-admin-tools: 55 | container_name: temporal-admin-tools 56 | depends_on: 57 | - temporal 58 | environment: 59 | - TEMPORAL_ADDRESS=temporal:7233 60 | - TEMPORAL_CLI_ADDRESS=temporal:7233 61 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 62 | networks: 63 | - temporal-network 64 | stdin_open: true 65 | tty: true 66 | temporal-ui: 67 | container_name: temporal-ui 68 | depends_on: 69 | - temporal 70 | environment: 71 | - TEMPORAL_ADDRESS=temporal:7233 72 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 73 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 74 | networks: 75 | - temporal-network 76 | ports: 77 | - 8080:8080 78 | networks: 79 | temporal-network: 80 | driver: bridge 81 | name: temporal-network 82 | -------------------------------------------------------------------------------- /docker-compose-mysql.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | mysql: 4 | container_name: temporal-mysql 5 | environment: 6 | - MYSQL_ROOT_PASSWORD=root 7 | image: mysql:${MYSQL_VERSION} 8 | networks: 9 | - temporal-network 10 | ports: 11 | - 3306:3306 12 | volumes: 13 | - /var/lib/mysql 14 | temporal: 15 | container_name: temporal 16 | depends_on: 17 | - mysql 18 | environment: 19 | - DB=mysql8 20 | - DB_PORT=3306 21 | - MYSQL_USER=root 22 | - MYSQL_PWD=root 23 | - MYSQL_SEEDS=mysql 24 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 25 | - TEMPORAL_ADDRESS=temporal:7233 26 | - TEMPORAL_CLI_ADDRESS=temporal:7233 27 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 28 | networks: 29 | - temporal-network 30 | ports: 31 | - 7233:7233 32 | volumes: 33 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 34 | temporal-admin-tools: 35 | container_name: temporal-admin-tools 36 | depends_on: 37 | - temporal 38 | environment: 39 | - TEMPORAL_ADDRESS=temporal:7233 40 | - TEMPORAL_CLI_ADDRESS=temporal:7233 41 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 42 | networks: 43 | - temporal-network 44 | stdin_open: true 45 | tty: true 46 | temporal-ui: 47 | container_name: temporal-ui 48 | depends_on: 49 | - temporal 50 | environment: 51 | - TEMPORAL_ADDRESS=temporal:7233 52 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 53 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 54 | networks: 55 | - temporal-network 56 | ports: 57 | - 8080:8080 58 | networks: 59 | temporal-network: 60 | driver: bridge 61 | name: temporal-network 62 | -------------------------------------------------------------------------------- /docker-compose-postgres-opensearch.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | opensearch: 4 | container_name: temporal-opensearch 5 | environment: 6 | - discovery.type=single-node 7 | - OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m 8 | - cluster.routing.allocation.disk.threshold_enabled=true 9 | - cluster.routing.allocation.disk.watermark.low=512mb 10 | - cluster.routing.allocation.disk.watermark.high=256mb 11 | - cluster.routing.allocation.disk.watermark.flood_stage=128mb 12 | - plugins.security.disabled=true 13 | image: opensearchproject/opensearch:${OPENSEARCH_VERSION} 14 | ulimits: 15 | # memlock: 16 | # soft: -1 # Set memlock to unlimited (no soft or hard limit) 17 | # hard: -1 18 | nofile: 19 | soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536 20 | hard: 65536 21 | networks: 22 | - temporal-network 23 | expose: 24 | - 9200 25 | volumes: 26 | - /usr/share/opensearch/data 27 | postgresql: 28 | container_name: temporal-postgresql 29 | environment: 30 | POSTGRES_PASSWORD: temporal 31 | POSTGRES_USER: temporal 32 | image: postgres:${POSTGRESQL_VERSION} 33 | networks: 34 | - temporal-network 35 | expose: 36 | - 5432 37 | volumes: 38 | - /var/lib/postgresql/data 39 | temporal: 40 | container_name: temporal 41 | depends_on: 42 | - postgresql 43 | - opensearch 44 | environment: 45 | - DB=postgres12 46 | - DB_PORT=5432 47 | - POSTGRES_USER=temporal 48 | - POSTGRES_PWD=temporal 49 | - POSTGRES_SEEDS=postgresql 50 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 51 | - ENABLE_ES=true 52 | - ES_SEEDS=opensearch 53 | - ES_VERSION=v7 54 | - TEMPORAL_ADDRESS=temporal:7233 55 | - TEMPORAL_CLI_ADDRESS=temporal:7233 56 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 57 | networks: 58 | - temporal-network 59 | ports: 60 | - 7233:7233 61 | volumes: 62 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 63 | temporal-admin-tools: 64 | container_name: temporal-admin-tools 65 | depends_on: 66 | - temporal 67 | environment: 68 | - TEMPORAL_ADDRESS=temporal:7233 69 | - TEMPORAL_CLI_ADDRESS=temporal:7233 70 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 71 | networks: 72 | - temporal-network 73 | stdin_open: true 74 | tty: true 75 | temporal-ui: 76 | container_name: temporal-ui 77 | depends_on: 78 | - temporal 79 | environment: 80 | - TEMPORAL_ADDRESS=temporal:7233 81 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 82 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 83 | networks: 84 | - temporal-network 85 | ports: 86 | - 8080:8080 87 | networks: 88 | temporal-network: 89 | driver: bridge 90 | name: temporal-network 91 | -------------------------------------------------------------------------------- /docker-compose-postgres.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | postgresql: 4 | container_name: temporal-postgresql 5 | environment: 6 | POSTGRES_PASSWORD: temporal 7 | POSTGRES_USER: temporal 8 | image: postgres:${POSTGRESQL_VERSION} 9 | networks: 10 | - temporal-network 11 | ports: 12 | - 5432:5432 13 | volumes: 14 | - /var/lib/postgresql/data 15 | temporal: 16 | container_name: temporal 17 | depends_on: 18 | - postgresql 19 | environment: 20 | - DB=postgres12 21 | - DB_PORT=5432 22 | - POSTGRES_USER=temporal 23 | - POSTGRES_PWD=temporal 24 | - POSTGRES_SEEDS=postgresql 25 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 26 | - TEMPORAL_ADDRESS=temporal:7233 27 | - TEMPORAL_CLI_ADDRESS=temporal:7233 28 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 29 | networks: 30 | - temporal-network 31 | ports: 32 | - 7233:7233 33 | volumes: 34 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 35 | temporal-admin-tools: 36 | container_name: temporal-admin-tools 37 | depends_on: 38 | - temporal 39 | environment: 40 | - TEMPORAL_ADDRESS=temporal:7233 41 | - TEMPORAL_CLI_ADDRESS=temporal:7233 42 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 43 | networks: 44 | - temporal-network 45 | stdin_open: true 46 | tty: true 47 | temporal-ui: 48 | container_name: temporal-ui 49 | depends_on: 50 | - temporal 51 | environment: 52 | - TEMPORAL_ADDRESS=temporal:7233 53 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 54 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 55 | networks: 56 | - temporal-network 57 | ports: 58 | - 8080:8080 59 | networks: 60 | temporal-network: 61 | driver: bridge 62 | name: temporal-network 63 | -------------------------------------------------------------------------------- /docker-compose-tls.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | elasticsearch: 4 | container_name: temporal-elasticsearch 5 | environment: 6 | - cluster.routing.allocation.disk.threshold_enabled=true 7 | - cluster.routing.allocation.disk.watermark.low=512mb 8 | - cluster.routing.allocation.disk.watermark.high=256mb 9 | - cluster.routing.allocation.disk.watermark.flood_stage=128mb 10 | - discovery.type=single-node 11 | - ES_JAVA_OPTS=-Xms256m -Xmx256m 12 | - ELASTIC_PASSWORD=elastic 13 | - xpack.security.enabled=true 14 | - xpack.security.http.ssl.enabled=true 15 | - xpack.security.http.ssl.key=certs/elasticsearch-key.pem 16 | - xpack.security.http.ssl.certificate=certs/elasticsearch.pem 17 | - xpack.security.http.ssl.certificate_authorities=certs/ca.pem 18 | - xpack.security.transport.ssl.enabled=true 19 | - xpack.security.transport.ssl.key=certs/elasticsearch-key.pem 20 | - xpack.security.transport.ssl.certificate=certs/elasticsearch.pem 21 | - xpack.security.transport.ssl.certificate_authorities=certs/ca.pem 22 | image: elasticsearch:${ELASTICSEARCH_VERSION} 23 | networks: 24 | - temporal-network 25 | expose: 26 | - 9200 27 | volumes: 28 | - temporal_tls_pki:/usr/share/elasticsearch/config/certs 29 | - /var/lib/elasticsearch/data 30 | restart: on-failure 31 | postgresql: 32 | container_name: temporal-postgresql 33 | command: 34 | - "-c" 35 | - "ssl=on" 36 | - "-c" 37 | - "ssl_cert_file=/pki/postgresql.pem" 38 | - "-c" 39 | - "ssl_key_file=/pki/postgresql-key.pem" 40 | - "-c" 41 | - "ssl_ca_file=/pki/ca.pem" 42 | environment: 43 | POSTGRES_PASSWORD: temporal 44 | POSTGRES_USER: temporal 45 | image: postgres:${POSTGRESQL_VERSION} 46 | networks: 47 | - temporal-network 48 | expose: 49 | - 5432 50 | volumes: 51 | - temporal_tls_pki:/pki 52 | - /var/lib/postgresql/data 53 | restart: on-failure 54 | temporal: 55 | container_name: temporal 56 | build: 57 | context: . 58 | dockerfile: tls/Dockerfile.auto-setup-tls 59 | args: 60 | - BASEIMAGE=auto-setup:${TEMPORAL_VERSION} 61 | image: auto-setup-tls:${TEMPORAL_VERSION} 62 | depends_on: 63 | - postgresql 64 | - elasticsearch 65 | environment: 66 | - DB=postgres12 67 | - DB_PORT=5432 68 | - POSTGRES_USER=temporal 69 | - POSTGRES_PWD=temporal 70 | - POSTGRES_SEEDS=postgresql 71 | - SQL_TLS=true 72 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 73 | - ENABLE_ES=true 74 | - ES_SEEDS=elasticsearch 75 | - ES_VERSION=v7 76 | - ES_SCHEME=https 77 | - ES_USER=elastic 78 | - ES_PWD=elastic 79 | - TEMPORAL_ADDRESS=temporal:7233 80 | - TEMPORAL_CLI_ADDRESS=temporal:7233 81 | networks: 82 | - temporal-network 83 | ports: 84 | - 7233:7233 85 | volumes: 86 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 87 | restart: on-failure 88 | temporal-admin-tools: 89 | container_name: temporal-admin-tools 90 | depends_on: 91 | - temporal 92 | environment: 93 | - TEMPORAL_ADDRESS=temporal:7233 94 | - TEMPORAL_CLI_ADDRESS=temporal:7233 95 | build: 96 | context: . 97 | dockerfile: tls/Dockerfile.admin-tools-tls 98 | args: 99 | - BASEIMAGE=admin-tools:${TEMPORAL_VERSION} 100 | image: temporalio/admin-tools-tls:${TEMPORAL_VERSION} 101 | networks: 102 | - temporal-network 103 | stdin_open: true 104 | tty: true 105 | temporal-ui: 106 | container_name: temporal-ui 107 | depends_on: 108 | - temporal 109 | environment: 110 | - TEMPORAL_ADDRESS=temporal:7233 111 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 112 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 113 | networks: 114 | - temporal-network 115 | ports: 116 | - 8080:8080 117 | restart: on-failure 118 | networks: 119 | temporal-network: 120 | driver: bridge 121 | name: temporal-network 122 | volumes: 123 | temporal_tls_pki: 124 | external: true 125 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.5" 2 | services: 3 | elasticsearch: 4 | container_name: temporal-elasticsearch 5 | environment: 6 | - cluster.routing.allocation.disk.threshold_enabled=true 7 | - cluster.routing.allocation.disk.watermark.low=512mb 8 | - cluster.routing.allocation.disk.watermark.high=256mb 9 | - cluster.routing.allocation.disk.watermark.flood_stage=128mb 10 | - discovery.type=single-node 11 | - ES_JAVA_OPTS=-Xms256m -Xmx256m 12 | - xpack.security.enabled=false 13 | image: elasticsearch:${ELASTICSEARCH_VERSION} 14 | networks: 15 | - temporal-network 16 | expose: 17 | - 9200 18 | volumes: 19 | - /var/lib/elasticsearch/data 20 | postgresql: 21 | container_name: temporal-postgresql 22 | environment: 23 | POSTGRES_PASSWORD: temporal 24 | POSTGRES_USER: temporal 25 | image: postgres:${POSTGRESQL_VERSION} 26 | networks: 27 | - temporal-network 28 | expose: 29 | - 5432 30 | volumes: 31 | - /var/lib/postgresql/data 32 | temporal: 33 | container_name: temporal 34 | depends_on: 35 | - postgresql 36 | - elasticsearch 37 | environment: 38 | - DB=postgres12 39 | - DB_PORT=5432 40 | - POSTGRES_USER=temporal 41 | - POSTGRES_PWD=temporal 42 | - POSTGRES_SEEDS=postgresql 43 | - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml 44 | - ENABLE_ES=true 45 | - ES_SEEDS=elasticsearch 46 | - ES_VERSION=v7 47 | - TEMPORAL_ADDRESS=temporal:7233 48 | - TEMPORAL_CLI_ADDRESS=temporal:7233 49 | image: temporalio/auto-setup:${TEMPORAL_VERSION} 50 | networks: 51 | - temporal-network 52 | ports: 53 | - 7233:7233 54 | volumes: 55 | - ./dynamicconfig:/etc/temporal/config/dynamicconfig 56 | temporal-admin-tools: 57 | container_name: temporal-admin-tools 58 | depends_on: 59 | - temporal 60 | environment: 61 | - TEMPORAL_ADDRESS=temporal:7233 62 | - TEMPORAL_CLI_ADDRESS=temporal:7233 63 | image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION} 64 | networks: 65 | - temporal-network 66 | stdin_open: true 67 | tty: true 68 | temporal-ui: 69 | container_name: temporal-ui 70 | depends_on: 71 | - temporal 72 | environment: 73 | - TEMPORAL_ADDRESS=temporal:7233 74 | - TEMPORAL_CORS_ORIGINS=http://localhost:3000 75 | image: temporalio/ui:${TEMPORAL_UI_VERSION} 76 | networks: 77 | - temporal-network 78 | ports: 79 | - 8080:8080 80 | networks: 81 | temporal-network: 82 | driver: bridge 83 | name: temporal-network 84 | -------------------------------------------------------------------------------- /dynamicconfig/README.md: -------------------------------------------------------------------------------- 1 | Use `docker.yaml` file to override the default dynamic config value (they are specified 2 | when creating the service config). 3 | 4 | Each key can have zero or more values and each value can have zero or more 5 | constraints. There are only three types of constraint: 6 | 1. `namespace`: `string` 7 | 2. `taskQueueName`: `string` 8 | 3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`) 9 | A value will be selected and returned if all its has exactly the same constraints 10 | as the ones specified in query filters (including the number of constraints). 11 | 12 | Please use the following format: 13 | ``` 14 | testGetBoolPropertyKey: 15 | - value: false 16 | - value: true 17 | constraints: 18 | namespace: "global-samples-namespace" 19 | - value: false 20 | constraints: 21 | namespace: "samples-namespace" 22 | testGetDurationPropertyKey: 23 | - value: "1m" 24 | constraints: 25 | namespace: "samples-namespace" 26 | taskQueueName: "longIdleTimeTaskqueue" 27 | testGetFloat64PropertyKey: 28 | - value: 12.0 29 | constraints: 30 | namespace: "samples-namespace" 31 | testGetMapPropertyKey: 32 | - value: 33 | key1: 1 34 | key2: "value 2" 35 | key3: 36 | - false 37 | - key4: true 38 | key5: 2.0 39 | ``` 40 | -------------------------------------------------------------------------------- /dynamicconfig/development-cass.yaml: -------------------------------------------------------------------------------- 1 | system.forceSearchAttributesCacheRefreshOnRead: 2 | - value: true # Dev setup only. Please don't turn this on in production. 3 | constraints: {} 4 | -------------------------------------------------------------------------------- /dynamicconfig/development-sql.yaml: -------------------------------------------------------------------------------- 1 | limit.maxIDLength: 2 | - value: 255 3 | constraints: {} 4 | system.forceSearchAttributesCacheRefreshOnRead: 5 | - value: true # Dev setup only. Please don't turn this on in production. 6 | constraints: {} 7 | -------------------------------------------------------------------------------- /dynamicconfig/docker.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/temporalio/docker-compose/5326abea4cdc2590d2ff93e5e249824e873a7c2f/dynamicconfig/docker.yaml -------------------------------------------------------------------------------- /tls/Dockerfile.admin-tools-tls: -------------------------------------------------------------------------------- 1 | ARG BASEIMAGE 2 | FROM temporalio/${BASEIMAGE} 3 | 4 | COPY ./.pki/ca.pem /usr/local/share/ca-certificates/ca.crt 5 | 6 | RUN update-ca-certificates 7 | -------------------------------------------------------------------------------- /tls/Dockerfile.auto-setup-tls: -------------------------------------------------------------------------------- 1 | ARG BASEIMAGE 2 | FROM temporalio/${BASEIMAGE} 3 | 4 | USER root 5 | COPY ./.pki/ca.pem /usr/local/share/ca-certificates/ca.crt 6 | 7 | RUN update-ca-certificates 8 | 9 | USER temporal 10 | -------------------------------------------------------------------------------- /tls/Dockerfile.tls: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1.3-labs 2 | 3 | FROM golang 4 | 5 | RUN go install github.com/cloudflare/cfssl/cmd/cfssl@latest 6 | RUN go install github.com/cloudflare/cfssl/cmd/cfssljson@latest 7 | 8 | VOLUME ["/pki"] 9 | WORKDIR /pki 10 | 11 | VOLUME ["/pki-out"] 12 | 13 | RUN < ca-config.json 16 | echo '{"CN":"postgresql","hosts":[""],"key":{"algo":"rsa","size":2048}}' | cfssl gencert -config=ca-config.json -ca=ca.pem -ca-key=ca-key.pem -hostname="127.0.0.1,localhost,postgresql" - | cfssljson -bare postgresql 17 | echo '{"CN":"elasticsearch","hosts":[""],"key":{"algo":"rsa","size":2048}}' | cfssl gencert -config=ca-config.json -ca=ca.pem -ca-key=ca-key.pem -hostname="127.0.0.1,localhost,elasticsearch" - | cfssljson -bare elasticsearch 18 | 19 | chgrp 999 postgresql-key.pem 20 | chmod 640 postgresql-key.pem 21 | chmod 640 elasticsearch-key.pem 22 | EOF 23 | 24 | ENTRYPOINT cp /pki/ca.pem /pki-out/ca.pem 25 | -------------------------------------------------------------------------------- /tls/README.md: -------------------------------------------------------------------------------- 1 | # Temporal with tls enabled dependencies 2 | 3 | ## Execute 4 | 5 | run from a shell 6 | 7 | `./tls/run-tls.sh` 8 | 9 | ## Script source with comments 10 | ```bash 11 | #!/usr/bin/env bash 12 | set -xe 13 | 14 | # Build container image for generating cert material 15 | docker build -t temporal_tls:test -f ${PWD}/tls/Dockerfile.tls . 16 | mkdir -p .pki 17 | 18 | # Run container to name volume and copy out CA certificate 19 | docker run --rm -v temporal_tls_pki:/pki -v ${PWD}/.pki:/pki-out temporal_tls:test 20 | 21 | # Build extra layers which copy in CA certificate to local trust store 22 | # Allows for not having to disable host verification on TLS connections 23 | COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml build --no-cache 24 | 25 | # Run example docker-compose environment with elasticsearch and postgresql protected with TLS 26 | COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml up 27 | 28 | ``` 29 | -------------------------------------------------------------------------------- /tls/run-tls.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -xe 3 | 4 | # Build container image for generating cert material 5 | DOCKER_BUILDKIT=1 docker build -t temporal_tls:test -f ${PWD}/tls/Dockerfile.tls . 6 | mkdir -p .pki 7 | 8 | # Run container to name volume and copy out CA certificate 9 | docker run --rm -v temporal_tls_pki:/pki -v ${PWD}/.pki:/pki-out temporal_tls:test 10 | 11 | # Build extra layers which copy in CA certificate to local trust store 12 | # Allows for not having to disable host verification on TLS connections 13 | COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml build --no-cache 14 | 15 | # Run example docker-compose environment with elasticsearch and postgresql protected with TLS 16 | COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml up 17 | --------------------------------------------------------------------------------