Skip to content

Instantly share code, notes, and snippets.

View chanjarster's full-sized avatar
🎯
Focusing

Daniel Qian chanjarster

🎯
Focusing
  • Shanghai, China
View GitHub Profile
@chanjarster
chanjarster / echo-server.yaml
Last active August 17, 2018 05:53
Istio 1.0: HTTPRoute `appendHeaders` got wrong result if that header already exists in request headers.
apiVersion: v1
kind: Namespace
metadata:
name: istio-test
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Service
metadata:
@chanjarster
chanjarster / docker-image-clear.sh
Created September 19, 2018 01:29
清理没有tag的docker image
#!/bin/bash
docker image ls | grep '<none>' | awk '{print $3}' | xargs -n1 -I{} docker image rm {}
@chanjarster
chanjarster / tomcat-jmx-non-ssl.yaml
Last active October 15, 2018 03:15
k8s-tomcat-jmx-samples
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tomcat-jmx-non-ssl
namespace: default
spec:
selector:
matchLabels:
app: tomcat-jmx-non-ssl
@chanjarster
chanjarster / tomcat-dashboard.json
Last active August 22, 2020 19:17
Grafana dashboard - tomcat dashboard
{
"__inputs": [
{
"name": "VAR_JOB",
"type": "constant",
"label": "Job",
"value": "java",
"description": ""
}
],
@chanjarster
chanjarster / jvm-dashboard.json
Last active February 23, 2023 06:29
Grafana dashboard - JVM dashboard
{
"__inputs": [
{
"name": "VAR_JOB",
"type": "constant",
"label": "job",
"value": "java",
"description": ""
}
],
@chanjarster
chanjarster / jvm-dashboard-for-prometheus-operator.json
Last active May 10, 2021 02:36
Grafana dashboard - JVM dashboard (for Prometheus Operator)
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.2.4"
},
{
@chanjarster
chanjarster / tomcat-dashboard-for-prometheus-operator.json
Last active November 19, 2020 03:42
Grafana dashboard - Tomcat dashboard (for Prometheus Operator)
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.2.4"
},
{
@chanjarster
chanjarster / Jenkinsfile
Created November 28, 2018 08:56
Maven+Docker的Jenkins pipeline
pipeline {
agent any
triggers {
pollSCM '*/5 * * * *'
}
options {
// 禁止因Multibranch pipeline index动作触发构建
overrideIndexTriggers false
@chanjarster
chanjarster / scrape-data.txt
Created December 28, 2018 06:49
Prometheus mock data
# HELP x fake metric
# TYPE x gauge
x 1
---
# HELP x fake metric
# TYPE x gauge
x 2
---
# HELP x fake metric
# TYPE x gauge
@chanjarster
chanjarster / docker-stack.yml
Last active February 1, 2019 03:22
Docker prometheus stack
version: '3.7'
# 基于 https://github.com/vegasbrianc/prometheus/ 修改
# Prometheus:http://<任意swarm node ip>:9000
# Node-exporter:http://<任意swarm node ip>:9010
# Alertmanager:http://<任意swarm node ip>:9020
# cAdvisor:http://<任意swarm node ip>:9030
# Grafana:http://<任意swarm node ip>:9040,用户名admin,密码foobar
x-logging: