Skip to content

Commit

Permalink
grafana: migrate to bpm and add missing config spec
Browse files Browse the repository at this point in the history
  • Loading branch information
psycofdj committed May 8, 2023
1 parent b6adfed commit 3a2eeee
Show file tree
Hide file tree
Showing 11 changed files with 1,567 additions and 260 deletions.
25 changes: 8 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ SECTION 1: Apache License, V2.0
>>> consul_exporter
>>> elasticsearch_exporter
>>> firehose_exporter
>>> grafana
>>> Grafana Status Panel Plugin
>>> grafana-diagram
>>> grafana-exporter
Expand Down Expand Up @@ -272,6 +271,7 @@ SECTION 4: BSD-3-Clause License
SECTION 5: GNU Affero General Public License v3.0

>>> mysql_dashboards
>>> grafana

SECTION 6: Python Software Foundation License Version 2

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

>>> grafana

Copyright 2014-2017 Torkel Ödegaard, Raintank Inc.

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.

>>> Grafana Status Panel Plugin

Copyright 2016 Vonage Holdings Corp.
Expand Down Expand Up @@ -1051,6 +1035,13 @@ End

>>> mysql_dashboards

>>> grafana

Copyright 2014-2021 Grafana Labs

This software is based on Kibana:
Copyright 2012-2013 Elasticsearch BV

--------------- SECTION 6: Python Software Foundation License Version 2 ----------

>>> Python
Expand Down
2 changes: 1 addition & 1 deletion config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ gperf/gperf-3.1.tar.gz:
sha: e3c0618c2d2e5586eda9498c867d5e4858a3b0e2
grafana/grafana-9.5.1.linux-amd64.tar.gz:
size: 78487778
object_id: be9aa32e-833d-4c34-4671-f21d83c75142
object_id: f847c659-596f-49cc-57cd-bafd3464bcc3
sha: sha256:d9b7505cdd4299c1835c36547ffe2e62d3b0ec7600dca2c644a0519572c9c387
grafana_plugins/flant-statusmap-panel-0.5.1.zip:
size: 289519
Expand Down
6 changes: 3 additions & 3 deletions jobs/grafana/monit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check process grafana
with pidfile /var/vcap/sys/run/grafana/grafana.pid
start program "/var/vcap/jobs/grafana/bin/grafana_ctl start"
stop program "/var/vcap/jobs/grafana/bin/grafana_ctl stop"
with pidfile /var/vcap/sys/run/bpm/grafana/grafana.pid
start program "/var/vcap/jobs/bpm/bin/bpm start grafana"
stop program "/var/vcap/jobs/bpm/bin/bpm stop grafana"
group vcap
447 changes: 401 additions & 46 deletions jobs/grafana/spec

Large diffs are not rendered by default.

57 changes: 0 additions & 57 deletions jobs/grafana/templates/bin/grafana_ctl

This file was deleted.

35 changes: 35 additions & 0 deletions jobs/grafana/templates/bpm.yml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<%
# program env variables
env = {
"LD_LIBRARY_PATH" => "/var/vcap/packages/grafana/lib",
}
# add proxies to env
[ "http", "https", "no" ].each do |key|
name = "#{key}_proxy"
if_p("env.#{name}") do |val|
env[name.upcase] = val
env[name] = val
end
end

config = {
"processes" => [
{
"name" => "grafana",
"executable" => "/var/vcap/packages/grafana/bin/grafana-server",
"env" => env,
"persistent_disk" => true,
"ephemeral_disk" => true,
"args" => [
"-config", "/var/vcap/jobs/grafana/config/grafana.ini",
"-homepath", "/var/vcap/packages/grafana",
],
"limits" => {
"open_files" => 65536
}
}
]
}
%>

<%= YAML.dump(config) %>
Loading

0 comments on commit 3a2eeee

Please sign in to comment.