From b10909dd099f793cc87e6857b51810dec39e494d Mon Sep 17 00:00:00 2001 From: nemo Date: Sat, 30 Mar 2019 16:37:21 +0100 Subject: [PATCH] Minor updates --- README.md | 3 ++- recipe_gentoo.sh | 7 +++---- vars.sh | 32 ++++++++++++++++++++++++++------ 3 files changed, 31 insertions(+), 11 deletions(-) mode change 100644 => 100755 vars.sh diff --git a/README.md b/README.md index 8ef767e..662c355 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,12 @@ TO DO : - Reorganise script to limit text repetitions (make functions for example) - Check postfix config - Check if sending a mail works (find a way to check) -- Check snmpd config - Check if IPs/informations are recorded in IPAM - Check detailled DNS records (PTR, A, AAAA) - Check if files in etc need to be updated (etc-update) - Check if borgbackup is configured (+ connexion to backup server) - Check if auto-update script is configured +- Portage configuration (for VM and Physical) Checked point : - User is root to run the script @@ -30,4 +30,5 @@ Checked point : - SSH configuration (PasswordAuthentication no, PermitRootLogin no, and ListenAddress only on Admin LAN) - NRPE basic configuration (allowed_hosts) - MUNIN basic configuration (allow) +- SNMP basic config (gentAddress, rocommunity and trapsink/trap2sink) - Mail alias configuration (root mail alias configured) diff --git a/recipe_gentoo.sh b/recipe_gentoo.sh index 8b6c454..a4cc9ec 100755 --- a/recipe_gentoo.sh +++ b/recipe_gentoo.sh @@ -37,13 +37,9 @@ fi # Print packages not installed or with error at end script PACKAGES_TO_CHECK="" - RESOLV_FAILED="" - RESOLVER_NOT_IN_ETC_RESOLVCONF="" - IP_NOT_RECORDED_IN_DNS="" - PING_FAILED="" # Get ALL locales IPs except loopback @@ -62,6 +58,7 @@ SSH_CONFIG_CHECK_FAILED="" NRPE_CONFIG_CHECK_FAILED="" MUNIN_CONFIG_CHECK_FAILED="" MAIL_ALIAS_CONFIG_CHECK_FAILED="" +SNMP_CONFIG_CHECK_FAILED="" usage() { printf "Usage: ./recipe_gentoo.sh [--physical]\n" @@ -115,6 +112,8 @@ echo -e "-------------------------------------------------\n" . recipes/recipe_check_munin_config.sh +. recipes/recipe_check_snmp_config.sh + . recipes/recipe_check_mail_alias_config.sh . recipes/recipe_final_summary.sh diff --git a/vars.sh b/vars.sh old mode 100644 new mode 100755 index fd22bbc..73d38a1 --- a/vars.sh +++ b/vars.sh @@ -1,13 +1,31 @@ -# Packages to check +GREP="/bin/grep" +ECHO="/bin/echo" +EMERGE="/usr/bin/emerge" +NSLOOKUP="/usr/bin/nslookup" +IP="/bin/ip" +HOSTNAME="/bin/hostname" +AWK="/bin/awk" +SED="/bin/sed" +CUT="/bin/cut" +TR="/bin/tr" +PING="/bin/ping" + +# Packages to check (it's a list to simplify comment) PACKAGES=( # 'virtual/ssh' # 'app-admin/rsyslog' # 'net-misc/ntp' -# 'net-analyzer/icinga2' # 'app-backup/borgbackup' # 'virtual/cron' # 'sys-process/cronie' # 'net-analyzer/munin' +# 'app-portage/eix', +# 'app-portage/gentoolkit', +# 'app-portage/genlop', +# 'app-misc/tmux', +# 'net-analyzer/tcpdump', +# 'app-editors/vim', +# 'sys-process/htop-2.2.0', # 'app-admin/sysklogd' # 'dev-vcs/git' # 'net-analyzer/nrpe' @@ -52,12 +70,14 @@ SERVICES_TO_CHECK_PHYSICAL=( ) IPV4_ADMIN_NETWORK="172.16.0." -IPV6_ADMIN_NETWORK="fd06:1e02:40:" +IPV6_ADMIN_NETWORK="fd01:1e02:40:" + +NAME_MASTER_MONITORING="" IPV4_MASTER_MUNIN='^172\\\.16\\\.0\\\.13\$' -IPV6_MASTER_MUNIN='^fd06:1e02:40::3\$' +IPV6_MASTER_MUNIN='^fd01:1e02:40::3\$' IPV4_MASTER_MUNIN_PRINT='^172\.16\.0\.13$' -IPV6_MASTER_MUNIN_PRINT='^fd06:1e02:40::3$' +IPV6_MASTER_MUNIN_PRINT='^fd01:1e02:40::3$' -MAIL_ALIAS_ROOT="admin6@grifon.fr" +MAIL_ALIAS_ROOT="admin6@email.emailr"