Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)

« Monitoring serveur » : différence entre les versions

De AJLSM
Aller à la navigation Aller à la recherche
création+catégories
 
m →Configuration : exemple
Ligne 13 : Ligne 13 :


Note that lines starting with a # (dash) are ignored.
Note that lines starting with a # (dash) are ignored.
 
<syntaxhighlight lang="bash">
# ignored hosts
# ignored hosts
# http://wont-be.tested.com/
# http://wont-be.tested.com/
# test
# test
http://my.website.com/
http://my.website.com/
</syntaxhighlight>


Then you are good to go and run your first test
Then you are good to go and run your first test

Version du 12 mars 2013 à 17:58

Le script de monitoring est hébergé sur le serveur Doc/Ouessant par l'utilisateur ajlsm. Le script est hébergé sur compte github et peut être cloné si besoin.

Installation

{{important|j'utilise des sous-modules git, pensé à les récupérer<ref name="submodule-workflow">Git Submodules: What is the Ideal Workflow?</ref>}

git clone https://github.com/edouard-lopez/monitor-http-server

Configuration

Il faut éditer le First you need to edit the file monitor-list.txt and add some servers URLs (using their FQDN).

Note that lines starting with a # (dash) are ignored.

# ignored hosts
# http://wont-be.tested.com/
# test
http://my.website.com/

Then you are good to go and run your first test

bash /path/to/monitor-servers.sh me@host.com ./custom-list.txt

Tâche Cron

J'ai déclarer une tâche cron rattacher à l'utilisateur ajlsm

crontab -e

Voici à quoi elle ressemble :

# voir la liste des serveurs monitoré dans ~/shell-scripts/monitor/monitor-list-ajlsm.txt
0 7-23 * * * bash "$HOME"/shell-scripts/monitor/monitor-servers.sh ajlsm@ajlsm.com "$HOME"/shell-scripts/monitor/monitor-list-ajlsm.txt

Références

<references/>