Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
freifunk:server:gw2.batman [2020-04-15 19:52] – [Dienste Konfigurartion] kwasir | freifunk:server:gw2.batman [2020-04-15 19:56] (aktuell) – [YANIC] kwasir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Administration GW2-Batman ====== | ||
+ | Alles die Administration von [[freifunk: | ||
+ | |||
+ | Es ist das Paket [[http:// | ||
+ | |||
+ | sudo etckeeper commit | ||
+ | |||
+ | und kurz eine Commit Message eingeben. Das Repository ist ausschließlich lokal vorhanden und wird nicht nach draußen gepusht! | ||
+ | |||
+ | ===== Administratoren ===== | ||
+ | (aka Nutzer mit sudo Rechten) | ||
+ | * [[user: | ||
+ | * nold | ||
+ | * kwasir | ||
+ | * | ||
+ | |||
+ | ===== Installierte Dienste ===== | ||
+ | * YANIC | ||
+ | * NODE Exporter | ||
+ | |||
+ | ===== Dienste Konfigurartion ===== | ||
+ | ==== YANIC ==== | ||
+ | === Install === | ||
+ | |||
+ | Install GO | ||
+ | cd /usr/local/ | ||
+ | wget https:// | ||
+ | tar xvf go-release-linux-amd64.tar.gz | ||
+ | rm go-release-linux-amd64.tar.gz | ||
+ | Export Path | ||
+ | | ||
+ | | ||
+ | |||
+ | Download and Build Yanic | ||
+ | go get -v -u github.com/ | ||
+ | |||
+ | Copy Sample Config | ||
+ | cp / | ||
+ | create needed folders & files | ||
+ | mkdir -p / | ||
+ | mkdir -p / | ||
+ | touch / | ||
+ | | ||
+ | Create User and Group | ||
+ | sudo groupadd --system yanic | ||
+ | sudo useradd -s / | ||
+ | Own this | ||
+ | sudo chown yanic / | ||
+ | |||
+ | create Systemd service | ||
+ | cp / | ||
+ | | ||
+ | !Before Start edit / | ||
+ | Start yanic | ||
+ | | ||
+ | | ||
+ | | ||
+ | === Config File === | ||
+ | RespondD Interface | ||
+ | |||
+ | | ||
+ | # name of interface on which this collector is running | ||
+ | | ||
+ | # ip address which is used for sending | ||
+ | # (optional - without definition used a address of ifname - preferred link local) | ||
+ | # | ||
+ | # disable sending multicast respondd request | ||
+ | # (for receiving only respondd packages e.g. database respondd) | ||
+ | # | ||
+ | # multicast address to destination of respondd | ||
+ | # (optional - without definition used default ff05:: | ||
+ | | ||
+ | # define a port to listen | ||
+ | # if not set or set to 0 the kernel will use a random free port at its own | ||
+ | port = 45123 | ||
+ | Forward Respondd to " | ||
+ | # respondd (yanic) | ||
+ | # forward collected respondd package to a address | ||
+ | # (e.g. to another respondd collector like a central yanic instance or hopglass) | ||
+ | | ||
+ | | ||
+ | # type of network to create a connection | ||
+ | | ||
+ | # destination address to connect/ | ||
+ | | ||
+ | |||
+ | ==== Node Exporter ==== | ||
+ | Download and Extract | ||
+ | curl -s https:// | ||
+ | | grep browser_download_url \ | ||
+ | | grep linux-amd64 \ | ||
+ | | cut -d '"' | ||
+ | | wget -qi - | ||
+ | tar xzf node_exporter-0.18.1.linux-amd64.tar.gz | ||
+ | cd node_exporter-0.18.1.linux-amd64/ | ||
+ | sudo cp node_exporter / | ||
+ | Create Startup Script | ||
+ | sudo mkdir / | ||
+ | sudo vi / | ||
+ | |||
+ | Content of Startup Script | ||
+ | |||
+ | #!/bin/sh | ||
+ | / | ||
+ | --collector.cpu \ | ||
+ | --collector.diskstats \ | ||
+ | --collector.filesystem \ | ||
+ | --collector.loadavg \ | ||
+ | --collector.meminfo \ | ||
+ | --collector.filefd \ | ||
+ | --collector.netdev \ | ||
+ | --collector.stat \ | ||
+ | --collector.netstat \ | ||
+ | --collector.systemd \ | ||
+ | --collector.uname \ | ||
+ | --collector.vmstat \ | ||
+ | --collector.time \ | ||
+ | --collector.mdadm \ | ||
+ | --collector.zfs \ | ||
+ | --collector.tcpstat \ | ||
+ | --collector.bonding \ | ||
+ | --collector.hwmon \ | ||
+ | --collector.arp \ | ||
+ | --web.listen-address=: | ||
+ | --web.telemetry-path="/ | ||
+ | Startup Script | ||
+ | sudo vi / | ||
+ | |||
+ | #!/bin/sh | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: node_exporter | ||
+ | # Required-Start: | ||
+ | # Required-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Description: | ||
+ | ### END INIT INFO | ||
+ | SCRIPT=/ | ||
+ | RUNAS=root | ||
+ | PIDFILE=/ | ||
+ | LOGFILE=/ | ||
+ | start() { | ||
+ | if [ -f " | ||
+ | echo ' | ||
+ | return 1 | ||
+ | fi | ||
+ | echo ' | ||
+ | local CMD=" | ||
+ | su -c " | ||
+ | echo ' | ||
+ | } | ||
+ | stop() { | ||
+ | if [ ! -f " | ||
+ | echo ' | ||
+ | return 1 | ||
+ | fi | ||
+ | echo ' | ||
+ | kill -15 $(cat " | ||
+ | echo ' | ||
+ | } | ||
+ | uninstall() { | ||
+ | echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " | ||
+ | local SURE | ||
+ | read SURE | ||
+ | if [ " | ||
+ | stop | ||
+ | rm -f " | ||
+ | echo " | ||
+ | update-rc.d -f remove | ||
+ | rm -fv " | ||
+ | fi | ||
+ | } | ||
+ | case " | ||
+ | start) | ||
+ | start | ||
+ | ;; | ||
+ | stop) | ||
+ | stop | ||
+ | ;; | ||
+ | uninstall) | ||
+ | uninstall | ||
+ | ;; | ||
+ | retart) | ||
+ | stop | ||
+ | start | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | esac | ||
+ | | ||
+ | sudo chmod +x / | ||
+ | sudo chmod +x / | ||
+ | ===== Changelog ===== | ||