Merge pull request #24735 from b-ranto/wip-rpm-dashboards

build/ops: rpm: Package grafana dashboards

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2018-10-30 18:57:12 +08:00 committed by GitHub
commit f386db6433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 1 deletions

View File

@ -707,6 +707,11 @@ if(LINUX)
add_subdirectory(etc/sysctl)
endif()
option(WITH_GRAFANA "install grafana dashboards" OFF)
if(WITH_GRAFANA)
add_subdirectory(monitoring/grafana/dashboards)
endif()
include(CTags)
option(CTAG_EXCLUDES "Exclude files/directories when running ctag.")
add_tags(ctags

View File

@ -910,6 +910,19 @@ depending on python-ceph should be fixed to depend on python-rados,
python-rbd, python-rgw or python-cephfs instead.
%endif
%package grafana-dashboards
Summary: The set of Grafana dashboards for monitoring purposes
BuildArch: noarch
%if 0%{?suse_version}
Group: System/Filesystems
%endif
%description grafana-dashboards
This package provides a set of Grafana dashboards for monitoring of
Ceph clusters. The dashboards require a Prometheus server setup
collecting data from Ceph Manager "prometheus" module and Prometheus
project "node_exporter" module. The dashboards are designed to be
integrated with the Ceph Manager Dashboard web UI.
#################################################################################
# common
#################################################################################
@ -1024,7 +1037,8 @@ ${CMAKE} .. \
%else
-DWITH_LIBRADOSSTRIPER=OFF \
%endif
-DBOOST_J=$CEPH_SMP_NCPUS
-DBOOST_J=$CEPH_SMP_NCPUS \
-DWITH_GRAFANA=ON
make "$CEPH_MFLAGS_JOBS"
@ -1947,5 +1961,11 @@ exit 0
# actually build this meta package.
%endif
%files grafana-dashboards
%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
%doc monitoring/grafana/dashboards/README
%doc monitoring/grafana/README.md
%changelog

View File

@ -0,0 +1,8 @@
set(CEPH_GRAFANA_DASHBOARDS_DIR "${CMAKE_INSTALL_SYSCONFDIR}/grafana/dashboards/ceph-dashboard"
CACHE PATH "Location for grafana dashboards")
FILE(GLOB CEPH_GRAFANA_DASHBOARDS "*.json")
install(FILES
${CEPH_GRAFANA_DASHBOARDS}
DESTINATION ${CEPH_GRAFANA_DASHBOARDS_DIR})