diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2023-12-24 14:46:04 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2023-12-24 14:46:04 +0000 |
commit | a1e03826c0a904b93d60bd8d44f14cc6ba087314 (patch) | |
tree | 4a01fb95a428b0d88cb79a4c5ad82b1334b3f714 /switch-snmp/Dockerfile | |
parent | f9da9ab448f59580180a46d2a9efc099ff09beb3 (diff) | |
download | power.eda.gay-a1e03826c0a904b93d60bd8d44f14cc6ba087314.tar.gz power.eda.gay-a1e03826c0a904b93d60bd8d44f14cc6ba087314.zip |
Added SNMP client for monitoring omada switches
Diffstat (limited to 'switch-snmp/Dockerfile')
-rw-r--r-- | switch-snmp/Dockerfile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/switch-snmp/Dockerfile b/switch-snmp/Dockerfile new file mode 100644 index 0000000..66857fa --- /dev/null +++ b/switch-snmp/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:20.04 +ENV TZ=Europe/London +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update -y +RUN apt-get install -y python3-pip iputils-ping cron wget snmp snmp-mibs-downloader unzip +COPY . /app +WORKDIR /app +RUN wget "https://static.tp-link.com/upload/software/2022/202209/20220915/privateMibs(20220831).zip" +RUN mkdir -p /usr/share/snmp/mibs +RUN unzip -j "privateMibs(20220831).zip" -d /usr/share/snmp/mibs +RUN pip3 install -r requirements.txt +RUN rm "privateMibs(20220831).zip" + +RUN echo "*/1 * * * * root python3 /app/snmp-omada.py > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/crontab +ENTRYPOINT ["bash"] +CMD ["entrypoint.sh"]
\ No newline at end of file |