collectd-extensions: add dependency on ntpq
[pti/rtp.git] / meta-stx / recipes-core / stx-monitoring / collectd-extensions.inc
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 PACKAGES += " collectd-extensions"
17
18 RDEPENDS_collectd-extensions += " \
19         systemd \
20         collectd \
21         fm-api \
22         ntpq \
23         python-influxdb \
24         python-oslo.concurrency \
25         python-httplib2 \
26         tsconfig \
27         "
28
29 do_configure_append () {
30         :
31
32
33 do_compile_append() {
34         :
35 }
36
37 local_unit_dir = "${sysconfdir}/systemd/system"
38 local_plugin_dir = "${sysconfdir}/collectd.d"
39 local_python_extensions_dir = "/opt/collectd/extensions/python"
40 local_config_extensions_dir = "/opt/collectd/extensions/config"
41
42
43 do_install_append() {
44
45         cd ${S}/collectd-extensions/src
46         install -m 755 -d ${D}/${sysconfdir}
47         install -m 755 -d ${D}/${local_unit_dir}
48         install -m 755 -d ${D}/${local_plugin_dir}
49         install -m 755 -d ${D}/${local_config_extensions_dir}
50         install -m 755 -d ${D}/${local_python_extensions_dir}
51
52         # support files ; service and pmon conf
53         install -m 644 collectd.service  ${D}/${local_unit_dir}
54         install -m 600 collectd.conf.pmon  ${D}/${local_config_extensions_dir}
55
56         # collectd python plugin files - notifiers
57         install -m 700  fm_notifier.py ${D}/${local_python_extensions_dir}
58         install -m 700 plugin_common.py ${D}/${local_python_extensions_dir}
59
60         # collectd python plugin files - resource plugins
61         install -m 700 cpu.py  ${D}/${local_python_extensions_dir}
62         install -m 700 memory.py  ${D}/${local_python_extensions_dir}
63         install -m 700 example.py  ${D}/${local_python_extensions_dir}
64         install -m 700 ntpq.py  ${D}/${local_python_extensions_dir}
65         install -m 700 interface.py ${D}/${local_python_extensions_dir}
66         install -m 700 remotels.py  ${D}/${local_python_extensions_dir}
67         install -m 700 ptp.py  ${D}/${local_python_extensions_dir}
68         install -m 700 ovs_interface.py  ${D}/${local_python_extensions_dir}
69
70
71         # collectd plugin conf files into /etc/collectd.d
72         install -m 600 python_plugins.conf  ${D}/${local_plugin_dir}
73         install -m 600 cpu.conf  ${D}/${local_plugin_dir}
74         install -m 600 memory.conf  ${D}/${local_plugin_dir}
75         install -m 600 df.conf  ${D}/${local_plugin_dir}
76         install -m 600 example.conf  ${D}/${local_plugin_dir}
77         install -m 600 ntpq.conf  ${D}/${local_plugin_dir}
78         install -m 600 interface.conf  ${D}/${local_plugin_dir}
79         install -m 600 remotels.conf  ${D}/${local_plugin_dir}
80         install -m 600 ptp.conf  ${D}/${local_plugin_dir}
81         install -m 600 ovs_interface.conf  ${D}/${local_plugin_dir}
82
83 }
84
85 FILES_collectd-extensions = " \
86         ${local_unit_dir}/collectd.service \
87         ${local_config_extensions_dir}/collectd.conf.pmon \
88         ${local_python_extensions_dir}/fm_notifier.py \
89         ${local_python_extensions_dir}/plugin_common.py \
90         ${local_python_extensions_dir}/cpu.py \
91         ${local_python_extensions_dir}/memory.py \
92         ${local_python_extensions_dir}/example.py \
93         ${local_python_extensions_dir}/ntpq.py \
94         ${local_python_extensions_dir}/interface.py \
95         ${local_python_extensions_dir}/remotels.py \
96         ${local_python_extensions_dir}/ptp.py \
97         ${local_python_extensions_dir}/ovs_interface.py \
98         ${local_plugin_dir}/python_plugins.conf \
99         ${local_plugin_dir}/cpu.conf \
100         ${local_plugin_dir}/memory.conf \
101         ${local_plugin_dir}/df.conf \
102         ${local_plugin_dir}/example.conf \
103         ${local_plugin_dir}/ntpq.conf \
104         ${local_plugin_dir}/interface.conf \
105         ${local_plugin_dir}/remotels.conf \
106         ${local_plugin_dir}/ptp.conf \
107         ${local_plugin_dir}/ovs_interface.conf \
108         "