Observium Unix Agent
-
Zunächst brauchen wir xinetd:
apt-get install xinetd oder yum install xinetd
Config anlegen
vi /etc/xinetd.d/observium_agent_xinetd
service observium_agent { type = UNLISTED port = 36602 socket_type = stream protocol = tcp wait = no user = root server = /usr/bin/observium_agent # configure the IPv[4|6] address(es) of your Observium server here: only_from = 127.0.0.1 ::1 # Don't be too verbose. Don't log every check. This might be # commented out for debugging. If this option is commented out # the default options will be used for this service. log_on_success = disable = no }
Jetzt müssen wir noch eine Reihe Ordner anlegen und Scripte kopieren aus dem Observium Verzeichnes.
service xinetd restart scp /opt/observium/scripts/observium_agent /usr/bin/observium_agent mkdir -p /usr/lib/observium_agent mkdir /usr/lib/observium_agent/scripts-available /usr/lib/observium_agent/scripts-enabled scp -r /opt/observium/scripts/agent-local/* /usr/lib/observium_agent/scripts-available sudo ln -s /usr/lib/observium_agent/scripts-available/os /usr/lib/observium_agent/scripts-enabled sudo ln -s /usr/lib/observium_agent/scripts-available/dmi /usr/lib/observium_agent/scripts-enabled sudo ln -s /usr/lib/observium_agent/scripts-available/apache /usr/lib/observium_agent/scripts-enabled mkdir /usr/lib/observium_agent/local vi /usr/lib/observium_agent/local/docker_info #!/bin/bash echo "<<<app-docker>>>" info=$(docker info 2> /dev/null | grep "Containers:\|Running:\|Paused:\|Stopped:\|Images:") echo $info | awk '{print $2}' echo $info | awk '{print $4}' echo $info | awk '{print $6}' echo $info | awk '{print $8}' echo $info | awk '{print $10}' chmod 777 /usr/lib/observium_agent/local/docker_info service xinetd restart
-
Hier das Installscript das den Unix agent installiert und Basics konfiguriert
sudo apt-get install xinetd wget tar telnet yum install xinetd wget tar telnet mkdir /opt/obs-agent/ cd /opt/obs-agent/ wget https://www.observium.org/observium-community-latest.tar.gz --no-check-certificate tar zxvf observium-community-latest.tar.gz observium/scripts/ scp /opt/obs-agent/observium/scripts/observium_agent_xinetd /etc/xinetd.d/observium_agent_xinetd scp /opt/obs-agent/observium/scripts/observium_agent /usr/bin/observium_agent chmod 700 /etc/xinetd.d/observium_agent_xinetd scp /opt/obs-agent/observium/scripts/observium_agent /usr/bin/observium_agent echo Type IP of your Monitoring Server: read serverip sed -i "s/127.0.0.1/$serverip/g" /etc/xinetd.d/observium_agent_xinetd service xinetd restart mkdir -p /usr/lib/observium_agent /usr/lib/observium_agent/local mkdir /usr/lib/observium_agent/scripts-available /usr/lib/observium_agent/scripts-enabled scp -r /opt/obs-agent/observium/scripts/agent-local/* /usr/lib/observium_agent/scripts-available cp /usr/lib/observium_agent/scripts-available/dmi /usr/lib/observium_agent/local cp /usr/lib/observium_agent/scripts-available/rpm /usr/lib/observium_agent/local service xinetd restart rm -rf /opt/obs-agent