diff --git a/grafanalib-dashboards/COPYRIGHT b/grafanalib-dashboards/COPYRIGHT new file mode 100644 --- /dev/null +++ b/grafanalib-dashboards/COPYRIGHT @@ -0,0 +1,20 @@ +Copyright © 2019 The Software Heritage developers + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/grafanalib-dashboards/Changelog b/grafanalib-dashboards/Changelog new file mode 100644 --- /dev/null +++ b/grafanalib-dashboards/Changelog @@ -0,0 +1,4 @@ +This package has been created from source code managed in a git repository. + +Its full history can be consulted at the following URL: +https://forge.softwareheritage.org/source/swh-grafana-dashboards/ diff --git a/grafanalib-dashboards/DEBIAN/control b/grafanalib-dashboards/DEBIAN/control new file mode 100644 --- /dev/null +++ b/grafanalib-dashboards/DEBIAN/control @@ -0,0 +1,9 @@ +Package: swh-grafanalib-dashboards +Version: 1.0 +Section: admin +Priority: optional +Architecture: all +Depends: grafana (>= 6.4.4) +Maintainer: Software Heritage Developers +Description: Software Heritage auto-generated Grafana dashboards + These are intended to replace Munin dashboards diff --git a/grafanalib-dashboards/Makefile b/grafanalib-dashboards/Makefile --- a/grafanalib-dashboards/Makefile +++ b/grafanalib-dashboards/Makefile @@ -1,5 +1,13 @@ # Generate json dashboards +NAME=swh-grafanalib-dashboards +VERSION=1.0 +PKGNAME=$(NAME)-$(VERSION) + +STAGEDIR:= $(shell mktemp -d) +DESTDIR=$(STAGEDIR)/usr/local/share/swh-data/swh-grafanalib-dashboards +DOCDIR=$(STAGEDIR)/usr/share/doc/$(NAME) + TARGETS= \ grafanalib.cpu.temperatures.json \ grafanalib.cpu.usage.json \ @@ -15,6 +23,18 @@ default: $(TARGETS) +package: $(TARGETS) + cp -a DEBIAN $(STAGEDIR) + mkdir -p $(DESTDIR) + cp -a $(TARGETS) $(DESTDIR) + mkdir -p $(DOCDIR) + cp -a COPYRIGHT $(DOCDIR)/copyright + gzip -c -n -9 Changelog > $(DOCDIR)/changelog.gz + fakeroot dpkg-deb --build $(STAGEDIR) + mv $(STAGEDIR).deb $(PKGNAME).deb + @echo "Removing $(STAGEDIR) stage directory" + @rm -rf $(STAGEDIR) + %.json: %.py generate-dashboard -o $@ $<