This commit is contained in:
parent
305e0f03f9
commit
38d9d66501
57
.drone.yml
57
.drone.yml
@ -51,3 +51,60 @@ trigger:
|
||||
event:
|
||||
- tag
|
||||
- push
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: zabbix-agent
|
||||
|
||||
steps:
|
||||
|
||||
- name: build_and_publish_zabbix-agent
|
||||
image: plugins/docker:linux-amd64
|
||||
settings:
|
||||
dockerfile: zabbix-agent/Dockerfile
|
||||
context: zabbix-agent
|
||||
password:
|
||||
from_secret: docker_password
|
||||
registry: docker.asperti.com
|
||||
repo: docker.asperti.com/paspo/hassio-zabbix-agent
|
||||
tags:
|
||||
- latest
|
||||
- 0.1.4
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
- push
|
||||
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: zabbix-agent2
|
||||
|
||||
steps:
|
||||
|
||||
- name: build_and_publish_zabbix-agent2
|
||||
image: plugins/docker:linux-amd64
|
||||
settings:
|
||||
dockerfile: zabbix-agent2/Dockerfile
|
||||
context: zabbix-agent2
|
||||
password:
|
||||
from_secret: docker_password
|
||||
registry: docker.asperti.com
|
||||
repo: docker.asperti.com/paspo/hassio-zabbix-agent2
|
||||
tags:
|
||||
- latest
|
||||
- 0.1.1
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
- push
|
@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=hassioaddons/base:8.0.1
|
||||
ARG BUILD_FROM=hassioaddons/base:8.0.6
|
||||
FROM $BUILD_FROM
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "Zabbix Agent",
|
||||
"url": "https://git.asperti.com/paspo/hassio-addons",
|
||||
"version": "0.1.3",
|
||||
"image": "docker.asperti.com/paspo/hassio-zabbix-agent",
|
||||
"version": "0.1.4",
|
||||
"slug": "zabbix-agent",
|
||||
"description": "Zabbix Agent for hass.io",
|
||||
"startup": "services",
|
||||
|
12
zabbix-agent2/Dockerfile
Normal file
12
zabbix-agent2/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
ARG BUILD_FROM=hassioaddons/base:8.0.6
|
||||
FROM $BUILD_FROM
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Copy scripts for add-on
|
||||
COPY run.sh /
|
||||
|
||||
RUN apk add -U jq zabbix-agent2=5.0.14-r1 sudo && \
|
||||
chmod a+x /run.sh
|
||||
|
||||
CMD [ "/run.sh" ]
|
32
zabbix-agent2/config.json
Normal file
32
zabbix-agent2/config.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "Zabbix Agent 2",
|
||||
"url": "https://git.asperti.com/paspo/hassio-addons",
|
||||
"image": "docker.asperti.com/paspo/hassio-zabbix-agent2",
|
||||
"version": "0.1.1",
|
||||
"slug": "zabbix-agent2",
|
||||
"description": "Zabbix Agent 2 for hass.io",
|
||||
"startup": "services",
|
||||
"boot": "auto",
|
||||
"audio": false,
|
||||
"gpio": false,
|
||||
"arch": [
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"armhf",
|
||||
"i386"
|
||||
],
|
||||
"ports": {
|
||||
"10050/tcp": 10050
|
||||
},
|
||||
"map": [
|
||||
"share"
|
||||
],
|
||||
"options": {
|
||||
"server": "zabbix-server",
|
||||
"hostname": "hassio"
|
||||
},
|
||||
"schema": {
|
||||
"server": "str",
|
||||
"hostname": "str"
|
||||
}
|
||||
}
|
BIN
zabbix-agent2/icon.png
Normal file
BIN
zabbix-agent2/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 632 B |
BIN
zabbix-agent2/logo.png
Normal file
BIN
zabbix-agent2/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
22
zabbix-agent2/run.sh
Normal file
22
zabbix-agent2/run.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CONFIG_PATH=/data/options.json
|
||||
CUSTOM_CFG_PATH=/share/zabbix-agent
|
||||
|
||||
SERVER=$(jq --raw-output ".server" $CONFIG_PATH)
|
||||
HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH)
|
||||
|
||||
if [ ! -d "$CUSTOM_CFG_PATH" ] ; then
|
||||
mkdir -p "$CUSTOM_CFG_PATH"
|
||||
fi
|
||||
|
||||
echo "
|
||||
Server=$SERVER
|
||||
ServerActive=$SERVER
|
||||
Hostname=$HOSTNAME
|
||||
LogType=console
|
||||
Include=${CUSTOM_CFG_PATH}/*.conf
|
||||
" > /etc/zabbix/zabbix_agentd.conf
|
||||
|
||||
sudo -u zabbix zabbix_agentd -f
|
Loading…
Reference in New Issue
Block a user