icinga2-checks/install.sh

21 lines
823 B
Bash
Raw Normal View History

2023-04-21 23:54:18 -06:00
#!/bin/bash
2023-04-21 23:54:18 -06:00
# apt update && apt install -y git && cd /opt && git -C /opt/icinga2-checks pull || git clone https://git.dp15.us/dpanzer/icinga2-checks.git /opt/icinga2-checks && bash /opt/icinga2-checks/install.sh
2023-04-21 23:54:19 -06:00
# 3 4 * * * /bin/bash /opt/icinga2-checks/install.sh
2023-04-21 23:54:18 -06:00
2023-04-21 23:54:18 -06:00
apt update
2023-04-21 23:54:19 -06:00
apt install -y python3-venv git sysstat bc
2023-04-21 23:54:18 -06:00
2023-04-21 23:54:18 -06:00
pip install psutil
2023-04-21 23:54:18 -06:00
git -C /opt/icinga2-checks pull || git clone https://git.dp15.us/dpanzer/icinga2-checks.git /opt/icinga2-checks
2023-04-21 23:54:19 -06:00
rm /usr/lib64/nagios/plugins/check_iowait
2023-04-21 23:54:18 -06:00
ln -s /opt/icinga2-checks/check_iowait.sh /usr/lib64/nagios/plugins/check_iowait
2023-04-21 23:54:19 -06:00
rm /usr/lib64/nagios/plugins/check_bandwidth
2023-04-21 23:54:19 -06:00
ln -s /opt/icinga2-checks/check_bandwidth /usr/lib64/nagios/plugins/check_bandwidth
rm /usr/lib64/nagios/plugins/check_curl
ln -s /opt/icinga2-checks/check_curl /usr/lib64/nagios/plugins/check_curl