Browse Source

Minor updates

master
nemo 4 years ago
parent
commit
b10909dd09
  1. 3
      README.md
  2. 7
      recipe_gentoo.sh
  3. 32
      vars.sh

3
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)

7
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

32
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"

Loading…
Cancel
Save