diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2020-01-15 12:22:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 12:22:34 +0100 |
commit | 3df17b1bd8c6c9b6ed5a82e6f30bb2f485ad9015 (patch) | |
tree | b851e32aa5113c299ed20b6c19504fe135a2a1fc | |
parent | e898fd0fb9ffe556c421ace92dd6fe654064f14e (diff) | |
parent | 4327bd4133f0250a3babebd2e051d792550ac22a (diff) | |
download | meta-updater-3df17b1bd8c6c9b6ed5a82e6f30bb2f485ad9015.tar.gz |
Merge pull request #588 from advancedtelematic/feat/OTA-2150/system_monitoring
Add Zabbix configuration recipe
-rw-r--r-- | recipes-connectivity/zabbix/zabbix_%.bbappend | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-connectivity/zabbix/zabbix_%.bbappend b/recipes-connectivity/zabbix/zabbix_%.bbappend new file mode 100644 index 0000000..c6a69b5 --- /dev/null +++ b/recipes-connectivity/zabbix/zabbix_%.bbappend | |||
@@ -0,0 +1,20 @@ | |||
1 | |||
2 | do_install_append() { | ||
3 | |||
4 | # Set the zabbix Server | ||
5 | if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVER} ]; then | ||
6 | sed -i "s/Server=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/Server=${SOTA_COMM_CONF_ZABBIX_SERVER}/g" ${D}${sysconfdir}/zabbix_agentd.conf | ||
7 | if ! grep -Fxq "Server=${SOTA_COMM_CONF_ZABBIX_SERVER}" ${D}${sysconfdir}/zabbix_agentd.conf; then | ||
8 | echo -e '\nServer='${SOTA_COMM_CONF_ZABBIX_SERVER} >> ${D}${sysconfdir}/zabbix_agentd.conf | ||
9 | fi | ||
10 | fi | ||
11 | |||
12 | # Set ServerActive | ||
13 | if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} ]; then | ||
14 | sed -i "s/ServerActive=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}/g" ${D}${sysconfdir}/zabbix_agentd.conf | ||
15 | if ! grep -Fxq "ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}" ${D}${sysconfdir}/zabbix_agentd.conf; then | ||
16 | echo -e '\nServerActive='${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} >> ${D}${sysconfdir}/zabbix_agentd.conf | ||
17 | fi | ||
18 | |||
19 | fi | ||
20 | } | ||