Compare commits
11 Commits
v0.4.c-tl
...
v0.6.1-tvi
Author | SHA1 | Date | |
---|---|---|---|
754aef225b | |||
2c8af1ba17 | |||
a4dc321d58 | |||
64f43dfb53 | |||
e0d25e598a | |||
693d088dab | |||
b6919b1e30 | |||
dd77793bda | |||
3a5ef6c05d | |||
e8ed8cf37d | |||
f366b0c566 |
@ -10,5 +10,5 @@
|
||||
- php-mysql
|
||||
- php
|
||||
- libapache2-mod-php
|
||||
# - php-mcrypt
|
||||
- php-mcrypt
|
||||
- python-mysqldb
|
||||
|
115
roles/icinga/README.md
Normal file
115
roles/icinga/README.md
Normal file
@ -0,0 +1,115 @@
|
||||
# Instalation de NSClient++ sur la machine s-win
|
||||
|
||||
En premier lieu, installer Mozilla Firefox via Internet Explorer.
|
||||
|
||||
Une fois Mozilla intallé, installer NSClient++ avec ce lien: [NSClient++](https://nsclient.org/download/)
|
||||
|
||||
Puis choisir la version Windows
|
||||
|
||||
# Etapes de l'installation
|
||||
|
||||
Sur l'étape **Select monitoring tool**, sélectionner **Generic**.
|
||||
|
||||
Sur l'étape **Choose setup type**, sélectionner **Typical**.
|
||||
|
||||
Sur l'étape **NSClient++ Configuration:
|
||||
|
||||
```
|
||||
|
||||
Allowed hosts: 172.16.0.8
|
||||
|
||||
Password: root
|
||||
|
||||
```
|
||||
|
||||
Activer **check plugins, check_nt et check_nrpe**; laisser NSCA client et web server désactiver
|
||||
|
||||
Cocher la case **Insecure legacy mode**
|
||||
|
||||
|
||||
Terminer l'installation.
|
||||
|
||||
# Modification des fichiers
|
||||
|
||||
Rendez vous dans le répertoire **C:\Programmes\NSClient++** puis ouvrez le fichier **nsclient** (celui avec un rouage).
|
||||
|
||||
Une fois ouvert, modifier tout le fichier avec ceci:
|
||||
|
||||
```
|
||||
|
||||
#If you want to fill this file with all available options run the following command:
|
||||
#nscp settings --generate --add-defaults --load-all
|
||||
#If you want to activate a module and bring in all its options use:
|
||||
#nscp settings --activate-module <MODULE NAME> --add-defaults
|
||||
#For details run: nscp settings --help
|
||||
|
||||
|
||||
; in flight - TODO
|
||||
[/settings/default]
|
||||
|
||||
; Undocumented key
|
||||
password = root
|
||||
|
||||
; Undocumented key
|
||||
allowed hosts = 172.16.0.8
|
||||
|
||||
|
||||
; in flight - TODO
|
||||
[/settings/NRPE/server]
|
||||
|
||||
; Undocumented key
|
||||
verify mode = none
|
||||
|
||||
; Undocumented key
|
||||
insecure = true
|
||||
|
||||
|
||||
; in flight - TODO
|
||||
[/modules]
|
||||
|
||||
; Undocumented key
|
||||
CheckExternalScripts = enabled
|
||||
|
||||
; Undocumented key
|
||||
CheckHelpers = enabled
|
||||
|
||||
; Undocumented key
|
||||
CheckEventLog = enabled
|
||||
|
||||
; Undocumented key
|
||||
CheckNSCP = enabled
|
||||
|
||||
; Undocumented key
|
||||
CheckDisk = enabled
|
||||
|
||||
; Undocumented key
|
||||
CheckSystem = enabled
|
||||
|
||||
; Undocumented key
|
||||
NSClientServer = enabled
|
||||
|
||||
; Undocumented key
|
||||
NRPEServer = enabled
|
||||
|
||||
```
|
||||
|
||||
Redémarrez le service NSClient++:
|
||||
|
||||
```
|
||||
|
||||
services.msc
|
||||
|
||||
```
|
||||
|
||||
Puis clique droit sur le service **NCLient++ Monitoring Agent** et appuyer sur **Redémarrer**
|
||||
|
||||
|
||||
Retourner sur le serveur nagios puis écrire:
|
||||
|
||||
```
|
||||
|
||||
systemctl restart icinga
|
||||
|
||||
```
|
||||
|
||||
Les services de la machine **srv-2012** apparaissent en **UP**.
|
@ -15,13 +15,13 @@ define hostgroup {
|
||||
define hostgroup {
|
||||
hostgroup_name debian-servers
|
||||
alias Serveurs distant
|
||||
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test
|
||||
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test, s-itil
|
||||
}
|
||||
|
||||
define hostgroup {
|
||||
hostgroup_name ssh-servers
|
||||
alias acces SSH
|
||||
members s-adm, s-infra, s-proxy, r-int, r-ext, localhost, s-test, gwsio2
|
||||
members s-adm, s-infra, s-proxy, r-int, r-ext, localhost, s-test, gwsio2, s-itil
|
||||
}
|
||||
|
||||
define hostgroup {
|
||||
@ -39,7 +39,7 @@ define hostgroup {
|
||||
define hostgroup {
|
||||
hostgroup_name http-servers
|
||||
alias serveurs-web
|
||||
members localhost
|
||||
members localhost, s-itil
|
||||
}
|
||||
|
||||
#define hostgroup {
|
||||
@ -69,6 +69,6 @@ define hostgroup{
|
||||
define hostgroup{
|
||||
hostgroup_name uptimegrp
|
||||
alias uptimegrp
|
||||
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test
|
||||
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test, s-itil
|
||||
}
|
||||
|
||||
|
14
roles/icinga/files/cfg/s-itil.cfg
Normal file
14
roles/icinga/files/cfg/s-itil.cfg
Normal file
@ -0,0 +1,14 @@
|
||||
# A simple configuration file for monitoring the local host
|
||||
# This can serve as an example for configuring other servers;
|
||||
# Custom services specific to this host are added here, but services
|
||||
# defined in nagios2-common_services.cfg may also apply.
|
||||
#
|
||||
|
||||
define host{
|
||||
use generic-host ; Name of host template to use
|
||||
host_name s-itil
|
||||
alias debian-servers
|
||||
address 172.16.0.9
|
||||
parents r-int
|
||||
}
|
||||
|
@ -8,6 +8,10 @@
|
||||
copy: src=resolv.conf dest=/etc/
|
||||
when: ansible_hostname != "s-adm" and ansible_hostname != "s-proxy"
|
||||
|
||||
- name: pas de chgt resolv.conf pour r-vp2
|
||||
meta: end_play
|
||||
when: ansible_hostname == "r-vp2"
|
||||
|
||||
- name: Copie resolv.conf pour s-proxy
|
||||
copy: src=resolv.conf.s-proxy dest=/etc/resolv.conf
|
||||
when: ansible_hostname == "s-proxy"
|
||||
|
40
roles/postfix/README.md
Normal file
40
roles/postfix/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Post-installation de Postfix
|
||||
|
||||
Entrer votre adresse mail et votre mot de passe dans le fichier /etc/postfix/sasl_passwd
|
||||
|
||||
```
|
||||
|
||||
nano /etc/postfix/sasl_passwd
|
||||
|
||||
[smpt.gmail.com]:587 votreadresse@domaine.fr:motdepasse
|
||||
|
||||
```
|
||||
|
||||
Entrer votre addresse mail dans le fichier /etc/icinga/objects/contacts_icinga.cfg
|
||||
|
||||
```
|
||||
|
||||
nano /etc/icinga/objects/contacts_icinga.cfg
|
||||
|
||||
define contact...
|
||||
|
||||
email votreadresse@domaine.fr
|
||||
|
||||
```
|
||||
Lancer la commande suivante pour prendre en compte la modification:
|
||||
|
||||
```
|
||||
|
||||
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
||||
|
||||
```
|
||||
|
||||
Activer l'**Accès moins sécurisé des applications** depuis son compte google
|
||||
|
||||
Désactiver un service puis vérifier ses mails (attendre 5 minutes entre chaque test)
|
||||
|
||||
```
|
||||
|
||||
tail -f /var/log/icinga/icinga.log pour vérifier l'envoi de l'email
|
||||
|
||||
```
|
@ -5,7 +5,7 @@
|
||||
state: directory
|
||||
- name: download and extract wordpress
|
||||
unarchive:
|
||||
src: http://depl/gsbstore/wordpress-5.3.2-fr_FR.tar.gz
|
||||
src: http://depl/gsbstore/wordpress-5.6-fr_FR.tar.gz
|
||||
dest: /home/
|
||||
remote_src: yes
|
||||
|
||||
|
@ -3,9 +3,6 @@
|
||||
connection: local
|
||||
|
||||
roles:
|
||||
- apache2
|
||||
- php-fpm
|
||||
- mysql
|
||||
- base
|
||||
- s-lb-web-ab
|
||||
- snmp-agent
|
||||
|
@ -3,9 +3,6 @@
|
||||
connection: local
|
||||
|
||||
roles:
|
||||
- apache2
|
||||
- php-fpm
|
||||
- mysql
|
||||
- base
|
||||
- s-lb-web-ab
|
||||
- snmp-agent
|
||||
|
1
s-mon.retry
Normal file
1
s-mon.retry
Normal file
@ -0,0 +1 @@
|
||||
localhost
|
Reference in New Issue
Block a user