Eu iniciei uma instância do servidor em um contêiner do Docker, conectado com o Frontend do Facette, parece legal, o Facette lê os dados do rrd.
O problema começa quando quero receber dados de outro computador.
Eu tentei a porta exposta localmente do docker para a máquina local.
version: '2.1'
services:
collectd:
build: ./containers/collectd
ports:
- 28596:28596
- 8125:8125
volumes:
- ./var/rrd/:/var/lib/collectd/rrd
frontend:
build: ./containers/facette
ports:
- 12003:12003
volumes:
- ./var/rrd:/var/lib/collectd/rrd
- ./var/facette:/var/lib/facette/
Dockerfile do servidor:
FROM alpine:latest
ENV ARCH=x86
RUN apk --update add perl-dev python3-dev wget alpine-sdk linux-headers rsyslog rrdtool rrdtool-dev rrdtool-utils
# Get and untar sources files
RUN wget https://collectd.org/files/collectd-5.7.1.tar.bz2
RUN tar jxvf collectd-5.7.1.tar.bz2 && rm collectd-5.7.1.tar.bz2
# Compile and purge source files
RUN cd collectd-5.7.1 && ./configure --with-rrdtool && make all install
RUN cd .. && rm -rf collectd-5.7.1
# Optionnal post installation tasks
RUN ln -s /opt/collectd/sbin/collectd /usr/sbin/collectd
RUN ln -s /opt/collectd/sbin/collectdmon /usr/sbin/collectdmon
RUN rm -rf /var/cache/apk/*
RUN apk del alpine-sdk linux-headers perl-dev python3-dev
#RUN apk add --update collectd rrdtool rsyslog collectd-dns collectd-curl collectd-sensors collectd-ping collectd-utils collectd-nginx collectd-iptables collectd-bind collectd-write_http collectd-rrdtool collectd-network collectd-disk collectd-libs
ADD ./etc/* /etc/
ADD ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
O servidor collectd.conf
Hostname "bakunin-tower"
FQDNLookup true
LoadPlugin syslog
<plugin syslog>
LogLevel info
File "/var/log/collectd.log"
Timestamp true
</plugin>
LoadPlugin cpu
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin network
LoadPlugin nfs
LoadPlugin rrdtool
LoadPlugin swap
<plugin network>
Listen "0.0.0.0" "28596"
</plugin>
<plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
</plugin>
#Include "/etc/collectd.d/*.conf"
O collectd.conf do cliente
Hostname "kropotkin"
FQDNLookup true
LoadPlugin syslog
LoadPlugin "logfile"
<Plugin "logfile">
LogLevel "info"
File "/var/log/collectd.log"
Timestamp true
</Plugin>
<plugin syslog>
LogLevel info
</plugin>
LoadPlugin cpu
LoadPlugin disk
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin network
<Plugin network>
Server "127.0.0.1" "28596"
</Plugin>
No servidor, vejo apenas "bakunin-tower" no diretório rrd, mas espero que o kropotkin também esteja presente. O que há de errado? Minha cabeça está explodindo.
Obrigado.