156
157
# Data collection plugins
158
option(ENABLE_PLUGIN_GO "Enable metric collectors written in Go" ${DEFAULT_FEATURE_STATE})
159
+option(ENABLE_PLUGIN_PYTHON "Enable metric collectors written in Python" ${DEFAULT_FEATURE_STATE})
160
161
cmake_dependent_option(ENABLE_PLUGIN_APPS "Enable per-process resource usage monitoring" ${DEFAULT_FEATURE_STATE} "NOT OS_WINDOWS" False)
162
+cmake_dependent_option(ENABLE_PLUGIN_CHARTS "Enable metric collectors written in Bash" ${DEFAULT_FEATURE_STATE} "NOT OS_WINDOWS" False)
163
cmake_dependent_option(ENABLE_PLUGIN_CUPS "Enable CUPS monitoring" ${DEFAULT_FEATURE_STATE} "NOT OS_WINDOWS" False)
164
165
cmake_dependent_option(ENABLE_PLUGIN_FREEIPMI "Enable IPMI monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX OR OS_FREEBSD" False)
2484
install(DIRECTORY COMPONENT netdata DESTINATION var/run/netdata)
2485
install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata)
2486
install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/custom-plugins.d)
2485
-install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/go.d)
2487
install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/health.d)
2487
-install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/python.d)
2488
install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/ssl)
2489
install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/statsd.d)
2490
install(DIRECTORY COMPONENT netdata DESTINATION usr/lib/netdata/conf.d)
2839
# charts.d plugin
2840
#
2841
2842
-install(DIRECTORY COMPONENT plugin-chartsd DESTINATION etc/netdata/charts.d)
2842
+if(ENABLE_PLUGIN_CHARTS)
2843
+ install(DIRECTORY COMPONENT plugin-chartsd DESTINATION etc/netdata/charts.d)
2844
2844
-configure_file(src/collectors/charts.d.plugin/charts.d.plugin.in src/collectors/charts.d.plugin/charts.d.plugin @ONLY)
2845
-install(PROGRAMS
2846
- ${CMAKE_BINARY_DIR}/src/collectors/charts.d.plugin/charts.d.plugin
2847
- COMPONENT plugin-chartsd
2848
- DESTINATION usr/libexec/netdata/plugins.d)
2845
+ configure_file(src/collectors/charts.d.plugin/charts.d.plugin.in src/collectors/charts.d.plugin/charts.d.plugin @ONLY)
2846
+ install(PROGRAMS
2847
+ ${CMAKE_BINARY_DIR}/src/collectors/charts.d.plugin/charts.d.plugin
2848
+ COMPONENT plugin-chartsd
2849
+ DESTINATION usr/libexec/netdata/plugins.d)
2850
2850
-install(PROGRAMS
2851
- src/collectors/charts.d.plugin/charts.d.dryrun-helper.sh
2852
- COMPONENT plugin-chartsd
2853
- DESTINATION usr/libexec/netdata/plugins.d)
2851
+ install(PROGRAMS
2852
+ src/collectors/charts.d.plugin/charts.d.dryrun-helper.sh
2853
+ COMPONENT plugin-chartsd
2854
+ DESTINATION usr/libexec/netdata/plugins.d)
2855
2855
-# loopsleepms is used by the tc.plugin -> ship it in the netdata component
2856
-install(FILES
2857
- src/collectors/charts.d.plugin/loopsleepms.sh.inc
2858
- COMPONENT netdata
2859
- DESTINATION usr/libexec/netdata/plugins.d)
2856
+ install(FILES
2857
+ src/collectors/charts.d.plugin/charts.d.conf
2858
+ COMPONENT plugin-chartsd
2859
+ DESTINATION usr/lib/netdata/conf.d)
2860
2861
-install(FILES
2862
- src/collectors/charts.d.plugin/charts.d.conf
2863
- COMPONENT plugin-chartsd
2864
- DESTINATION usr/lib/netdata/conf.d)
2861
+ install(PROGRAMS
2862
+ src/collectors/charts.d.plugin/example/example.chart.sh
2863
+ src/collectors/charts.d.plugin/libreswan/libreswan.chart.sh
2864
+ src/collectors/charts.d.plugin/opensips/opensips.chart.sh
2865
+ COMPONENT plugin-chartsd
2866
+ DESTINATION usr/libexec/netdata/charts.d)
2867
2866
-install(PROGRAMS
2867
- src/collectors/charts.d.plugin/example/example.chart.sh
2868
- src/collectors/charts.d.plugin/libreswan/libreswan.chart.sh
2869
- src/collectors/charts.d.plugin/opensips/opensips.chart.sh
2870
- COMPONENT plugin-chartsd
2871
- DESTINATION usr/libexec/netdata/charts.d)
2868
+ install(FILES
2869
+ src/collectors/charts.d.plugin/example/example.conf
2870
+ src/collectors/charts.d.plugin/libreswan/libreswan.conf
2871
+ src/collectors/charts.d.plugin/opensips/opensips.conf
2872
+ COMPONENT plugin-chartsd
2873
+ DESTINATION usr/lib/netdata/conf.d/charts.d)
2874
2873
-install(FILES
2874
- src/collectors/charts.d.plugin/example/example.conf
2875
- src/collectors/charts.d.plugin/libreswan/libreswan.conf
2876
- src/collectors/charts.d.plugin/opensips/opensips.conf
2877
- COMPONENT plugin-chartsd
2878
- DESTINATION usr/lib/netdata/conf.d/charts.d)
2875
+ if(BUILD_FOR_PACKAGING)
2876
+ install(FILES
2877
+ ${PKG_FILES_PATH}/copyright
2878
+ COMPONENT plugin-chartsd
2879
+ DESTINATION usr/share/doc/netdata-plugin-chartsd)
2880
+ endif()
2881
+endif()
2882
2880
-if(BUILD_FOR_PACKAGING)
2881
- install(FILES
2882
- ${PKG_FILES_PATH}/copyright
2883
- COMPONENT plugin-chartsd
2884
- DESTINATION usr/share/doc/netdata-plugin-chartsd)
2883
+# This is needed both by the TC plugin (which only gets built on Linux) and the charts plugin.
2884
+if(OS_LINUX OR ENABLE_PLUGIN_CHARTS)
2885
+ install(FILES
2886
+ src/collectors/charts.d.plugin/loopsleepms.sh.inc
2887
+ COMPONENT netdata
2888
+ DESTINATION usr/libexec/netdata/plugins.d)
2889
endif()
2890
2891
#
2892
# tc-qos-helper
2893
#
2894
2891
-configure_file(src/collectors/tc.plugin/tc-qos-helper.sh.in src/collectors/tc.plugin/tc-qos-helper.sh @ONLY)
2892
-install(PROGRAMS
2893
- ${CMAKE_BINARY_DIR}/src/collectors/tc.plugin/tc-qos-helper.sh
2894
- COMPONENT netdata
2895
- DESTINATION usr/libexec/netdata/plugins.d)
2895
+if(OS_LINUX)
2896
+ configure_file(src/collectors/tc.plugin/tc-qos-helper.sh.in src/collectors/tc.plugin/tc-qos-helper.sh @ONLY)
2897
+ install(PROGRAMS
2898
+ ${CMAKE_BINARY_DIR}/src/collectors/tc.plugin/tc-qos-helper.sh
2899
+ COMPONENT netdata
2900
+ DESTINATION usr/libexec/netdata/plugins.d)
2901
+endif()
2902
2903
# confs
2904
install(FILES
2911
# python.d plugin
2912
#
2913
2908
-configure_file(src/collectors/python.d.plugin/python.d.plugin.in src/collectors/python.d.plugin/python.d.plugin @ONLY)
2909
-install(PROGRAMS ${CMAKE_BINARY_DIR}/src/collectors/python.d.plugin/python.d.plugin
2910
- COMPONENT plugin-pythond
2911
- DESTINATION usr/libexec/netdata/plugins.d)
2914
+if(ENABLE_PLUGIN_PYTHON)
2915
+ install(DIRECTORY COMPONENT plugin-pythond DESTINATION etc/netdata/python.d)
2916
2913
-install(DIRECTORY src/collectors/python.d.plugin/python_modules
2914
- COMPONENT plugin-pythond
2915
- DESTINATION usr/libexec/netdata/python.d)
2917
+ configure_file(src/collectors/python.d.plugin/python.d.plugin.in src/collectors/python.d.plugin/python.d.plugin @ONLY)
2918
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/src/collectors/python.d.plugin/python.d.plugin
2919
+ COMPONENT plugin-pythond
2920
+ DESTINATION usr/libexec/netdata/plugins.d)
2921
2917
-install(FILES src/collectors/python.d.plugin/python.d.conf
2918
- COMPONENT plugin-pythond
2919
- DESTINATION usr/lib/netdata/conf.d)
2922
+ install(DIRECTORY src/collectors/python.d.plugin/python_modules
2923
+ COMPONENT plugin-pythond
2924
+ DESTINATION usr/libexec/netdata/python.d)
2925
2921
-install(FILES
2922
- src/collectors/python.d.plugin/am2320/am2320.conf
2923
- src/collectors/python.d.plugin/ceph/ceph.conf
2924
- src/collectors/python.d.plugin/go_expvar/go_expvar.conf
2925
- src/collectors/python.d.plugin/haproxy/haproxy.conf
2926
- src/collectors/python.d.plugin/openldap/openldap.conf
2927
- src/collectors/python.d.plugin/oracledb/oracledb.conf
2928
- src/collectors/python.d.plugin/pandas/pandas.conf
2929
- src/collectors/python.d.plugin/spigotmc/spigotmc.conf
2930
- src/collectors/python.d.plugin/traefik/traefik.conf
2931
- src/collectors/python.d.plugin/zscores/zscores.conf
2932
- COMPONENT plugin-pythond
2933
- DESTINATION usr/lib/netdata/conf.d/python.d)
2926
+ install(FILES src/collectors/python.d.plugin/python.d.conf
2927
+ COMPONENT plugin-pythond
2928
+ DESTINATION usr/lib/netdata/conf.d)
2929
2935
-install(FILES
2936
- src/collectors/python.d.plugin/am2320/am2320.chart.py
2937
- src/collectors/python.d.plugin/ceph/ceph.chart.py
2938
- src/collectors/python.d.plugin/go_expvar/go_expvar.chart.py
2939
- src/collectors/python.d.plugin/haproxy/haproxy.chart.py
2940
- src/collectors/python.d.plugin/openldap/openldap.chart.py
2941
- src/collectors/python.d.plugin/oracledb/oracledb.chart.py
2942
- src/collectors/python.d.plugin/pandas/pandas.chart.py
2943
- src/collectors/python.d.plugin/spigotmc/spigotmc.chart.py
2944
- src/collectors/python.d.plugin/traefik/traefik.chart.py
2945
- src/collectors/python.d.plugin/zscores/zscores.chart.py
2946
- COMPONENT plugin-pythond
2947
- DESTINATION usr/libexec/netdata/python.d)
2930
+ install(FILES
2931
+ src/collectors/python.d.plugin/am2320/am2320.conf
2932
+ src/collectors/python.d.plugin/ceph/ceph.conf
2933
+ src/collectors/python.d.plugin/go_expvar/go_expvar.conf
2934
+ src/collectors/python.d.plugin/haproxy/haproxy.conf
2935
+ src/collectors/python.d.plugin/openldap/openldap.conf
2936
+ src/collectors/python.d.plugin/oracledb/oracledb.conf
2937
+ src/collectors/python.d.plugin/pandas/pandas.conf
2938
+ src/collectors/python.d.plugin/spigotmc/spigotmc.conf
2939
+ src/collectors/python.d.plugin/traefik/traefik.conf
2940
+ src/collectors/python.d.plugin/zscores/zscores.conf
2941
+ COMPONENT plugin-pythond
2942
+ DESTINATION usr/lib/netdata/conf.d/python.d)
2943
2949
-if(BUILD_FOR_PACKAGING)
2950
- install(FILES
2951
- ${PKG_FILES_PATH}/copyright
2952
- COMPONENT plugin-pythond
2953
- DESTINATION usr/share/doc/netdata-plugin-pythond)
2944
+ install(FILES
2945
+ src/collectors/python.d.plugin/am2320/am2320.chart.py
2946
+ src/collectors/python.d.plugin/ceph/ceph.chart.py
2947
+ src/collectors/python.d.plugin/go_expvar/go_expvar.chart.py
2948
+ src/collectors/python.d.plugin/haproxy/haproxy.chart.py
2949
+ src/collectors/python.d.plugin/openldap/openldap.chart.py
2950
+ src/collectors/python.d.plugin/oracledb/oracledb.chart.py
2951
+ src/collectors/python.d.plugin/pandas/pandas.chart.py
2952
+ src/collectors/python.d.plugin/spigotmc/spigotmc.chart.py
2953
+ src/collectors/python.d.plugin/traefik/traefik.chart.py
2954
+ src/collectors/python.d.plugin/zscores/zscores.chart.py
2955
+ COMPONENT plugin-pythond
2956
+ DESTINATION usr/libexec/netdata/python.d)
2957
+
2958
+ if(BUILD_FOR_PACKAGING)
2959
+ install(FILES
2960
+ ${PKG_FILES_PATH}/copyright
2961
+ COMPONENT plugin-pythond
2962
+ DESTINATION usr/share/doc/netdata-plugin-pythond)
2963
+ endif()
2964
endif()
2965
2966
#
2976
# go.d.plugin
2977
#
2978
if(ENABLE_PLUGIN_GO)
2979
+ install(DIRECTORY COMPONENT plugin-go DESTINATION etc/netdata/go.d)
2980
+
2981
install(FILES src/go/plugin/go.d/config/go.d.conf
2982
COMPONENT plugin-go
2983
DESTINATION usr/lib/netdata/conf.d)