Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-monitoring / collectd-extensions.bb
1 require monitoring-common.inc
2
3 SUBPATH0 = "collectd-extensions/src"
4
5 LICENSE = "Apache-2.0"
6 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
7
8 RDEPENDS_${PN}_append += " \
9         systemd \
10         collectd \
11         fm-api \
12         ntpq \
13         python-influxdb \
14         python-oslo.concurrency \
15         python-httplib2 \
16         tsconfig \
17         "
18
19
20 local_unit_dir = "${sysconfdir}/systemd/system"
21 local_plugin_dir = "${sysconfdir}/collectd.d"
22 local_python_extensions_dir = "/opt/collectd/extensions/python"
23 local_config_extensions_dir = "/opt/collectd/extensions/config"
24
25
26 do_install_append() {
27
28         install -m 755 -d ${D}/${sysconfdir}
29         install -m 755 -d ${D}/${local_unit_dir}
30         install -m 755 -d ${D}/${local_plugin_dir}
31         install -m 755 -d ${D}/${local_config_extensions_dir}
32         install -m 755 -d ${D}/${local_python_extensions_dir}
33
34         # support files ; service and pmon conf
35         install -m 644 collectd.service  ${D}/${local_unit_dir}
36         install -m 600 collectd.conf.pmon  ${D}/${local_config_extensions_dir}
37
38         # collectd python plugin files - notifiers
39         install -m 700  fm_notifier.py ${D}/${local_python_extensions_dir}
40         install -m 700 plugin_common.py ${D}/${local_python_extensions_dir}
41
42         # collectd python plugin files - resource plugins
43         install -m 700 cpu.py  ${D}/${local_python_extensions_dir}
44         install -m 700 memory.py  ${D}/${local_python_extensions_dir}
45         install -m 700 example.py  ${D}/${local_python_extensions_dir}
46         install -m 700 ntpq.py  ${D}/${local_python_extensions_dir}
47         install -m 700 interface.py ${D}/${local_python_extensions_dir}
48         install -m 700 remotels.py  ${D}/${local_python_extensions_dir}
49         install -m 700 ptp.py  ${D}/${local_python_extensions_dir}
50         install -m 700 ovs_interface.py  ${D}/${local_python_extensions_dir}
51
52
53         # collectd plugin conf files into /etc/collectd.d
54         install -m 600 python_plugins.conf  ${D}/${local_plugin_dir}
55         install -m 600 cpu.conf  ${D}/${local_plugin_dir}
56         install -m 600 memory.conf  ${D}/${local_plugin_dir}
57         install -m 600 df.conf  ${D}/${local_plugin_dir}
58         install -m 600 example.conf  ${D}/${local_plugin_dir}
59         install -m 600 ntpq.conf  ${D}/${local_plugin_dir}
60         install -m 600 interface.conf  ${D}/${local_plugin_dir}
61         install -m 600 remotels.conf  ${D}/${local_plugin_dir}
62         install -m 600 ptp.conf  ${D}/${local_plugin_dir}
63         install -m 600 ovs_interface.conf  ${D}/${local_plugin_dir}
64
65 }
66
67 FILES_${PN}_append = " \
68         ${local_python_extensions_dir} \
69         ${local_config_extensions_dir} \
70         "