This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# uncomment for init database (first start) | |
spring.datasource.initialize=true | |
spring.datasource.schema=classpath*:db/mysql/initDB.sql | |
spring.datasource.data=classpath*:db/mysql/populateDB.sql | |
# MySQL config start | |
#---------------------------------------------------------------- | |
spring.datasource.url = jdbc:mysql://localhost:3306/petclinic?useUnicode=true | |
spring.datasource.username=root | |
spring.datasource.password=petclinic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# active profiles config | |
# | |
# application use two active profiles | |
# | |
# one for select repository layer | |
# ------------------------------------------------ | |
# When using HSQL, use: hsqldb | |
# When using MySQL, use: mysql | |
# When using PostgeSQL, use: postgresql | |
# ------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# I am not a Maven Guru so I am sure there is a better way to do the copy in the pom.xml | |
# But I am demonstrating that java apm agent is not required at compile time | |
# the java apm agent should probably be installed / pulled from a local or maven repo | |
# In PCF the entire app and app agent need to be deployed | |
# There are some subtleties with PCF that I will not go into here | |
### | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# New 7.x for computing uptime percentage by URL | |
# Note you can change the timestamp range and interval as needed. | |
# Right now this aggs on "url.domain" but could / should be "monitor.name" or "monitor.id" | |
POST /heartbeat-*/_search?size=0 | |
{ | |
"query": { | |
"range": { | |
"@timestamp": { | |
"gte": "now-24h/h", | |
"lte": "now/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '3.1' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG} | |
environment: ['ES_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node', 'http.host=0.0.0.0', 'transport.host=127.0.0.1'] | |
ports: ['127.0.0.1:9200:9200'] | |
networks: ['stack'] | |
ulimits: | |
memlock: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User docker compose to stand up whole stack Elasticsearch, Kibana and APM server | |
# You can ^C to stop afterwards you can use `start` and `stop` commands | |
# THIS IS NOT A PRODUCTION SETUP | |
# Docker compose file elastic-apm-compose.yml found here : https://gist.github.com/bvader/9665fa7b3bd69457517e41a7c28b4725 | |
TAG=7.3.0 docker-compose -f elastic-apm-compose.yml up | |
# After the stack is full running please go to | |
http://localhost:5601/app/kibana#/home/tutorial/apm?_g=() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"_id": "af6e3990-870a-11e9-808a-77559368a0be", | |
"_type": "dashboard", | |
"_source": { | |
"title": "pcf-rtr-dashboard", | |
"hits": 0, | |
"description": "", | |
"panelsJSON": "[{\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"version\":\"7.0.0\",\"panelIndex\":\"1\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"version\":\"7.0.0\",\"panelIndex\":\"2\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"gridData\":{\"x\":0,\"y\":46,\"w\":48,\"h\":15,\"i\":\"3\"},\"version\":\"7.0.0\",\"panelIndex\":\"3\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"gridData\":{\"x\":0,\"y\":15,\"w\":48,\"h\":15,\"i\":\"4\"},\"version\":\"7.0.0\",\"panelIndex\":\"4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"gridData\":{\"x\":0,\"y\":30,\"w\":48,\"h\":16,\"i\":\"5\"},\"version\":\"7.0.0\",\"panelIndex\":\"5\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", | |
"optionsJSON": " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Assumes Basic Understanding of PCF, Elasticsearch, Kibana and logstash | |
# Should support Elasticstack 7.X | |
## | |
## | |
# Step 1: Setup index template | |
# Save this file https://gist.github.com/bvader/addf80083b170e0cfcd78f946a78d50e | |
# to pcf_space_drain_log_template.json | |
# Then run the following command replacing the username, password and elasticearchhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG} | |
environment: ['ES_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node', 'http.host=0.0.0.0', 'transport.host=127.0.0.1'] | |
ports: ['127.0.0.1:9200:9200'] | |
networks: ['stack'] | |
ulimits: | |
memlock: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Prerequisite : Properly configured Hot / Warm Elasticsearch cluster with correct node attributes. | |
2) Configure Metricbeat to point directly to Elasticsearch and run setup | |
NOTE: When metricbeat setup is run, it will overwrite the ILM Policy and recreate the bootstrap index with that policy, | |
this is often confusing. Running setup also creates all the dashboards, index templates etc. so it is very useful. | |
As part of the template it will name the ILM policy and rollover_alias in this example metricbeat-7.4.0 | |
./metricbeat setup |
OlderNewer