Repository: jhipster/generator-jhipster
Pull request #7156 (2018-02-22 13:07:24)

fix Prettier error in Windows
Prettier wants quotes instead of apostrophes in Windows.
Without this fix there is Prettier error in Windows:
Angular: [error] No matching files. Patterns tried: '**/*.ts' !**/node_modules/** !./node_modules/**
React: [error] No matching files. Patterns tried: '**/*.{ts,tsx}' !**/node_modules/** !./node_modules/**

- Please make sure the below checklist is followed for Pull Requests.

- [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green
- [ ] Tests are added where necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed


gmarziou: I tested successfully the fix on Windows.

I wonder just if we really need to use any quote at all.
On Windows we can remove them, prettier still works.

    "prettier:format":"yarn prettier --write **/*.ts",


Patch:
diff --git a/generators/client/templates/angular/_package.json b/generators/client/templates/angular/_package.json
index 8933da3c0e..5c38ec5cb1 100644
--- a/generators/client/templates/angular/_package.json
+++ b/generators/client/templates/angular/_package.json
@@ -146,7 +146,7 @@
   },
   "scripts": {
     "precommit": "lint-staged",
-    "prettier:format":"<%= clientPackageManager %> prettier --write '**/*.ts'",
+    "prettier:format":"<%= clientPackageManager %> prettier --write **/*.ts",
     "lint": "tslint --project tsconfig.json -e 'node_modules/**'",
     "lint:fix": "<%= clientPackageManager %> run lint -- --fix",
     "ngc": "ngc -p tsconfig-aot.json",
diff --git a/generators/client/templates/react/_package.json b/generators/client/templates/react/_package.json
index 7ebf57a9ec..4c3808276f 100644
--- a/generators/client/templates/react/_package.json
+++ b/generators/client/templates/react/_package.json
@@ -162,7 +162,7 @@ limitations under the License.
   },
   "scripts": {
     "precommit": "lint-staged",
-    "prettier:format":"<%= clientPackageManager %> prettier --write '**/*.{ts,tsx}'",
+    "prettier:format":"<%= clientPackageManager %> prettier --write **/*.{ts,tsx}",
     "lint": "tslint --project tsconfig.json -e 'node_modules/**'",
     "lint:fix": "<%= clientPackageManager %> run lint -- --fix",
     "cleanup": "rimraf <%= BUILD_DIR %>www",
diff --git a/generators/docker-prompts.js b/generators/docker-prompts.js
index 229ae1f61d..a02cb46de8 100644
--- a/generators/docker-prompts.js
+++ b/generators/docker-prompts.js
@@ -253,7 +253,7 @@ function askForMonitoring() {
                 name: 'Yes, for metrics only with Prometheus (only compatible with JHipster >= v3.12)'
             }
         ],
-        default: this.monitoring ? this.monitoring : 'no'
+        default: 'no'
     }];
 
     this.prompt(prompts).then((props) => {
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index 6e7e8bebc6..4f94db8e5d 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -49,8 +49,6 @@ const DOCKER_GRAFANA = 'grafana/grafana:4.3.2';
 const DOCKER_JENKINS = 'jenkins:latest';
 const DOCKER_SWAGGER_EDITOR = 'swaggerapi/swagger-editor:latest';
 const DOCKER_COMPOSE_FORMAT_VERSION = '2';
-const DOCKER_PROMETHEUS_OPERATOR = 'quay.io/coreos/prometheus-operator:v0.16.1';
-const DOCKER_GRAFANA_WATCHER = 'quay.io/coreos/grafana-watcher:v0.0.8';
 
 // Version of Java, Scala
 const JAVA_VERSION = '1.8'; // Java version is forced to be 1.8. We keep the variable as it might be useful in the future.
@@ -214,9 +212,7 @@ const constants = {
     DOCKER_JENKINS,
     DOCKER_SWAGGER_EDITOR,
     SQL_DB_OPTIONS,
-    DOCKER_COMPOSE_FORMAT_VERSION,
-    DOCKER_PROMETHEUS_OPERATOR,
-    DOCKER_GRAFANA_WATCHER
+    DOCKER_COMPOSE_FORMAT_VERSION
 };
 
 module.exports = constants;
diff --git a/generators/kubernetes/files.js b/generators/kubernetes/files.js
index 1177dbfd2a..564c59fee8 100644
--- a/generators/kubernetes/files.js
+++ b/generators/kubernetes/files.js
@@ -26,72 +26,64 @@ function writeFiles() {
             for (let i = 0; i < this.appConfigs.length; i++) {
                 const appName = this.appConfigs[i].baseName.toLowerCase();
                 this.app = this.appConfigs[i];
-                this.template('_deployment.yml', `${this.directoryPath}/k8s/${appName}/${appName}-deployment.yml`);
-                this.template('_service.yml', `${this.directoryPath}/k8s/${appName}/${appName}-service.yml`);
+                this.template('_deployment.yml', `${appName}/${appName}-deployment.yml`);
+                this.template('_service.yml', `${appName}/${appName}-service.yml`);
                 // If we choose microservice with no DB, it is trying to move _no.yml as prodDatabaseType is getting tagged as 'string' type
                 if (this.app.prodDatabaseType !== 'no') {
-                    this.template(`db/_${this.app.prodDatabaseType}.yml`, `${this.directoryPath}/k8s/${appName}/${appName}-${this.app.prodDatabaseType}.yml`);
+                    this.template(`db/_${this.app.prodDatabaseType}.yml`, `${appName}/${appName}-${this.app.prodDatabaseType}.yml`);
                 }
                 if (this.app.searchEngine === 'elasticsearch') {
-                    this.template('db/_elasticsearch.yml', `${this.directoryPath}/k8s/${appName}/${appName}-elasticsearch.yml`);
+                    this.template('db/_elasticsearch.yml', `${appName}/${appName}-elasticsearch.yml`);
                 }
                 if (this.app.messageBroker === 'kafka') {
-                    this.template('db/_kafka.yml', `${this.directoryPath}/k8s/${appName}/${appName}-kafka.yml`);
+                    this.template('db/_kafka.yml', `${appName}/${appName}-kafka.yml`);
                 }
                 if ((this.app.applicationType === 'gateway' || this.app.applicationType === 'monolith') && this.kubernetesServiceType === 'Ingress') {
-                    this.template('_ingress.yml', `${this.directoryPath}/k8s/${appName}/${appName}-ingress.yml`);
+                    this.template('_ingress.yml', `${appName}/${appName}-ingress.yml`);
                 }
-                if (this.monitoring === 'prometheus') {
-                    this.template('monitoring/_jhipster-prometheus-sm.yml', `${this.directoryPath}/k8s/${appName}/${appName}-prometheus-sm.yml`);
+                if (this.prometheusOperator) {
+                    this.template('_prometheus.yml', `${appName}/${appName}-prometheus.yml`);
                 }
             }
         },
 
         writeReadme() {
-            this.template('_README-KUBERNETES.md', `${this.directoryPath}/k8s/README.md`);
+            this.template('_README-KUBERNETES.md', 'README.md');
         },
 
         writeNamespace() {
             if (this.kubernetesNamespace !== 'default') {
-                this.template('_namespace.yml', `${this.directoryPath}/k8s/namespace.yml`);
+                this.template('_namespace.yml', 'namespace.yml');
             }
         },
 
         writeJhipsterConsole() {
-            if (this.monitoring === 'elk') {
-                this.template('console/_jhipster-elasticsearch.yml', `${this.directoryPath}/k8s/console/jhipster-elasticsearch.yml`);
-                this.template('console/_jhipster-logstash.yml', `${this.directoryPath}/k8s/console/jhipster-logstash.yml`);
-                this.template('console/_jhipster-console.yml', `${this.directoryPath}/k8s/console/jhipster-console.yml`);
-                this.template('console/_jhipster-dashboard-console.yml', `${this.directoryPath}/k8s/console/jhipster-dashboard-console.yml`);
+            if (this.jhipsterConsole) {
+                this.template('console/_jhipster-elasticsearch.yml', 'console/jhipster-elasticsearch.yml');
+                this.template('console/_jhipster-logstash.yml', 'console/jhipster-logstash.yml');
+                this.template('console/_jhipster-console.yml', 'console/jhipster-console.yml');
+                this.template('console/_jhipster-dashboard-console.yml', 'console/jhipster-dashboard-console.yml');
                 if (this.composeApplicationType === 'microservice') {
-                    this.template('console/_jhipster-zipkin.yml', `${this.directoryPath}/k8s/console/jhipster-zipkin.yml`);
+                    this.template('console/_jhipster-zipkin.yml', 'console/jhipster-zipkin.yml');
                 }
             }
         },
 
-        writePrometheusGrafanaFiles() {
-            if (this.monitoring === 'prometheus') {
-                this.template('monitoring/_jhipster-prometheus-crd.yml', `${this.directoryPath}/k8s/monitoring/jhipster-prometheus-crd.yml`);
-                this.template('monitoring/_jhipster-prometheus-cr.yml', `${this.directoryPath}/k8s/monitoring/jhipster-prometheus-cr.yml`);
-                this.template('monitoring/_jhipster-grafana.yml', `${this.directoryPath}/k8s/monitoring/jhipster-grafana.yml`);
-                this.template('monitoring/_jhipster-grafana-dashboard.yml', `${this.directoryPath}/k8s/monitoring/jhipster-grafana-dashboard.yml`);
+        writePrometheusTpr() {
+            if (this.prometheusOperator) {
+                this.template('_prometheus-tpr.yml', 'prometheus-tpr.yml');
             }
         },
 
         writeRegistryFiles() {
             if (this.serviceDiscoveryType === 'eureka') {
-                this.template('registry/_jhipster-registry.yml', `${this.directoryPath}/k8s/registry/jhipster-registry.yml`);
-                this.template('registry/_application-configmap.yml', `${this.directoryPath}/k8s/registry/application-configmap.yml`);
+                this.template('registry/_jhipster-registry.yml', 'registry/jhipster-registry.yml');
+                this.template('registry/_application-configmap.yml', 'registry/application-configmap.yml');
             } else if (this.serviceDiscoveryType === 'consul') {
-                this.template('registry/_consul.yml', `${this.directoryPath}/k8s/registry/consul.yml`);
-                this.template('registry/_consul-config-loader.yml', `${this.directoryPath}/k8s/registry/consul-config-loader.yml`);
-                this.template('registry/_application-configmap.yml', `${this.directoryPath}/k8s/registry/application-configmap.yml`);
+                this.template('registry/_consul.yml', 'registry/consul.yml');
+                this.template('registry/_consul-config-loader.yml', 'registry/consul-config-loader.yml');
+                this.template('registry/_application-configmap.yml', 'registry/application-configmap.yml');
             }
-        },
-
-        writeConfigRunFile() {
-            this.template('_apply.sh', `${this.directoryPath}/k8s/kubectl-apply.sh`);
         }
-
     };
 }
diff --git a/generators/kubernetes/index.js b/generators/kubernetes/index.js
index 1542fd1aa8..de2d4a7d0b 100644
--- a/generators/kubernetes/index.js
+++ b/generators/kubernetes/index.js
@@ -72,7 +72,8 @@ module.exports = class extends BaseGenerator {
                 this.dockerRepositoryName = this.config.get('dockerRepositoryName');
                 this.dockerPushCommand = this.config.get('dockerPushCommand');
                 this.kubernetesNamespace = this.config.get('kubernetesNamespace');
-                this.monitoring = this.config.get('monitoring');
+                this.jhipsterConsole = this.config.get('jhipsterConsole');
+                this.prometheusOperator = this.config.get('prometheusOperator');
                 this.kubernetesServiceType = this.config.get('kubernetesServiceType');
                 this.ingressDomain = this.config.get('ingressDomain');
 
@@ -94,9 +95,6 @@ module.exports = class extends BaseGenerator {
                 this.DOCKER_ELASTICSEARCH = constants.DOCKER_ELASTICSEARCH;
                 this.DOCKER_KAFKA = constants.DOCKER_KAFKA;
                 this.DOCKER_ZOOKEEPER = constants.DOCKER_ZOOKEEPER;
-                this.DOCKER_PROMETHEUS_OPERATOR = constants.DOCKER_PROMETHEUS_OPERATOR;
-                this.DOCKER_GRAFANA_WATCHER = constants.DOCKER_GRAFANA_WATCHER;
-                this.DOCKER_GRAFANA = constants.DOCKER_GRAFANA;
 
                 if (this.defaultAppsFolders !== undefined) {
                     this.log('\nFound .yo-rc.json config file...');
@@ -135,12 +133,13 @@ module.exports = class extends BaseGenerator {
             askForApps: prompts.askForApps,
             // cluster for mongodb: it can be done later
             // askForClustersMode: prompts.askForClustersMode,
-            askForMonitoring: prompts.askForMonitoring,
             askForServiceDiscovery: prompts.askForServiceDiscovery,
             askForAdminPassword: prompts.askForAdminPassword,
             askForKubernetesNamespace: prompts.askForKubernetesNamespace,
             askForDockerRepositoryName: prompts.askForDockerRepositoryName,
             askForDockerPushCommand: prompts.askForDockerPushCommand,
+            askForJhipsterConsole: prompts.askForJhipsterConsole,
+            askForPrometheusOperator: prompts.askForPrometheusOperator,
             askForKubernetesServiceType: prompts.askForKubernetesServiceType,
             askForIngressDomain: prompts.askForIngressDomain
         };
@@ -169,7 +168,6 @@ module.exports = class extends BaseGenerator {
                 this.config.set('kubernetesNamespace', this.kubernetesNamespace);
                 this.config.set('kubernetesServiceType', this.kubernetesServiceType);
                 this.config.set('ingressDomain', this.ingressDomain);
-                this.config.set('monitoring', this.monitoring);
             }
         };
     }
@@ -197,23 +195,22 @@ module.exports = class extends BaseGenerator {
         }
 
         this.log('\nYou can deploy all your apps by running: ');
-        this.log(`  ${chalk.cyan(`sh ${this.directoryPath}k8s/kubectl-apply.sh`)}`);
-        this.log('OR');
         if (this.kubernetesNamespace !== 'default') {
-            this.log(`  ${chalk.cyan(`kubectl apply -f ${this.directoryPath}k8s/namespace.yml`)}`);
+            this.log(`  ${chalk.cyan('kubectl apply -f namespace.yml')}`);
         }
-        if (this.monitoring === 'elk') {
-            this.log(`  ${chalk.cyan(`kubectl apply -f ${this.directoryPath}k8s/console`)}`);
+        if (this.jhipsterConsole) {
+            this.log(`  ${chalk.cyan('kubectl apply -f console')}`);
         }
-        if (this.monitoring === 'prometheus') {
-            this.log(`  ${chalk.cyan(`kubectl apply -f ${this.directoryPath}k8s/monitoring`)}`);
+        if (this.prometheusOperator) {
+            this.log(`  ${chalk.cyan('kubectl apply -f prometheus-tpr.yml')}`);
         }
-        for (let i = 0, regIndex = 0; i < this.appsFolders.length; i++) {
-            this.log(`  ${chalk.cyan(`kubectl apply -f ${this.directoryPath}k8s/${this.appConfigs[i].baseName.toLowerCase()}`)}`);
-            if (regIndex++ === 0 && this.appConfigs[i].serviceDiscoveryType !== false) {
-                this.log(`  ${chalk.cyan(`kubectl apply -f ${this.directoryPath}k8s/registry`)}`);
-            }
+        if (this.gatewayNb >= 1 || this.microserviceNb >= 1) {
+            this.log(`  ${chalk.cyan('kubectl apply -f registry')}`);
+        }
+        for (let i = 0; i < this.appsFolders.length; i++) {
+            this.log(`  ${chalk.cyan(`kubectl apply -f ${this.appConfigs[i].baseName.toLowerCase()}`)}`);
         }
+
         if (this.gatewayNb + this.monolithicNb >= 1) {
             const namespaceSuffix = this.kubernetesNamespace === 'default' ? '' : ` -n ${this.kubernetesNamespace}`;
             this.log('\nUse these commands to find your application\'s IP addresses:');
diff --git a/generators/kubernetes/prompts.js b/generators/kubernetes/prompts.js
index 3b243de700..c729047c2d 100644
--- a/generators/kubernetes/prompts.js
+++ b/generators/kubernetes/prompts.js
@@ -21,6 +21,10 @@ const dockerPrompts = require('../docker-prompts');
 
 module.exports = _.extend({
     askForKubernetesNamespace,
+    askForDockerRepositoryName,
+    askForDockerPushCommand,
+    askForJhipsterConsole,
+    askForPrometheusOperator,
     askForKubernetesServiceType,
     askForIngressDomain
 }, dockerPrompts);
@@ -41,6 +45,70 @@ function askForKubernetesNamespace() {
     });
 }
 
+function askForDockerRepositoryName() {
+    const done = this.async();
+
+    const prompts = [{
+        type: 'input',
+        name: 'dockerRepositoryName',
+        message: 'What should we use for the base Docker repository name?',
+        default: this.dockerRepositoryName
+    }];
+
+    this.prompt(prompts).then((props) => {
+        this.dockerRepositoryName = props.dockerRepositoryName;
+        done();
+    });
+}
+
+function askForDockerPushCommand() {
+    const done = this.async();
+
+    const prompts = [{
+        type: 'input',
+        name: 'dockerPushCommand',
+        message: 'What command should we use for push Docker image to repository?',
+        default: this.dockerPushCommand ? this.dockerPushCommand : 'docker push'
+    }];
+
+    this.prompt(prompts).then((props) => {
+        this.dockerPushCommand = props.dockerPushCommand;
+        done();
+    });
+}
+
+function askForJhipsterConsole() {
+    const done = this.async();
+
+    const prompts = [{
+        type: 'confirm',
+        name: 'jhipsterConsole',
+        message: 'Do you want to use JHipster Console for log aggregation (ELK)?',
+        default: this.jhipsterConsole ? this.jhipsterConsole : true
+    }];
+
+    this.prompt(prompts).then((props) => {
+        this.jhipsterConsole = props.jhipsterConsole;
+        done();
+    });
+}
+
+function askForPrometheusOperator() {
+    const done = this.async();
+
+    const prompts = [{
+        type: 'confirm',
+        name: 'prometheusOperator',
+        message: 'Do you want to export your services for Prometheus (needs a running prometheus operator)?',
+        default: this.prometheusOperator ? this.prometheusOperator : true
+    }];
+
+    this.prompt(prompts).then((props) => {
+        this.prometheusOperator = props.prometheusOperator;
+        done();
+    });
+}
+
 function askForKubernetesServiceType() {
     const done = this.async();
 
diff --git a/generators/kubernetes/templates/_README-KUBERNETES.md b/generators/kubernetes/templates/_README-KUBERNETES.md
index 645146bf18..4fa945407e 100644
--- a/generators/kubernetes/templates/_README-KUBERNETES.md
+++ b/generators/kubernetes/templates/_README-KUBERNETES.md
@@ -19,23 +19,21 @@ You can deploy your apps by running:
 
 ```
 <%_ if (kubernetesNamespace !== 'default') { _%>
-kubectl apply -f <%-directoryPath%>k8s/namespace.yml
-<%_ } _%> <%_ if (serviceDiscoveryType === 'eureka' || serviceDiscoveryType === 'consul') { _%>
-kubectl apply -f <%-directoryPath%>k8s/registry/
-<%_ } _%> <%_ if (monitoring === 'elk') { _%>
-kubectl apply -f <%-directoryPath%>k8s/console/
-<%_ } _%> <%_ if (monitoring === 'prometheus') { _%>
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-prometheus-crd.yml
-until [ $(kubectl get crd prometheuses.monitoring.coreos.com | wc -l) -ge 2 ]; do
-    echo "Waiting for the custom resource prometheus operator to get initialised";
-    sleep 5;
-done
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-prometheus-cr.yml
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-grafana.yml
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-grafana-dashboard.yml
-<%_ } _%> <%_ appConfigs.forEach((appConfig, index) =>  { _%>
-kubectl apply -f <%-directoryPath%>k8s/<%- appConfig.baseName.toLowerCase() %>/
-<%_ }) _%>
+$ kubectl apply -f namespace.yml
+<%_ } _%>
+<%_ if (jhipsterConsole) { _%>
+$ kubectl apply -f console
+<%_ } _%>
+<%_ if (prometheusOperator) { _%>
+$ kubectl apply -f prometheus-tpr.yml
+<%_ } _%>
+<%_ if (gatewayNb >= 1 || microserviceNb >= 1) { _%>
+$ kubectl apply -f registry
+<%_ } _%>
+
+<%_ for (let i = 0; i < appsFolders.length; i++) { _%>
+$ kubectl apply -f <%= appConfigs[i].baseName.toLowerCase() %>
+<%_ } _%>
 ```
 
 ## Exploring your services
@@ -70,11 +68,11 @@ $ kubectl set image deployment/<app-name>-app <app-name>=<new-image> <%= kuberne
 ```
 
 Using livenessProbes and readinessProbe allows you to tell kubernetes about the state of your apps, in order to ensure availablity of your services. You will need minimum 2 replicas for every app deployment, you want to have zero-downtime deployed. This is because the rolling upgrade strategy first kills a running replica in order to place a new. Running only one replica, will cause a short downtime during upgrades.
-<%_ if (monitoring === 'elk' || monitoring === 'prometheus') { _%>
+<%_ if (jhipsterConsole || prometheusOperator) { _%>
 
 ## Monitoring tools
 
-<%_ if (monitoring === 'elk') { _%>
+<%_ if (jhipsterConsole) { _%>
 ### JHipster console
 
 Your application logs can be found in JHipster console (powered by Kibana). You can find its service details by
@@ -82,33 +80,25 @@ Your application logs can be found in JHipster console (powered by Kibana). You
 $ kubectl get svc jhipster-console<%= kubernetesNamespace === 'default' ? '' : ` -n ${kubernetesNamespace}` %>
 ```
 
-* If you have chosen *Ingress*, then you should be able to access Kibana using the given ingress domain. 
-* If you have chosen *NodePort*, then point your browser to an IP of any of your nodes and use the node port described in the output.
-* If you have chosen *LoadBalancer*, then use the IaaS provided LB IP
+Point your browser to an IP of any of your nodes and use the node port described in the output.
 <%_ } _%>
-<%_ if (monitoring === 'prometheus') { _%>
+<%_ if (prometheusOperator) { _%>
 
 ### Prometheus metrics
 
-Generator is also packaged with [Prometheus operator by CoreOS](https://github.com/coreos/prometheus-operator). 
+If not already done, install the [Prometheus operator by CoreOS](https://github.com/coreos/prometheus-operator). You can quickly deploy the operator using 
 
 **hint**: use must build your apps with `prometheus` profile active!
 
-Application metrics can be explored in Prometheus through,
-
 ```
-$ kubectl get svc jhipster-prometheus<%= kubernetesNamespace === 'default' ? '' : ` -n ${kubernetesNamespace}` %>
+$ kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml
 ```
 
-Also the visualisation can be explored in Grafana which is pre-configured with a dashboard view. You can find the service details by
+The prometheus instance for your apps can be explored using
+
 ```
-$ kubectl get svc jhipster-grafana<%= kubernetesNamespace === 'default' ? '' : ` -n ${kubernetesNamespace}` %>
+$ kubectl get svc prometheus-<%= kubernetesNamespace %><%= kubernetesNamespace === 'default' ? '' : ` -n ${kubernetesNamespace}` %>
 ```
-
-* If you have chosen *Ingress*, then you should be able to access Grafana using the given ingress domain. 
-* If you have chosen *NodePort*, then point your browser to an IP of any of your nodes and use the node port described in the output.
-* If you have chosen *LoadBalancer*, then use the IaaS provided LB IP
-
 <%_ } _%>
 <%_ } _%>
 
@@ -149,7 +139,7 @@ This can occur, if your cluster has low resource (e.g. Minikube). Increase the `
 
 The default setting are optimized for middle scale clusters. You are free to increase the JAVA_OPTS environment variable, and resource requests and limits to improve the performance. Be careful!
 
-<%_ if (monitoring === 'prometheus') { _%>
+<%_ if (prometheusOperator) { _%>
 > I have selected prometheus but no targets are visible
 
 This depends on the setup of prometheus operator and the access control policies in your cluster. Version 1.6.0+ is needed for the RBAC setup to work.
@@ -161,4 +151,4 @@ This means your apps are probably not built using the `prometheus` profile in Ma
 
 > my SQL based microservice stuck during liquibase initialization when running multiple replicas
 
-Sometimes the database changelog lock gets corrupted. You will need to connect to the database using `kubectl exec -it` and remove all lines of liquibases `databasechangeloglock` table.
+Somethimes the database changelog lock gets corrupted. You will need to connect to the database using `kubectl exec -it` and remove all lines of liquibases `databasechangeloglock` table.
diff --git a/generators/kubernetes/templates/_apply.sh b/generators/kubernetes/templates/_apply.sh
deleted file mode 100644
index 34823845ab..0000000000
--- a/generators/kubernetes/templates/_apply.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env sh
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see http://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-# Files are ordered in proper order with needed wait for the dependent custom resource definitions to get initialized.
-# Usage: sh <%-directoryPath%>apply.sh
-<%_ if (kubernetesNamespace !== 'default') { _%>
-kubectl apply -f <%-directoryPath%>k8s/namespace.yml
-<%_ } _%> <%_ if (serviceDiscoveryType === 'eureka' || serviceDiscoveryType === 'consul') { _%>
-kubectl apply -f <%-directoryPath%>k8s/registry/
-<%_ } _%> <%_ if (monitoring === 'elk') { _%>
-kubectl apply -f <%-directoryPath%>k8s/console/
-<%_ } _%> <%_ if (monitoring === 'prometheus') { _%>
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-prometheus-crd.yml
-until [ $(kubectl get crd prometheuses.monitoring.coreos.com 2>>/dev/null | wc -l) -ge 2 ]; do
-    echo "Waiting for the custom resource prometheus operator to get initialised";
-    sleep 5;
-done
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-prometheus-cr.yml
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-grafana.yml
-kubectl apply -f <%-directoryPath%>k8s/monitoring/jhipster-grafana-dashboard.yml
-<%_ } _%> <%_ appConfigs.forEach((appConfig, index) =>  { _%>
-kubectl apply -f <%-directoryPath%>k8s/<%- appConfig.baseName.toLowerCase() %>/
-<%_ }) _%>
diff --git a/generators/kubernetes/templates/_deployment.yml b/generators/kubernetes/templates/_deployment.yml
index 84ef7525e9..3e23a24260 100644
--- a/generators/kubernetes/templates/_deployment.yml
+++ b/generators/kubernetes/templates/_deployment.yml
@@ -28,37 +28,6 @@ spec:
       labels:
         app: <%= app.baseName.toLowerCase() %>
     spec:
-      initContainers:
-        - name: init-ds
-          image: busybox
-          command:
-            - '/bin/sh'
-            - '-c'
-            - |
-                while true
-                do
-                <%_ if (app.prodDatabaseType === 'mysql') { _%>
-                  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-mysql 3306)
-                <%_ } _%>
-                <%_ if (app.prodDatabaseType === 'mariadb') { _%>
-                  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-mariadb 3306)
-                <%_ } _%>
-                <%_ if (app.prodDatabaseType === 'postgresql') { _%>
-                  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-postgresql 5432)
-                <%_ } _%>
-                <%_ if (app.prodDatabaseType === 'mongodb') { _%>
-                  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-mongodb 27017)
-                <%_ } _%>
-                <%_ if (app.prodDatabaseType === 'couchbase') { _%>
-                  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-couchbase 8091)
-                <%_ } _%>
-                  if [ $? -eq 0 ]; then
-                    echo "DB is UP"
-                    break
-                  fi
-                  echo "DB is not yet reachable;sleep for 10s before retry"
-                  sleep 10
-                done
       containers:
       - name: <%= app.baseName.toLowerCase() %>-app
         image: <%= app.targetImageName %>
@@ -117,7 +86,7 @@ spec:
         - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES
           value: <%= app.baseName.toLowerCase() %>-zookeeper.<%= kubernetesNamespace %>.svc.cluster.local
         <%_ } _%>
-        <%_ if (monitoring === 'elk') { _%>
+        <%_ if (jhipsterConsole) { _%>
         - name: JHIPSTER_METRICS_LOGS_ENABLED
           value: 'true'
         - name: JHIPSTER_LOGGING_LOGSTASH_ENABLED
@@ -131,7 +100,7 @@ spec:
           value: http://jhipster-zipkin
             <%_ } _%>
         <%_ } _%>
-        <%_ if (monitoring === 'prometheus') { _%>
+        <%_ if (prometheusOperator) { _%>
         - name: JHIPSTER_METRICS_PROMETHEUS_ENABLED
           value: 'true'
         - name: JHIPSTER_METRICS_PROMETHEUS_ENDPOINT
@@ -153,11 +122,9 @@ spec:
           httpGet:
             path: /management/health
             port: web
-          initialDelaySeconds: 20
-          periodSeconds: 15
-          failureThreshold: 6
         livenessProbe:
           httpGet:
             path: /management/health
             port: web
-          initialDelaySeconds: 120
+          initialDelaySeconds: 180
+
diff --git a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-cr.yml b/generators/kubernetes/templates/_prometheus-tpr.yml
similarity index 75%
rename from generators/kubernetes/templates/monitoring/_jhipster-prometheus-cr.yml
rename to generators/kubernetes/templates/_prometheus-tpr.yml
index a4123cfa26..0109bc7db9 100644
--- a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-cr.yml
+++ b/generators/kubernetes/templates/_prometheus-tpr.yml
@@ -19,13 +19,13 @@
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  name: jhipster-prometheus-sa
+  name: prometheus-<%= kubernetesNamespace %>
   namespace: <%= kubernetesNamespace %>
 ---
 apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: Role
 metadata:
-  name: jhipster-prometheus-role
+  name: prometheus-<%= kubernetesNamespace %>
   namespace: <%= kubernetesNamespace %>
 rules:
 - apiGroups: [""]
@@ -41,27 +41,27 @@ rules:
   verbs: ["get"]
 ---
 apiVersion: rbac.authorization.k8s.io/v1beta1
-# limit to the namespace
 kind: RoleBinding
 metadata:
-  name: jhipster-prometheus-rb
+  name: prometheus-<%= kubernetesNamespace %>
   namespace: <%= kubernetesNamespace %>
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: Role
-  name: jhipster-prometheus-role
+  name: prometheus-<%= kubernetesNamespace %>
 subjects:
 - kind: ServiceAccount
-  name: jhipster-prometheus-sa
+  name: prometheus-<%= kubernetesNamespace %>
+  namespace: <%= kubernetesNamespace %>
 ---
-apiVersion: monitoring.coreos.com/v1
+apiVersion: monitoring.coreos.com/v1alpha1
 kind: Prometheus
 metadata:
-  name: jhipster-prometheus
+  name: <%= kubernetesNamespace %>
   namespace: <%= kubernetesNamespace %>
 spec:
-  replica: 1
-  serviceAccountName: jhipster-prometheus-sa
+  version: v1.6.2
+  serviceAccountName: prometheus-<%= kubernetesNamespace %>
   serviceMonitorSelector:
     matchLabels:
       team: <%= kubernetesNamespace %>
@@ -72,13 +72,15 @@ spec:
 apiVersion: v1
 kind: Service
 metadata:
-  name: jhipster-prometheus
+  name: prometheus-<%= kubernetesNamespace %>
   namespace: <%= kubernetesNamespace %>
 spec:
+  type: NodePort
   ports:
   - name: web
+    nodePort: 30901
     port: 9090
     protocol: TCP
     targetPort: web
   selector:
-    prometheus: jhipster-prometheus
+    prometheus: <%= kubernetesNamespace %>
diff --git a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-sm.yml b/generators/kubernetes/templates/_prometheus.yml
similarity index 95%
rename from generators/kubernetes/templates/monitoring/_jhipster-prometheus-sm.yml
rename to generators/kubernetes/templates/_prometheus.yml
index 7eba19b526..4409090ec8 100644
--- a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-sm.yml
+++ b/generators/kubernetes/templates/_prometheus.yml
@@ -16,7 +16,7 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -%>
-apiVersion: monitoring.coreos.com/v1
+apiVersion: monitoring.coreos.com/v1alpha1
 kind: ServiceMonitor
 metadata:
   name: <%= app.baseName.toLowerCase() %>-app
diff --git a/generators/kubernetes/templates/monitoring/_jhipster-grafana-dashboard.yml b/generators/kubernetes/templates/monitoring/_jhipster-grafana-dashboard.yml
deleted file mode 100644
index 9213ebdc14..0000000000
--- a/generators/kubernetes/templates/monitoring/_jhipster-grafana-dashboard.yml
+++ /dev/null
@@ -1,2364 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see http://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jhipster-grafana-dashboard
-  namespace: <%= kubernetesNamespace %>
-data:
-  deployment-dashboard.json: |
-    {
-        "dashboard": {
-            "__inputs": [
-                {
-                    "name": "DS_PROMETHEUS",
-                    "label": "prometheus",
-                    "description": "",
-                    "type": "datasource",
-                    "pluginId": "prometheus",
-                    "pluginName": "Prometheus"
-                }
-            ],
-            "__requires": [
-                {
-                    "type": "grafana",
-                    "id": "grafana",
-                    "name": "Grafana",
-                    "version": "4.6.0"
-                },
-                {
-                    "type": "panel",
-                    "id": "graph",
-                    "name": "Graph",
-                    "version": ""
-                },
-                {
-                    "type": "datasource",
-                    "id": "prometheus",
-                    "name": "Prometheus",
-                    "version": "1.0.0"
-                },
-                {
-                    "type": "panel",
-                    "id": "singlestat",
-                    "name": "Singlestat",
-                    "version": ""
-                }
-            ],
-            "annotations": {
-                "list": [
-                    {
-                        "builtIn": 1,
-                        "datasource": "-- Grafana --",
-                        "enable": true,
-                        "hide": true,
-                        "iconColor": "rgba(0, 211, 255, 1)",
-                        "name": "Annotations & Alerts",
-                        "type": "dashboard"
-                    }
-                ]
-            },
-            "description": "JHipster metrics",
-            "editable": true,
-            "gnetId": 3308,
-            "graphTooltip": 0,
-            "hideControls": false,
-            "id": null,
-            "links": [],
-            "refresh": false,
-            "rows": [
-                {
-                    "collapse": false,
-                    "height": "250px",
-                    "panels": [
-                        {
-                            "cacheTimeout": null,
-                            "colorBackground": false,
-                            "colorValue": false,
-                            "colors": [
-                                "rgba(245, 54, 54, 0.9)",
-                                "rgba(237, 129, 40, 0.89)",
-                                "rgba(50, 172, 45, 0.97)"
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "decimals": null,
-                            "description": "Service status",
-                            "format": "none",
-                            "gauge": {
-                                "maxValue": 1,
-                                "minValue": 0,
-                                "show": true,
-                                "thresholdLabels": false,
-                                "thresholdMarkers": true
-                            },
-                            "height": "",
-                            "id": 1,
-                            "interval": null,
-                            "links": [],
-                            "mappingType": 1,
-                            "mappingTypes": [
-                                {
-                                    "name": "value to text",
-                                    "value": 1
-                                },
-                                {
-                                    "name": "range to text",
-                                    "value": 2
-                                }
-                            ],
-                            "maxDataPoints": 100,
-                            "nullPointMode": "connected",
-                            "nullText": null,
-                            "postfix": "",
-                            "postfixFontSize": "50%",
-                            "prefix": "",
-                            "prefixFontSize": "100%",
-                            "rangeMaps": [
-                                {
-                                    "from": "null",
-                                    "text": "N/A",
-                                    "to": "null"
-                                }
-                            ],
-                            "span": 4,
-                            "sparkline": {
-                                "fillColor": "rgba(31, 118, 189, 0.18)",
-                                "full": false,
-                                "lineColor": "rgb(31, 120, 193)",
-                                "show": false
-                            },
-                            "tableColumn": "Value",
-                            "targets": [
-                                {
-                                    "expr": "up{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "table",
-                                    "intervalFactor": 2,
-                                    "refId": "A",
-                                    "step": 20,
-                                    "metric": "up",
-                                    "legendFormat": "service"
-                                }
-                            ],
-                            "thresholds": "0",
-                            "title": "Service Status Now",
-                            "type": "singlestat",
-                            "valueFontSize": "120%",
-                            "valueMaps": [
-                                {
-                                    "op": "=",
-                                    "text": "Down",
-                                    "value": "0"
-                                },
-                                {
-                                    "value": "1",
-                                    "op": "=",
-                                    "text": "Up"
-                                }
-                            ],
-                            "valueName": "current",
-                            "hideTimeOverride": false,
-                            "minSpan": null,
-                            "repeat": null,
-                            "transparent": false
-                        },
-                        {
-                            "id": 29,
-                            "title": "Service Uptime",
-                            "span": 8,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "up{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "step": 2,
-                                    "legendFormat": "{{pod}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": "1",
-                                    "format": "short"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": "1",
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 1,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": true,
-                            "pointradius": 3,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": false,
-                                "min": false,
-                                "max": false,
-                                "current": false,
-                                "total": false,
-                                "avg": false,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": true,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": true,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": [],
-                            "description": "The uptime of the service"
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Uptime Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "cacheTimeout": null,
-                            "colorBackground": false,
-                            "colorValue": true,
-                            "colors": [
-                                "rgba(32, 176, 9, 0.9)",
-                                "rgba(237, 129, 40, 0.89)",
-                                "rgba(50, 172, 45, 0.97)"
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Total requests count",
-                            "format": "none",
-                            "gauge": {
-                                "maxValue": 10000000000000,
-                                "minValue": 0,
-                                "show": true,
-                                "thresholdLabels": false,
-                                "thresholdMarkers": true
-                            },
-                            "id": 5,
-                            "interval": null,
-                            "links": [],
-                            "mappingType": 1,
-                            "mappingTypes": [
-                                {
-                                    "name": "value to text",
-                                    "value": 1
-                                },
-                                {
-                                    "name": "range to text",
-                                    "value": 2
-                                }
-                            ],
-                            "maxDataPoints": 100,
-                            "nullPointMode": "connected",
-                            "nullText": null,
-                            "postfix": "",
-                            "postfixFontSize": "50%",
-                            "prefix": "",
-                            "prefixFontSize": "50%",
-                            "rangeMaps": [
-                                {
-                                    "from": "null",
-                                    "text": "N/A",
-                                    "to": "null"
-                                }
-                            ],
-                            "span": 3,
-                            "sparkline": {
-                                "fillColor": "rgba(31, 118, 189, 0.18)",
-                                "full": false,
-                                "lineColor": "rgb(31, 120, 193)",
-                                "show": false
-                            },
-                            "tableColumn": "Value",
-                            "targets": [
-                                {
-                                    "expr": "com_codahale_metrics_servlet_InstrumentedFilter_requests_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "table",
-                                    "intervalFactor": 2,
-                                    "refId": "A",
-                                    "step": 20,
-                                    "metric": "com_codahale_metrics_servlet_InstrumentedFilter_requests_count"
-                                }
-                            ],
-                            "thresholds": "",
-                            "title": "Total Requests",
-                            "type": "singlestat",
-                            "valueFontSize": "70%",
-                            "valueMaps": [
-                                {
-                                    "op": "=",
-                                    "text": "N/A",
-                                    "value": "null"
-                                }
-                            ],
-                            "valueName": "total",
-                            "transparent": false
-                        },
-                        {
-                            "cacheTimeout": null,
-                            "colorBackground": false,
-                            "colorValue": false,
-                            "colors": [
-                                "rgba(245, 54, 54, 0.9)",
-                                "rgba(237, 129, 40, 0.89)",
-                                "rgba(50, 172, 45, 0.97)"
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Number of 200 OK requests",
-                            "format": "none",
-                            "gauge": {
-                                "maxValue": 10000000000000000,
-                                "minValue": 0,
-                                "show": true,
-                                "thresholdLabels": false,
-                                "thresholdMarkers": true
-                            },
-                            "id": 6,
-                            "interval": null,
-                            "links": [],
-                            "mappingType": 1,
-                            "mappingTypes": [
-                                {
-                                    "name": "value to text",
-                                    "value": 1
-                                },
-                                {
-                                    "name": "range to text",
-                                    "value": 2
-                                }
-                            ],
-                            "maxDataPoints": 100,
-                            "nullPointMode": "connected",
-                            "nullText": null,
-                            "postfix": "",
-                            "postfixFontSize": "50%",
-                            "prefix": "",
-                            "prefixFontSize": "50%",
-                            "rangeMaps": [
-                                {
-                                    "from": "null",
-                                    "text": "N/A",
-                                    "to": "null"
-                                }
-                            ],
-                            "span": 3,
-                            "sparkline": {
-                                "fillColor": "rgba(31, 118, 189, 0.78)",
-                                "full": false,
-                                "lineColor": "rgb(31, 120, 193)",
-                                "show": true
-                            },
-                            "tableColumn": "Value",
-                            "targets": [
-                                {
-                                    "expr": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_ok_total{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "table",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "",
-                                    "refId": "A",
-                                    "step": 20,
-                                    "metric": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_ok_total"
-                                }
-                            ],
-                            "thresholds": "",
-                            "title": "Total Successful hits",
-                            "type": "singlestat",
-                            "valueFontSize": "80%",
-                            "valueMaps": [
-                                {
-                                    "op": "=",
-                                    "text": "N/A",
-                                    "value": "null"
-                                }
-                            ],
-                            "valueName": "total"
-                        },
-                        {
-                            "cacheTimeout": null,
-                            "colorBackground": false,
-                            "colorValue": false,
-                            "colors": [
-                                "rgba(245, 54, 54, 0.9)",
-                                "rgba(237, 129, 40, 0.89)",
-                                "rgba(50, 172, 45, 0.97)"
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Number of server errors and bad requests",
-                            "format": "none",
-                            "gauge": {
-                                "maxValue": 1,
-                                "minValue": 0,
-                                "show": true,
-                                "thresholdLabels": false,
-                                "thresholdMarkers": true
-                            },
-                            "id": 7,
-                            "interval": null,
-                            "links": [],
-                            "mappingType": 1,
-                            "mappingTypes": [
-                                {
-                                    "name": "value to text",
-                                    "value": 1
-                                },
-                                {
-                                    "name": "range to text",
-                                    "value": 2
-                                }
-                            ],
-                            "maxDataPoints": 100,
-                            "nullPointMode": "connected",
-                            "nullText": null,
-                            "postfix": "",
-                            "postfixFontSize": "50%",
-                            "prefix": "",
-                            "prefixFontSize": "50%",
-                            "rangeMaps": [
-                                {
-                                    "from": "null",
-                                    "text": "N/A",
-                                    "to": "null"
-                                }
-                            ],
-                            "span": 3,
-                            "sparkline": {
-                                "fillColor": "rgba(31, 118, 189, 0.18)",
-                                "full": false,
-                                "lineColor": "rgb(31, 120, 193)",
-                                "show": false
-                            },
-                            "tableColumn": "Value",
-                            "targets": [
-                                {
-                                    "expr": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_serverError_total{namespace =\"$namespace\", service =\"$service_name\"} + com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_badRequest_total{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "refId": "A",
-                                    "step": 20,
-                                    "metric": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_serverError_total"
-                                }
-                            ],
-                            "thresholds": "1",
-                            "title": "Total Bad hits",
-                            "type": "singlestat",
-                            "valueFontSize": "70%",
-                            "valueMaps": [
-                                {
-                                    "op": "=",
-                                    "text": "N/A",
-                                    "value": "null"
-                                }
-                            ],
-                            "valueName": "total"
-                        },
-                        {
-                            "cacheTimeout": null,
-                            "colorBackground": false,
-                            "colorValue": false,
-                            "colors": [
-                                "rgba(245, 54, 54, 0.9)",
-                                "rgba(237, 129, 40, 0.89)",
-                                "rgba(50, 172, 45, 0.97)"
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Number of 404 not found requests",
-                            "format": "none",
-                            "gauge": {
-                                "maxValue": 1,
-                                "minValue": 0,
-                                "show": true,
-                                "thresholdLabels": false,
-                                "thresholdMarkers": true
-                            },
-                            "id": 8,
-                            "interval": null,
-                            "links": [],
-                            "mappingType": 1,
-                            "mappingTypes": [
-                                {
-                                    "name": "value to text",
-                                    "value": 1
-                                },
-                                {
-                                    "name": "range to text",
-                                    "value": 2
-                                }
-                            ],
-                            "maxDataPoints": 100,
-                            "nullPointMode": "connected",
-                            "nullText": null,
-                            "postfix": "",
-                            "postfixFontSize": "50%",
-                            "prefix": "",
-                            "prefixFontSize": "50%",
-                            "rangeMaps": [
-                                {
-                                    "from": "null",
-                                    "text": "N/A",
-                                    "to": "null"
-                                }
-                            ],
-                            "span": 3,
-                            "sparkline": {
-                                "fillColor": "rgba(31, 118, 189, 0.18)",
-                                "full": false,
-                                "lineColor": "rgb(31, 120, 193)",
-                                "show": false
-                            },
-                            "tableColumn": "",
-                            "targets": [
-                                {
-                                    "expr": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_notFound_total{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "refId": "A",
-                                    "step": 20,
-                                    "metric": "com_codahale_metrics_servlet_InstrumentedFilter_responseCodes_notFound_total"
-                                }
-                            ],
-                            "thresholds": "1",
-                            "title": "Trace 404 hits",
-                            "type": "singlestat",
-                            "valueFontSize": "80%",
-                            "valueMaps": [
-                                {
-                                    "op": "=",
-                                    "text": "N/A",
-                                    "value": "null"
-                                }
-                            ],
-                            "valueName": "total"
-                        },
-                        {
-                            "id": 30,
-                            "title": "Active Requests",
-                            "span": 12,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "com_codahale_metrics_servlet_InstrumentedFilter_activeRequests{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "metric": "com_codahale_metrics_servlet_InstrumentedFilter_activeRequests",
-                                    "step": 2,
-                                    "legendFormat": "{{service}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": null,
-                                    "max": null,
-                                    "format": "short"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": null,
-                                    "max": null,
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [
-                                    "total"
-                                ],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 2,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": false,
-                            "pointradius": 5,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": true,
-                                "min": true,
-                                "max": true,
-                                "current": true,
-                                "total": false,
-                                "avg": true,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": false,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": false,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": []
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Requests Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The current number of live threads including daemon and non-daemon and runnable threads",
-                            "fill": 4,
-                            "id": 10,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true,
-                                "rightSide": false,
-                                "hideEmpty": false
-                            },
-                            "lines": true,
-                            "linewidth": 2,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": true,
-                            "targets": [
-                                {
-                                    "expr": "jvm_threads_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Total threads",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_threads_count"
-                                },
-                                {
-                                    "expr": "jvm_threads_daemon_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_threads_daemon_count",
-                                    "step": 4,
-                                    "legendFormat": "Daemon threads"
-                                },
-                                {
-                                    "expr": "jvm_threads_runnable_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "C",
-                                    "metric": "jvm_threads_runnable_count",
-                                    "step": 4,
-                                    "legendFormat": "Runnable threads"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Live Threads",
-                            "tooltip": {
-                                "shared": false,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": [
-                                    "total"
-                                ]
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                },
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                }
-                            ],
-                            "transparent": false
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The current number of blocked and deadlock threads",
-                            "fill": 1,
-                            "id": 11,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_threads_blocked_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Blocked threads",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_threads_blocked_count"
-                                },
-                                {
-                                    "expr": "jvm_threads_deadlock_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_threads_deadlock_count",
-                                    "step": 4,
-                                    "legendFormat": "Deadlock threads"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Blocked and Deadlock Threads",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                },
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The current number of waiting threads",
-                            "fill": 1,
-                            "id": 12,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_threads_waiting_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Waiting threads",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_threads_waiting_count"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Waiting Threads",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                },
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                }
-                            ]
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Thread Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "An estimate of the number of buffers in the pool",
-                            "fill": 1,
-                            "id": 13,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_buffers_direct_count{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "{{service}}",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_buffers_direct_count"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Buffer Count",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                },
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "An estimate of the memory that the Java virtual machine is using for this buffer pool",
-                            "fill": 1,
-                            "id": 14,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_buffers_direct_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "{{service}}",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_buffers_direct_used"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Buffer Mem Used",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "An estimate of the total capacity of the buffers in this pool",
-                            "fill": 1,
-                            "id": 15,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": false,
-                                "current": true,
-                                "max": false,
-                                "min": false,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_buffers_direct_capacity{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "{{service}}",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_buffers_direct_capacity"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Buffer Capacity",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The total amount of heap memory",
-                            "fill": 1,
-                            "id": 18,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_heap_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Used",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_memory_heap_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_heap_max{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_memory_heap_max",
-                                    "step": 4,
-                                    "legendFormat": "Maximum"
-                                },
-                                {
-                                    "expr": "jvm_memory_heap_committed{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "C",
-                                    "metric": "jvm_memory_heap_committed",
-                                    "step": 4,
-                                    "legendFormat": "Committed"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Heap Memory",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The amount of used, committed and max memory",
-                            "fill": 1,
-                            "id": 16,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_total_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Used",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_memory_total_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_total_max{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_memory_total_max",
-                                    "step": 4,
-                                    "legendFormat": "Max"
-                                },
-                                {
-                                    "expr": "jvm_memory_total_committed{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "C",
-                                    "metric": "jvm_memory_total_committed",
-                                    "step": 4,
-                                    "legendFormat": "Committed"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Total Memory",
-                            "tooltip": {
-                                "shared": false,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": [
-                                    "total"
-                                ]
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "The total amount of  non heap memory",
-                            "fill": 1,
-                            "id": 17,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 4,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_non_heap_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Non Heap Used",
-                                    "refId": "A",
-                                    "step": 4,
-                                    "metric": "jvm_memory_non_heap_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_non_heap_committed{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_memory_non_heap_max",
-                                    "step": 4,
-                                    "legendFormat": "Non Heap Committed"
-                                },
-                                {
-                                    "expr": "jvm_memory_pools_Metaspace_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "C",
-                                    "metric": "jvm_memory_pools_Metaspace_used",
-                                    "step": 4,
-                                    "legendFormat": "Metaspace Used"
-                                },
-                                {
-                                    "expr": "jvm_memory_pools_Code_Cache_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "D",
-                                    "metric": "jvm_memory_pools_Code_Cache_used",
-                                    "step": 4,
-                                    "legendFormat": "Code Cache Used"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Other Memory",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Memory Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Memory space of new generation",
-                            "fill": 2,
-                            "id": 19,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 2,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 6,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_pools_PS_Eden_Space_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Used",
-                                    "refId": "A",
-                                    "step": 2,
-                                    "metric": "jvm_memory_pools_PS_Eden_Space_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_pools_PS_Eden_Space_max{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "jvm_memory_pools_PS_Eden_Space_max",
-                                    "step": 2,
-                                    "legendFormat": "Max"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Eden Space",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Memory space of new generation",
-                            "fill": 1,
-                            "id": 20,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 6,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_pools_PS_Survivor_Space_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Used",
-                                    "refId": "A",
-                                    "step": 2,
-                                    "metric": "jvm_memory_pools_PS_Old_Gen_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_pools_PS_Survivor_Space_max{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "metric": "",
-                                    "step": 2,
-                                    "legendFormat": "Max"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Survivor Space",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        },
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Memory space of old generation",
-                            "fill": 1,
-                            "id": 24,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 12,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "jvm_memory_pools_PS_Old_Gen_used{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "Used",
-                                    "refId": "A",
-                                    "step": 2,
-                                    "metric": "jvm_memory_pools_PS_Old_Gen_used"
-                                },
-                                {
-                                    "expr": "jvm_memory_pools_PS_Old_Gen_max{namespace =\"$namespace\", service =\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "refId": "B",
-                                    "step": 2,
-                                    "legendFormat": "Max"
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "Old Generation",
-                            "tooltip": {
-                                "shared": true,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": []
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "decbytes",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                },
-                                {
-                                    "format": "s",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": null,
-                                    "show": true
-                                }
-                            ]
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Memory Space Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "id": 31,
-                            "title": "Cache Hits",
-                            "span": 6,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "{__name__=~\"^jcache_statistics.*cache_hits\", namespace=\"$namespace\", service=\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "step": 2,
-                                    "legendFormat": "{{__name__}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "none"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [
-                                    "total"
-                                ],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 1,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": false,
-                            "pointradius": 5,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": true,
-                                "min": true,
-                                "max": true,
-                                "current": true,
-                                "total": true,
-                                "avg": true,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": false,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": false,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": [],
-                            "description": "The total number of cache hits"
-                        },
-                        {
-                            "id": 32,
-                            "title": "Cache Misses",
-                            "span": 6,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "{__name__=~\"^jcache_statistics.*cache_misses\", namespace=\"$namespace\", service=\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "step": 2,
-                                    "legendFormat": "{{__name__}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 1,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": false,
-                            "pointradius": 5,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": true,
-                                "min": true,
-                                "max": true,
-                                "current": true,
-                                "total": true,
-                                "avg": true,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": false,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": true,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": [],
-                            "description": "The total number of cache misses"
-                        },
-                        {
-                            "id": 33,
-                            "title": "Cache Gets",
-                            "span": 6,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "{__name__=~\"^jcache_statistics.*cache_gets\", namespace=\"$namespace\", service=\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "step": 2,
-                                    "legendFormat": "{{__name__}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 1,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": false,
-                            "pointradius": 5,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": true,
-                                "min": true,
-                                "max": true,
-                                "current": true,
-                                "total": true,
-                                "avg": true,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": false,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": true,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": [],
-                            "description": "The total number of cache gets"
-                        },
-                        {
-                            "id": 34,
-                            "title": "Cache Puts",
-                            "span": 6,
-                            "type": "graph",
-                            "targets": [
-                                {
-                                    "refId": "A",
-                                    "expr": "{__name__=~\"^jcache_statistics.*cache_puts\", namespace=\"$namespace\", service=\"$service_name\"}",
-                                    "intervalFactor": 2,
-                                    "format": "time_series",
-                                    "step": 2,
-                                    "legendFormat": "{{__name__}}"
-                                }
-                            ],
-                            "datasource": "${DS_PROMETHEUS}",
-                            "renderer": "flot",
-                            "yaxes": [
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                },
-                                {
-                                    "label": null,
-                                    "show": true,
-                                    "logBase": 1,
-                                    "min": "0",
-                                    "max": null,
-                                    "format": "short"
-                                }
-                            ],
-                            "xaxis": {
-                                "show": true,
-                                "mode": "time",
-                                "name": null,
-                                "values": [],
-                                "buckets": null
-                            },
-                            "lines": true,
-                            "fill": 1,
-                            "linewidth": 1,
-                            "dashes": false,
-                            "dashLength": 10,
-                            "spaceLength": 10,
-                            "points": false,
-                            "pointradius": 5,
-                            "bars": false,
-                            "stack": false,
-                            "percentage": false,
-                            "legend": {
-                                "show": true,
-                                "values": true,
-                                "min": true,
-                                "max": true,
-                                "current": true,
-                                "total": true,
-                                "avg": true,
-                                "alignAsTable": true
-                            },
-                            "nullPointMode": "null",
-                            "steppedLine": false,
-                            "tooltip": {
-                                "value_type": "individual",
-                                "shared": true,
-                                "sort": 0
-                            },
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "aliasColors": {},
-                            "seriesOverrides": [],
-                            "thresholds": [],
-                            "links": [],
-                            "description": "The total number of cache puts"
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "Cache Metrics",
-                    "titleSize": "h6"
-                },
-                {
-                    "collapse": false,
-                    "height": 250,
-                    "panels": [
-                        {
-                            "aliasColors": {},
-                            "bars": false,
-                            "dashLength": 10,
-                            "dashes": false,
-                            "datasource": "${DS_PROMETHEUS}",
-                            "description": "Count of REST requests",
-                            "fill": 1,
-                            "id": 27,
-                            "legend": {
-                                "alignAsTable": true,
-                                "avg": true,
-                                "current": true,
-                                "max": true,
-                                "min": true,
-                                "show": true,
-                                "total": false,
-                                "values": true
-                            },
-                            "lines": true,
-                            "linewidth": 1,
-                            "links": [],
-                            "nullPointMode": "null",
-                            "percentage": false,
-                            "pointradius": 5,
-                            "points": false,
-                            "renderer": "flot",
-                            "seriesOverrides": [],
-                            "spaceLength": 10,
-                            "span": 12,
-                            "stack": false,
-                            "steppedLine": false,
-                            "targets": [
-                                {
-                                    "expr": "{__name__=~\".*rest.*_count\", namespace=\"$namespace\", service=\"$service_name\"} ",
-                                    "format": "time_series",
-                                    "intervalFactor": 2,
-                                    "legendFormat": "{{__name__}}",
-                                    "refId": "A",
-                                    "step": 2
-                                }
-                            ],
-                            "thresholds": [],
-                            "timeFrom": null,
-                            "timeShift": null,
-                            "title": "REST Requests Metrics",
-                            "tooltip": {
-                                "shared": false,
-                                "sort": 0,
-                                "value_type": "individual"
-                            },
-                            "type": "graph",
-                            "xaxis": {
-                                "buckets": null,
-                                "mode": "time",
-                                "name": null,
-                                "show": true,
-                                "values": [
-                                    "total"
-                                ]
-                            },
-                            "yaxes": [
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                },
-                                {
-                                    "format": "short",
-                                    "label": null,
-                                    "logBase": 1,
-                                    "max": null,
-                                    "min": "0",
-                                    "show": true
-                                }
-                            ],
-                            "decimals": 0
-                        }
-                    ],
-                    "repeat": null,
-                    "repeatIteration": null,
-                    "repeatRowId": null,
-                    "showTitle": true,
-                    "title": "REST Metrics",
-                    "titleSize": "h6"
-                }
-            ],
-            "schemaVersion": 14,
-            "style": "dark",
-            "tags": [
-                "java",
-                "jhipster",
-                "spring-boot"
-            ],
-            "templating": {
-                "list": [
-                    {
-                        "allValue": null,
-                        "current": {},
-                        "datasource": "${DS_PROMETHEUS}",
-                        "hide": 0,
-                        "includeAll": false,
-                        "label": "Namespace",
-                        "multi": false,
-                        "name": "namespace",
-                        "options": [],
-                        "query": "label_values(jvm_files, namespace)",
-                        "refresh": 2,
-                        "regex": "",
-                        "sort": 1,
-                        "tagValuesQuery": "",
-                        "tags": [],
-                        "tagsQuery": "",
-                        "type": "query",
-                        "useTags": false
-                    },
-                    {
-                        "allValue": null,
-                        "current": {},
-                        "datasource": "${DS_PROMETHEUS}",
-                        "hide": 0,
-                        "includeAll": false,
-                        "label": "Service Name",
-                        "multi": false,
-                        "name": "service_name",
-                        "options": [],
-                        "query": "label_values(jvm_files, service)",
-                        "refresh": 2,
-                        "regex": "",
-                        "sort": 1,
-                        "tagValuesQuery": "",
-                        "tags": [],
-                        "tagsQuery": "",
-                        "type": "query",
-                        "useTags": false
-                    }
-                ]
-            },
-            "time": {
-                "from": "now-15m",
-                "to": "now"
-            },
-            "timepicker": {
-                "refresh_intervals": [
-                    "5s",
-                    "10s",
-                    "30s",
-                    "1m",
-                    "5m",
-                    "15m",
-                    "30m",
-                    "1h",
-                    "2h",
-                    "1d"
-                ],
-                "time_options": [
-                    "5m",
-                    "15m",
-                    "1h",
-                    "6h",
-                    "12h",
-                    "24h",
-                    "2d",
-                    "7d",
-                    "30d"
-                ]
-            },
-            "timezone": "",
-            "title": "JHipster Metrics",
-            "version": 3
-        },
-        "inputs": [
-            {
-                "name": "DS_PROMETHEUS",
-                "pluginId": "prometheus",
-                "type": "datasource",
-                "value": "prometheus"
-            }
-        ],
-        "overwrite": true
-    }
-  prometheus-datasource.json: |
-    {
-        "access": "proxy",
-        "basicAuth": false,
-        "name": "prometheus",
-        "type": "prometheus",
-        "url": "http://jhipster-prometheus:9090"
-    }
----
-apiVersion: batch/v1
-kind: Job
-metadata:
-  name: jhipster-grafana-dashboard
-  namespace: <%= kubernetesNamespace %>
-  labels:
-    job: jhipster-grafana-dashboard
-spec:
-  template:
-    metadata:
-      labels:
-        job: jhipster-grafana-dashboard
-    spec:
-      initContainers:
-        - name: init-dependent-services-check
-          image: busybox
-          command:
-            - '/bin/sh'
-            - '-c'
-            - |
-                until nc -z -w 1 jhipster-prometheus 9090
-                do
-                  echo Waiting for prometheus to get initialized
-                  sleep 5
-                done
-                until nc -z -w 1 jhipster-grafana 3000
-                do
-                  echo Waiting for grafana to get initialized
-                  sleep 5
-                done
-      containers:
-      - name: grafana-configurer
-        image: <%= DOCKER_GRAFANA_WATCHER %>
-        args:
-          - '--watch-dir=/var/grafana-dashboard'
-          - '--grafana-url=http://jhipster-grafana:3000'
-        env:
-        - name: GRAFANA_USER
-          valueFrom:
-            secretKeyRef:
-              name: jhipster-grafana-credentials
-              key: username
-        - name: GRAFANA_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              name: jhipster-grafana-credentials
-              key: password
-        resources:
-          requests:
-            memory: "16Mi"
-            cpu: "50m"
-          limits:
-            memory: "32Mi"
-            cpu: "100m"
-        volumeMounts:
-        - name: grafana-dashboard
-          mountPath: /var/grafana-dashboard
-      volumes:
-      - name: grafana-dashboard
-        configMap:
-          name: jhipster-grafana-dashboard
-      restartPolicy: OnFailure
-
diff --git a/generators/kubernetes/templates/monitoring/_jhipster-grafana.yml b/generators/kubernetes/templates/monitoring/_jhipster-grafana.yml
deleted file mode 100644
index e5f7addac2..0000000000
--- a/generators/kubernetes/templates/monitoring/_jhipster-grafana.yml
+++ /dev/null
@@ -1,110 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see http://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-apiVersion: v1
-kind: Secret
-metadata:
-  name: jhipster-grafana-credentials
-  namespace: <%= kubernetesNamespace %>
-data:
-  username: amhpcHN0ZXI=
-  password: amhpcHN0ZXI=
----
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: jhipster-grafana
-  namespace: <%= kubernetesNamespace %>
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: jhipster-grafana
-    spec:
-      containers:
-      - name: jhipster-grafana
-        image: <%= DOCKER_GRAFANA %>
-        ports:
-        - containerPort: 3000
-          name: http
-          protocol: TCP
-        env:
-        - name: GF_SECURITY_ADMIN_USER
-          valueFrom:
-            secretKeyRef:
-              name: jhipster-grafana-credentials
-              key: username
-        - name: GF_SECURITY_ADMIN_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              name: jhipster-grafana-credentials
-              key: password
-        - name: GF_USERS_ALLOW_SIGN_UP
-          value: "false"
-        resources:
-          requests:
-            memory: "100Mi"
-            cpu: "100m"
-          limits:
-            memory: "250Mi"
-            cpu: "200m"
-        volumeMounts:
-        - name: grafana-storage
-          mountPath: /var/grafana-storage
-      volumes:
-      - name: grafana-storage
-        emptyDir: {}
-      restartPolicy: Always
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: jhipster-grafana
-  namespace: <%= kubernetesNamespace %>
-  labels:
-    app: jhipster-grafana
-spec:
-  ports:
-  - name: http
-    port: 3000
-    targetPort: 3000
-  <%_ if (kubernetesServiceType !== 'Ingress') { _%>
-  type: <%= kubernetesServiceType %>
-  <%_ } else { _%>
-  type: ClusterIP
-  <%_ } _%>
-  selector:
-    app: jhipster-grafana
----
-<%_ if (kubernetesServiceType === 'Ingress') { _%>
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: jhipster-grafana
-  namespace: <%= kubernetesNamespace %>
-spec:
-  rules:
-  - host: jhipster-grafana.<%= ingressDomain %>
-    http:
-      paths:
-      - path: /
-        backend:
-          serviceName: jhipster-grafana
-          servicePort: 3000
-<%_ } _%>
diff --git a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-crd.yml b/generators/kubernetes/templates/monitoring/_jhipster-prometheus-crd.yml
deleted file mode 100644
index 487ac5d845..0000000000
--- a/generators/kubernetes/templates/monitoring/_jhipster-prometheus-crd.yml
+++ /dev/null
@@ -1,122 +0,0 @@
-<%#
- Copyright 2013-2018 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see http://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: ClusterRole
-metadata:
-  name: jhipster-prometheus-operator-cr
-rules:
-- apiGroups:
-  - extensions
-  resources:
-  - thirdpartyresources
-  verbs:
-  - "*"
-- apiGroups:
-  - apiextensions.k8s.io
-  resources:
-  - customresourcedefinitions
-  verbs:
-  - "*"
-- apiGroups:
-  - monitoring.coreos.com
-  resources:
-  - alertmanagers
-  - prometheuses
-  - servicemonitors
-  verbs:
-  - "*"
-- apiGroups:
-  - apps
-  resources:
-  - statefulsets
-  verbs: ["*"]
-- apiGroups: [""]
-  resources:
-  - configmaps
-  - secrets
-  verbs: ["*"]
-- apiGroups: [""]
-  resources:
-  - pods
-  verbs: ["list", "delete"]
-- apiGroups: [""]
-  resources:
-  - services
-  - endpoints
-  verbs: ["get", "create", "update"]
-- apiGroups: [""]
-  resources:
-  - nodes
-  verbs: ["list", "watch"]
-- apiGroups: [""]
-  resources:
-  - namespaces
-  verbs: ["list"]
----
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: jhipster-prometheus-operator-sa
-  namespace: <%= kubernetesNamespace %>
----
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: ClusterRoleBinding
-metadata:
-  name: jhipster-prometheus-operator-rb
-  namespace: <%= kubernetesNamespace %>
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: jhipster-prometheus-operator-cr
-subjects:
-- kind: ServiceAccount
-  name: jhipster-prometheus-operator-sa
-  namespace: <%= kubernetesNamespace %>
----
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    k8s-app: prometheus-operator
-  name: jhipster-prometheus-operator
-  namespace: <%= kubernetesNamespace %>
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        k8s-app: prometheus-operator
-    spec:
-      containers:
-      - args:
-        - --kubelet-service=kube-system/kubelet
-        - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
-        image: <%= DOCKER_PROMETHEUS_OPERATOR %>
-        name: prometheus-operator
-        ports:
-        - containerPort: 8080
-          name: http
-        resources:
-          limits:
-            cpu: 200m
-            memory: 100Mi
-          requests:
-            cpu: 100m
-            memory: 50Mi
-      serviceAccountName: jhipster-prometheus-operator-sa
diff --git a/generators/server/templates/_gradle.properties b/generators/server/templates/_gradle.properties
index 8b0f590a12..c98517492c 100644
--- a/generators/server/templates/_gradle.properties
+++ b/generators/server/templates/_gradle.properties
@@ -25,10 +25,10 @@ npm_version=<%= NPM_VERSION %>
 yarn_version=<%= YARN_VERSION %>
 
 # Dependency versions
-jhipster_dependencies_version=2.0.0-20180222.205536-30
+jhipster_dependencies_version=2.0.0-20180221.220110-28
 # The spring-boot version should match the one managed by
 # https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster_dependencies_version}
-spring_boot_version=2.0.0.RC2
+spring_boot_version=2.0.0.BUILD-SNAPSHOT
 # The hibernate version should match the one managed by
 # https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster_dependencies_version}
 hibernate_version=5.2.12.Final
diff --git a/generators/server/templates/_pom.xml b/generators/server/templates/_pom.xml
index bd34aefea3..e2fd7800b5 100644
--- a/generators/server/templates/_pom.xml
+++ b/generators/server/templates/_pom.xml
@@ -111,7 +111,7 @@
         <profile.swagger />
 
         <!-- Dependency versions -->
-        <jhipster-dependencies.version>2.0.0-20180222.205536-30</jhipster-dependencies.version>
+        <jhipster-dependencies.version>2.0.0-20180221.220110-28</jhipster-dependencies.version>
         <!-- The spring-boot version should match the one managed by
         https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster-dependencies.version} -->
         <spring-boot.version>2.0.0.BUILD-SNAPSHOT</spring-boot.version>
diff --git a/generators/server/templates/src/main/resources/config/_application.yml b/generators/server/templates/src/main/resources/config/_application.yml
index d5832813d2..1b54425e53 100644
--- a/generators/server/templates/src/main/resources/config/_application.yml
+++ b/generators/server/templates/src/main/resources/config/_application.yml
@@ -112,8 +112,6 @@ management:
     health:
         mail:
             enabled: false # When using the MailService, configure an SMTP server and set this to true
-    metrics:
-        enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead
 <%_ if (messageBroker === 'kafka') { _%>
         binders:
             enabled: true


Test patch:
diff --git a/test/kubernetes.spec.js b/test/kubernetes.spec.js
index 795b060c04..894c789bec 100644
--- a/test/kubernetes.spec.js
+++ b/test/kubernetes.spec.js
@@ -8,74 +8,68 @@ const fse = require('fs-extra');
 
 const expectedFiles = {
     eurekaregistry: [
-        './k8s/registry/jhipster-registry.yml',
-        './k8s/registry/application-configmap.yml'
+        'registry/jhipster-registry.yml',
+        'registry/application-configmap.yml'
     ],
     consulregistry: [
-        './k8s/registry/consul.yml',
-        './k8s/registry/consul-config-loader.yml',
-        './k8s/registry/application-configmap.yml'
+        'registry/consul.yml',
+        'registry/consul-config-loader.yml',
+        'registry/application-configmap.yml'
     ],
     jhgate: [
-        './k8s/jhgate/jhgate-deployment.yml',
-        './k8s/jhgate/jhgate-mysql.yml',
-        './k8s/jhgate/jhgate-service.yml'
+        'jhgate/jhgate-deployment.yml',
+        'jhgate/jhgate-mysql.yml',
+        'jhgate/jhgate-service.yml'
     ],
     jhgateingress: [
-        './k8s/jhgate/jhgate-deployment.yml',
-        './k8s/jhgate/jhgate-mysql.yml',
-        './k8s/jhgate/jhgate-service.yml',
-        './k8s/jhgate/jhgate-ingress.yml'
+        'jhgate/jhgate-deployment.yml',
+        'jhgate/jhgate-mysql.yml',
+        'jhgate/jhgate-service.yml',
+        'jhgate/jhgate-ingress.yml'
     ],
     customnamespace: [
-        './k8s/namespace.yml'
+        'namespace.yml'
     ],
     jhconsole: [
-        './k8s/console/jhipster-console.yml',
-        './k8s/console/jhipster-elasticsearch.yml',
-        './k8s/console/jhipster-logstash.yml',
-        './k8s/console/jhipster-dashboard-console.yml',
-        './k8s/console/jhipster-zipkin.yml'
+        'console/jhipster-console.yml',
+        'console/jhipster-elasticsearch.yml',
+        'console/jhipster-logstash.yml',
+        'console/jhipster-dashboard-console.yml',
+        'console/jhipster-zipkin.yml'
     ],
     msmysql: [
-        './k8s/msmysql/msmysql-deployment.yml',
-        './k8s/msmysql/msmysql-mysql.yml',
-        './k8s/msmysql/msmysql-service.yml'
+        'msmysql/msmysql-deployment.yml',
+        'msmysql/msmysql-mysql.yml',
+        'msmysql/msmysql-service.yml'
     ],
     mspsql: [
-        './k8s/mspsql/mspsql-deployment.yml',
-        './k8s/mspsql/mspsql-postgresql.yml',
-        './k8s/mspsql/mspsql-service.yml',
-        './k8s/mspsql/mspsql-elasticsearch.yml'
+        'mspsql/mspsql-deployment.yml',
+        'mspsql/mspsql-postgresql.yml',
+        'mspsql/mspsql-service.yml',
+        'mspsql/mspsql-elasticsearch.yml'
     ],
     msmongodb: [
-        './k8s/msmongodb/msmongodb-deployment.yml',
-        './k8s/msmongodb/msmongodb-mongodb.yml',
-        './k8s/msmongodb/msmongodb-service.yml'
+        'msmongodb/msmongodb-deployment.yml',
+        'msmongodb/msmongodb-mongodb.yml',
+        'msmongodb/msmongodb-service.yml'
     ],
     msmariadb: [
-        './k8s/msmariadb/msmariadb-deployment.yml',
-        './k8s/msmariadb/msmariadb-mariadb.yml',
-        './k8s/msmariadb/msmariadb-service.yml'
+        'msmariadb/msmariadb-deployment.yml',
+        'msmariadb/msmariadb-mariadb.yml',
+        'msmariadb/msmariadb-service.yml'
     ],
     monolith: [
-        './k8s/samplemysql/samplemysql-deployment.yml',
-        './k8s/samplemysql/samplemysql-mysql.yml',
-        './k8s/samplemysql/samplemysql-service.yml',
-        './k8s/samplemysql/samplemysql-elasticsearch.yml'
+        'samplemysql/samplemysql-deployment.yml',
+        'samplemysql/samplemysql-mysql.yml',
+        'samplemysql/samplemysql-service.yml',
+        'samplemysql/samplemysql-elasticsearch.yml'
     ],
     kafka: [
-        './k8s/samplekafka/samplekafka-deployment.yml',
-        './k8s/samplekafka/samplekafka-mysql.yml',
-        './k8s/samplekafka/samplekafka-service.yml',
-        './k8s/samplekafka/samplekafka-kafka.yml'
+        'samplekafka/samplekafka-deployment.yml',
+        'samplekafka/samplekafka-mysql.yml',
+        'samplekafka/samplekafka-service.yml',
+        'samplekafka/samplekafka-kafka.yml'
     ],
-    prometheusmonit: [
-        './k8s/monitoring/jhipster-prometheus-crd.yml',
-        './k8s/monitoring/jhipster-prometheus-cr.yml',
-        './k8s/monitoring/jhipster-grafana.yml',
-        './k8s/monitoring/jhipster-grafana-dashboard.yml'
-    ]
 };
 
 describe('JHipster Kubernetes Sub Generator', () => {
@@ -97,18 +91,19 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipsterrepository',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'jhipsternamespace',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
                 })
                 .on('end', done);
         });
         it('creates expected registry files and content', () => {
             assert.file(expectedFiles.eurekaregistry);
-            assert.fileContent('./k8s/registry/jhipster-registry.yml', /# base64 encoded "meetup"/);
+            assert.fileContent('registry/jhipster-registry.yml', /# base64 encoded "meetup"/);
         });
         it('creates expected gateway files and content', () => {
             assert.file(expectedFiles.jhgate);
-            assert.fileContent('./k8s/jhgate/jhgate-deployment.yml', /image: jhipsterrepository\/jhgate/);
-            assert.fileContent('./k8s/jhgate/jhgate-deployment.yml', /jhipsternamespace.svc.cluster/);
+            assert.fileContent('jhgate/jhgate-deployment.yml', /image: jhipsterrepository\/jhgate/);
+            assert.fileContent('jhgate/jhgate-deployment.yml', /jhipsternamespace.svc.cluster/);
         });
     });
 
@@ -130,6 +125,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -163,7 +159,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'mynamespace',
-                    monitoring: 'elk',
+                    jhipsterConsole: true,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -200,6 +196,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'Ingress',
                     ingressDomain: 'example.com'
 
@@ -235,6 +232,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -275,6 +273,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -317,6 +316,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -347,6 +347,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
                     dockerRepositoryName: 'jhipster',
                     dockerPushCommand: 'docker push',
                     kubernetesNamespace: 'default',
+                    jhipsterConsole: false,
                     kubernetesServiceType: 'LoadBalancer'
 
                 })
@@ -359,41 +360,4 @@ describe('JHipster Kubernetes Sub Generator', () => {
             assert.file(expectedFiles.kafka);
         });
     });
-
-    describe('mysql microservice with custom namespace and jhipster prometheus monitoring', () => {
-        beforeEach((done) => {
-            helpers
-                .run(require.resolve('../generators/kubernetes'))
-                .inTmpDir((dir) => {
-                    fse.copySync(path.join(__dirname, './templates/compose/'), dir);
-                })
-                .withOptions({ skipChecks: true })
-                .withPrompts({
-                    composeApplicationType: 'microservice',
-                    directoryPath: './',
-                    chosenApps: [
-                        '02-mysql'
-                    ],
-                    dockerRepositoryName: 'jhipster',
-                    dockerPushCommand: 'docker push',
-                    kubernetesNamespace: 'mynamespace',
-                    monitoring: 'prometheus',
-                    kubernetesServiceType: 'LoadBalancer'
-
-                })
-                .on('end', done);
-        });
-        it('creates expected registry files', () => {
-            assert.file(expectedFiles.eurekaregistry);
-        });
-        it('creates expected mysql files', () => {
-            assert.file(expectedFiles.msmysql);
-        });
-        it('creates expected prometheus files', () => {
-            assert.file(expectedFiles.prometheusmonit);
-        });
-        it('creates expected namespace file', () => {
-            assert.file(expectedFiles.customnamespace);
-        });
-    });
 });