From: Boris Ranto Date: Wed, 24 Oct 2018 11:17:00 +0000 (+0200) Subject: cmake: Support grafana dashboard installation X-Git-Tag: v14.1.0~1051^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ade7149106cfe12ed7af16edd609bdd0e561708;p=ceph.git cmake: Support grafana dashboard installation We are currently hosting the grafana dashboards in our repo but we do not install them. This patch adds the cmake support. Signed-off-by: Boris Ranto --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0af69b440de1..710bc14a5881 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/monitoring/grafana/dashboards/CMakeLists.txt b/monitoring/grafana/dashboards/CMakeLists.txt new file mode 100644 index 000000000000..41ca947a6dc8 --- /dev/null +++ b/monitoring/grafana/dashboards/CMakeLists.txt @@ -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})