Skip to content

Commit b0cce6c

Browse files
committed
prom: show
1 parent 67ecdd5 commit b0cce6c

4 files changed

Lines changed: 136 additions & 0 deletions

File tree

gen/k8s/prom/kustomization.yml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/k8s/prom/show.yml

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

k8s/prom/kustomization.jsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'./cloudprober.yml',
88
'./tito.yml',
99
'./nat-6x.yml',
10+
'./show.yml',
1011
'./rules.yml',
1112
],
1213
}

k8s/prom/show.jsonnet

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
local hosts = [
2+
'show-01.venue.rubykaigi.net',
3+
];
4+
local jobs = [
5+
{
6+
port:: 9100,
7+
metadata+: { name: 'show' },
8+
},
9+
{
10+
port:: 9324,
11+
metadata+: { name: 'show-bird' },
12+
},
13+
];
14+
[
15+
{
16+
apiVersion: 'monitoring.coreos.com/v1alpha1',
17+
kind: 'ScrapeConfig',
18+
metadata: {
19+
name: error 'specify job.metadata.name',
20+
labels: {
21+
release: 'kube-prometheus-stack',
22+
},
23+
},
24+
spec: {
25+
scrapeInterval: '10s',
26+
scrapeTimeout: '9s',
27+
metricsPath: '/metrics',
28+
params: {},
29+
relabelings: [
30+
{
31+
sourceLabels: ['__address__'],
32+
targetLabel: 'instance',
33+
regex: '^(me0\\.)?(.+\\.rubykaigi\\.net)(:.*)?$',
34+
replacement: '$2',
35+
},
36+
import './relabel_instance_short.libsonnet',
37+
],
38+
staticConfigs: [{
39+
targets: [
40+
'%s:%d' % [
41+
host,
42+
job.port,
43+
]
44+
for host in hosts
45+
],
46+
}],
47+
},
48+
} + job
49+
for job in jobs
50+
]

0 commit comments

Comments
 (0)