Jan Wagner ревизій цього gist 3 years ago. До ревизії
1 file changed, 1 insertion
deploy_icinga2_systemd_check.sh
| @@ -1,3 +1,4 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | + | # wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_systemd_check.sh -P /tmp/ && bash /tmp/deploy_icinga2_systemd_check.sh | |
| 2 | 3 | apt-get install -y --no-install-recommends python3-nagiosplugin dbus && | |
| 3 | 4 | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports monitoring-plugins-systemd || /usr/bin/wget -P /tmp http://ftp.de.debian.org/debian/pool/main/m/monitoring-plugins-systemd/monitoring-plugins-systemd_2.3.1-2_all.deb && dpkg -i /tmp/monitoring-plugins-systemd_2.3.1-2_all.deb | |
Jan Wagner ревизій цього gist 3 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_systemd_check.sh
| @@ -1,3 +1,3 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | apt-get install -y --no-install-recommends python3-nagiosplugin dbus && | |
| 3 | - | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports tmp/monitoring-plugins-systemd || /usr/bin/wget -P /tmp http://ftp.de.debian.org/debian/pool/main/m/monitoring-plugins-systemd/monitoring-plugins-systemd_2.3.1-2_all.deb && dpkg -i /tmp/monitoring-plugins-systemd_2.3.1-2_all.deb | |
| 3 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports monitoring-plugins-systemd || /usr/bin/wget -P /tmp http://ftp.de.debian.org/debian/pool/main/m/monitoring-plugins-systemd/monitoring-plugins-systemd_2.3.1-2_all.deb && dpkg -i /tmp/monitoring-plugins-systemd_2.3.1-2_all.deb | |
Jan Wagner ревизій цього gist 3 years ago. До ревизії
1 file changed, 3 insertions
deploy_icinga2_systemd_check.sh(файл створено)
| @@ -0,0 +1,3 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | apt-get install -y --no-install-recommends python3-nagiosplugin dbus && | |
| 3 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports tmp/monitoring-plugins-systemd || /usr/bin/wget -P /tmp http://ftp.de.debian.org/debian/pool/main/m/monitoring-plugins-systemd/monitoring-plugins-systemd_2.3.1-2_all.deb && dpkg -i /tmp/monitoring-plugins-systemd_2.3.1-2_all.deb | |
Jan Wagner ревизій цього gist 4 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_agent_hw.sh
| @@ -5,7 +5,7 @@ if [ "$(systemd-detect-virt)" == "none" ]; then | |||
| 5 | 5 | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports freeipmi-tools libipc-run-perl pciutils && \ | |
| 6 | 6 | echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi" > /etc/sudoers.d/check_ipmi_sensor && \ | |
| 7 | 7 | echo "ipmi_devintf" >> /etc/modules && echo "ipmi_si" >> /etc/modules | |
| 8 | - | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib && \ | |
| 8 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib sudo && \ | |
| 9 | 9 | if [ -f /proc/mdstat ]; then | |
| 10 | 10 | cat > /etc/sudoers.d/check_raid <<EOF | |
| 11 | 11 | User_Alias CHECK_RAID=nagios | |
Jan Wagner ревизій цього gist 4 years ago. До ревизії
1 file changed, 3 insertions, 2 deletions
deploy_icinga2_agent_hw.sh
| @@ -1,10 +1,11 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | # wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_agent_hw.sh -O /tmp/b && bash /tmp/b | |
| 3 | 3 | if [ "$(systemd-detect-virt)" == "none" ]; then | |
| 4 | - | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib freeipmi-tools libipc-run-perl pciutils && \ | |
| 4 | + | modprobe ipmi_si && modprobe ipmi_devintf && \ | |
| 5 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports freeipmi-tools libipc-run-perl pciutils && \ | |
| 5 | 6 | echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi" > /etc/sudoers.d/check_ipmi_sensor && \ | |
| 6 | - | modprobe ipmi_si && modprobe ipmi_devintf && \ | |
| 7 | 7 | echo "ipmi_devintf" >> /etc/modules && echo "ipmi_si" >> /etc/modules | |
| 8 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib && \ | |
| 8 | 9 | if [ -f /proc/mdstat ]; then | |
| 9 | 10 | cat > /etc/sudoers.d/check_raid <<EOF | |
| 10 | 11 | User_Alias CHECK_RAID=nagios | |
Jan Wagner ревизій цього gist 4 years ago. До ревизії
1 file changed, 1 insertion
deploy_icinga2_agent_hw.sh
| @@ -1,4 +1,5 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | + | # wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_agent_hw.sh -O /tmp/b && bash /tmp/b | |
| 2 | 3 | if [ "$(systemd-detect-virt)" == "none" ]; then | |
| 3 | 4 | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib freeipmi-tools libipc-run-perl pciutils && \ | |
| 4 | 5 | echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi" > /etc/sudoers.d/check_ipmi_sensor && \ | |
Jan Wagner ревизій цього gist 4 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_agent_hw.sh
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | if [ "$(systemd-detect-virt)" == "none" ]; then | |
| 3 | - | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib freeipmi-tools libipc-run-perl && \ | |
| 3 | + | apt-get install -y --no-install-recommends -t $(lsb_release -sc)-backports nagios-plugins-contrib freeipmi-tools libipc-run-perl pciutils && \ | |
| 4 | 4 | echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi" > /etc/sudoers.d/check_ipmi_sensor && \ | |
| 5 | 5 | modprobe ipmi_si && modprobe ipmi_devintf && \ | |
| 6 | 6 | echo "ipmi_devintf" >> /etc/modules && echo "ipmi_si" >> /etc/modules | |
Jan Wagner ревизій цього gist 4 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_satellite.sh
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | - | # wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_satellite.sh -O /tmp/a && sh /tmp/a | |
| 2 | + | # wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_satellite.sh -O /tmp/a && bash /tmp/a | |
| 3 | 3 | DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ | |
| 4 | 4 | echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list && \ | |
| 5 | 5 | if [ "${DIST}" == "stretch" -a ! -f /etc/apt/sources.list.d/stretch-backports.list ]; then wget -P /etc/apt/sources.list.d/ http://ftp.cyconet.org/debian/sources.list.d/stretch-backports.list; fi && \ | |
Jan Wagner ревизій цього gist 5 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_satellite.sh
| @@ -6,7 +6,7 @@ DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \ | |||
| 6 | 6 | apt-get install -y --no-install-recommends gnupg apt-transport-https && \ | |
| 7 | 7 | wget -O - https://packages.icinga.com/icinga.key | apt-key add - && \ | |
| 8 | 8 | apt-get update && apt-get install -y --no-install-recommends icinga2-bin icinga2-common monitoring-plugins-basic nagios-plugins-contrib libmonitoring-plugin-perl && \ | |
| 9 | - | apt-get install -y --no-install-recommends monitoring-plugins-cyconet sysstat && \ | |
| 9 | + | apt-get install -y --no-install-recommends monitoring-plugins-cyconet sysstat binutils && \ | |
| 10 | 10 | sed -i 's#^include_recursive "conf.d"#//include_recursive "conf.d"#' /etc/icinga2/icinga2.conf && \ | |
| 11 | 11 | service icinga2 restart && icinga2 node wizard && \ | |
| 12 | 12 | sed -i 's#.*accept_config = false# accept_config = true#' /etc/icinga2/features-available/api.conf && \ | |
Jan Wagner ревизій цього gist 5 years ago. До ревизії
1 file changed, 1 insertion, 1 deletion
deploy_icinga2_agent_hw.sh
| @@ -24,7 +24,7 @@ EOF | |||
| 24 | 24 | wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add - && \ | |
| 25 | 25 | apt-get update && \ | |
| 26 | 26 | apt-get install -y --no-install-recommends megacli sudo && \ | |
| 27 | - | cat /etc/sudoers.d/check_raid <<EOF | |
| 27 | + | cat > /etc/sudoers.d/check_raid <<EOF | |
| 28 | 28 | User_Alias CHECK_RAID=nagios, icinga, sensu | |
| 29 | 29 | Defaults:CHECK_RAID !requiretty | |
| 30 | 30 | CHECK_RAID ALL=(root) NOPASSWD: /sbin/dmsetup status --noflush | |