Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c925be77c5
|
|||
|
e6f5f4092c
|
|||
|
47d32d669b
|
|||
|
f05bb63007
|
|||
|
7759ca9ec7
|
|||
|
bcba8d258f
|
|||
|
1045ebebd0
|
|||
|
e0737632f8
|
|||
|
c37da6b538
|
|||
|
83e7d0bc1f
|
|||
|
eee92ba7f2
|
|||
|
3b8cab00ad
|
|||
|
c975d7d2b6
|
|||
|
46c224cd9f
|
|||
|
c2eef2b279
|
31
.drone.yml
31
.drone.yml
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: build-amd64
|
name: build-amd64
|
||||||
@@ -132,21 +133,21 @@ type: docker
|
|||||||
name: manifest
|
name: manifest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: manifest
|
- name: manifest
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
settings:
|
settings:
|
||||||
force_tag: true
|
force_tag: true
|
||||||
ignore_missing: true
|
ignore_missing: true
|
||||||
spec: manifest.tmpl
|
spec: manifest.tmpl
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- ${DRONE_TAG}
|
- ${DRONE_TAG}
|
||||||
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
|
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
|
||||||
- ${DRONE_SEMVER_MAJOR}
|
- ${DRONE_SEMVER_MAJOR}
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:12.0.0
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:16.2.0
|
||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
RUN apk add -U zabbix-agent2=6.0.5-r0 sudo
|
RUN \
|
||||||
|
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community zabbix-agent2=7.0.2-r0 zabbix-agent2-plugin-postgresql zabbix-agent2-plugin-alpine && \
|
||||||
|
apk add --no-cache sudo && \
|
||||||
|
addgroup -g 102 -S docker && \
|
||||||
|
addgroup zabbix docker
|
||||||
|
|
||||||
|
LABEL \
|
||||||
|
io.hass.version="0.3.0" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.arch="amd64"
|
||||||
@@ -1,8 +1,17 @@
|
|||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/armhf:12.0.0
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base/armhf:16.2.0
|
||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
RUN apk add -U zabbix-agent2=6.0.5-r0 sudo
|
RUN \
|
||||||
|
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community zabbix-agent2=7.0.2-r0 zabbix-agent2-plugin-postgresql zabbix-agent2-plugin-alpine && \
|
||||||
|
apk add --no-cache sudo && \
|
||||||
|
addgroup -g 102 -S docker && \
|
||||||
|
addgroup zabbix docker
|
||||||
|
|
||||||
|
LABEL \
|
||||||
|
io.hass.version="0.3.0" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.arch="armhf"
|
||||||
@@ -1,8 +1,17 @@
|
|||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/aarch64:12.0.0
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base/aarch64:16.2.0
|
||||||
FROM $BUILD_FROM
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
RUN apk add -U zabbix-agent2=6.0.5-r0 sudo
|
RUN \
|
||||||
|
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community zabbix-agent2=7.0.2-r0 zabbix-agent2-plugin-postgresql zabbix-agent2-plugin-alpine && \
|
||||||
|
apk add --no-cache sudo && \
|
||||||
|
addgroup -g 102 -S docker && \
|
||||||
|
addgroup zabbix docker
|
||||||
|
|
||||||
|
LABEL \
|
||||||
|
io.hass.version="0.3.0" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.arch="aarch64"
|
||||||
@@ -2,4 +2,8 @@
|
|||||||
|
|
||||||
This addon enables a zabbix agent2 for the hassio instance.
|
This addon enables a zabbix agent2 for the hassio instance.
|
||||||
|
|
||||||
You obviously neead a zabbix server for it to be meaningful.
|
You obviously need a zabbix server for it to be meaningful.
|
||||||
|
|
||||||
|
## Docker access
|
||||||
|
|
||||||
|
If you need the agent to access the underlying docker, you need to disable the "Protection mode" switch and restart the container.
|
||||||
|
|||||||
@@ -2,14 +2,16 @@
|
|||||||
"name": "Zabbix Agent 2",
|
"name": "Zabbix Agent 2",
|
||||||
"url": "https://git.asperti.com/paspo/hassio-addons",
|
"url": "https://git.asperti.com/paspo/hassio-addons",
|
||||||
"image": "docker.asperti.com/paspo/hassio-zabbix-agent2",
|
"image": "docker.asperti.com/paspo/hassio-zabbix-agent2",
|
||||||
"version": "0.2.1",
|
"version": "0.3.0",
|
||||||
"slug": "zabbix-agent2",
|
"slug": "zabbix-agent2",
|
||||||
"description": "Zabbix Agent 2 for hass.io",
|
"description": "Zabbix Agent 2 for hass.io (7.0 LTS)",
|
||||||
"startup": "services",
|
"startup": "services",
|
||||||
"boot": "auto",
|
"boot": "auto",
|
||||||
"hassio_api": true,
|
"hassio_api": true,
|
||||||
|
"docker_api": true,
|
||||||
"audio": false,
|
"audio": false,
|
||||||
"gpio": false,
|
"gpio": false,
|
||||||
|
"init": false,
|
||||||
"arch": [
|
"arch": [
|
||||||
"aarch64",
|
"aarch64",
|
||||||
"amd64"
|
"amd64"
|
||||||
@@ -17,6 +19,9 @@
|
|||||||
"ports": {
|
"ports": {
|
||||||
"10050/tcp": 10050
|
"10050/tcp": 10050
|
||||||
},
|
},
|
||||||
|
"ports_description": {
|
||||||
|
"10050/tcp": "Zabbix Agent port (used by Zabbix Server and/or proxies)"
|
||||||
|
},
|
||||||
"map": [
|
"map": [
|
||||||
"share"
|
"share"
|
||||||
],
|
],
|
||||||
|
|||||||
9
rootfs/etc/cont-init.d/require_unprotected.sh
Executable file
9
rootfs/etc/cont-init.d/require_unprotected.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Instead of enforcing this requirement, we let the user choose
|
||||||
|
# if he/she wants to access docker: if so, disabling the "protection mode" is mandatory
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
#bashio::require.unprotected
|
||||||
@@ -5,10 +5,13 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
CONFIG_PATH=/data/options.json
|
||||||
CUSTOM_CFG_PATH=/share/zabbix-agent2
|
CUSTOM_CFG_PATH=/share/zabbix-agent2
|
||||||
|
|
||||||
SERVER="$(bashio::config 'server')"
|
SERVER_OLD=$(jq --raw-output ".server" $CONFIG_PATH)
|
||||||
HOSTNAME="$(bashio::config 'hostname')"
|
SERVER="$(bashio::config 'server' $SERVER_OLD)"
|
||||||
|
HOSTNAME_OLD=$(jq --raw-output ".hostname" $CONFIG_PATH)
|
||||||
|
HOSTNAME="$(bashio::config 'hostname' $HOSTNAME_OLD)"
|
||||||
|
|
||||||
if [ ! -d "$CUSTOM_CFG_PATH" ] ; then
|
if [ ! -d "$CUSTOM_CFG_PATH" ] ; then
|
||||||
bashio::log.info "Creating a folder for custom configuration"
|
bashio::log.info "Creating a folder for custom configuration"
|
||||||
|
|||||||
Reference in New Issue
Block a user