Skip to content

Commit cd0c709

Browse files
committed
grafana: migrate to bpm and add missing config spec
1 parent 65f6dbd commit cd0c709

File tree

9 files changed

+1565
-260
lines changed

9 files changed

+1565
-260
lines changed

LICENSE

+8-17
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ SECTION 1: Apache License, V2.0
227227
>>> consul_exporter
228228
>>> elasticsearch_exporter
229229
>>> firehose_exporter
230-
>>> grafana
231230
>>> Grafana Status Panel Plugin
232231
>>> grafana-diagram
233232
>>> grafana-exporter
@@ -272,6 +271,7 @@ SECTION 4: BSD-3-Clause License
272271
SECTION 5: GNU Affero General Public License v3.0
273272

274273
>>> mysql_dashboards
274+
>>> grafana
275275

276276
SECTION 6: Python Software Foundation License Version 2
277277

@@ -372,22 +372,6 @@ SoundCloud Ltd. (https://soundcloud.com/).
372372
Cloud Foundry Firehose Prometheus exporter
373373
Copyright 2016-Present Ferran Rodenas
374374

375-
>>> grafana
376-
377-
Copyright 2014-2017 Torkel Ödegaard, Raintank Inc.
378-
379-
Licensed under the Apache License, Version 2.0 (the "License"); you
380-
may not use this file except in compliance with the License. You may
381-
obtain a copy of the License at
382-
383-
http://www.apache.org/licenses/LICENSE-2.0
384-
385-
Unless required by applicable law or agreed to in writing, software
386-
distributed under the License is distributed on an "AS IS" BASIS,
387-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
388-
implied. See the License for the specific language governing
389-
permissions and limitations under the License.
390-
391375
>>> Grafana Status Panel Plugin
392376

393377
Copyright 2016 Vonage Holdings Corp.
@@ -1051,6 +1035,13 @@ End
10511035

10521036
>>> mysql_dashboards
10531037

1038+
>>> grafana
1039+
1040+
Copyright 2014-2021 Grafana Labs
1041+
1042+
This software is based on Kibana:
1043+
Copyright 2012-2013 Elasticsearch BV
1044+
10541045
--------------- SECTION 6: Python Software Foundation License Version 2 ----------
10551046

10561047
>>> Python

config/blobs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ gperf/gperf-3.1.tar.gz:
6464
sha: e3c0618c2d2e5586eda9498c867d5e4858a3b0e2
6565
grafana/grafana-9.5.1.linux-amd64.tar.gz:
6666
size: 78487778
67-
object_id: be9aa32e-833d-4c34-4671-f21d83c75142
67+
object_id: f847c659-596f-49cc-57cd-bafd3464bcc3
6868
sha: sha256:d9b7505cdd4299c1835c36547ffe2e62d3b0ec7600dca2c644a0519572c9c387
6969
grafana_plugins/flant-statusmap-panel-0.5.1.zip:
7070
size: 289519

jobs/grafana/monit

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
check process grafana
2-
with pidfile /var/vcap/sys/run/grafana/grafana.pid
3-
start program "/var/vcap/jobs/grafana/bin/grafana_ctl start"
4-
stop program "/var/vcap/jobs/grafana/bin/grafana_ctl stop"
2+
with pidfile /var/vcap/sys/run/bpm/grafana/grafana.pid
3+
start program "/var/vcap/jobs/bpm/bin/bpm start grafana"
4+
stop program "/var/vcap/jobs/bpm/bin/bpm stop grafana"
55
group vcap

jobs/grafana/spec

+401-46
Large diffs are not rendered by default.

jobs/grafana/templates/bin/grafana_ctl

-57
This file was deleted.

jobs/grafana/templates/bpm.yml.erb

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<%
2+
# program env variables
3+
env = {
4+
"LD_LIBRARY_PATH" => "/var/vcap/packages/grafana/lib",
5+
}
6+
# add proxies to env
7+
[ "http", "https", "no" ].each do |key|
8+
name = "#{key}_proxy"
9+
if_p("env.#{name}") do |val|
10+
env[name.upcase] = val
11+
env[name] = val
12+
end
13+
end
14+
15+
config = {
16+
"processes" => [
17+
{
18+
"name" => "grafana",
19+
"executable" => "/var/vcap/packages/grafana/bin/grafana-server",
20+
"env" => env,
21+
"persistent_disk" => true,
22+
"ephemeral_disk" => true,
23+
"args" => [
24+
"-config", "/var/vcap/jobs/grafana/config/grafana.ini",
25+
"-homepath", "/var/vcap/packages/grafana",
26+
],
27+
"limits" => {
28+
"open_files" => 65536
29+
}
30+
}
31+
]
32+
}
33+
%>
34+
35+
<%= YAML.dump(config) %>

0 commit comments

Comments
 (0)