Installation de Shinken sur une Debian : Différence entre versions
De wikiGite
Ligne 27 : | Ligne 27 : | ||
Pour remonter les éventuels bugs / nouvelles fonctions, merci d'utiliser le site officiel du script qui se trouve sur GitHub à l'adresse suivante: https://github.com/nicolargo/shinkenautoinstall. | Pour remonter les éventuels bugs / nouvelles fonctions, merci d'utiliser le site officiel du script qui se trouve sur GitHub à l'adresse suivante: https://github.com/nicolargo/shinkenautoinstall. | ||
+ | |||
+ | ------------------------------------------------------------------------ | ||
+ | |||
+ | Manuel : | ||
+ | |||
+ | If you follow these instructions, here's what you'll end up with: | ||
+ | |||
+ | Shinken and the plugins will be installed underneath | ||
+ | ”/usr/local/shinken” | ||
+ | |||
+ | Required Packages | ||
+ | |||
+ | Make sure you've installed the following packages on your Ubuntu installation before continuing. | ||
+ | Python >= 2.4 | ||
+ | Pyro (Python module for distributed objects) | ||
+ | Git (If you want the lastest code) | ||
+ | python-setuptools | ||
+ | |||
+ | On a debian based system (like Ubuntu) you can use apt-get to install these packages by running the following commands: | ||
+ | |||
+ | sudo apt-get install python pyro git-core python-setuptools | ||
+ | |||
+ | Create Account Information | ||
+ | |||
+ | Become the root user. | ||
+ | |||
+ | linux:~ $ sudo su - | ||
+ | |||
+ | Create a new shinken user account and give it a password. | ||
+ | |||
+ | linux:~ # /usr/sbin/useradd -m shinken | ||
+ | linux:~ # passwd shinken | ||
+ | |||
+ | On Ubuntu server edition (9.10 and possible newer versions), you will need to also add a shinken group (it's not created by default). You should be able to skip this step on desktop editions of Ubuntu. | ||
+ | |||
+ | linux:~ # /usr/sbin/groupadd shinken | ||
+ | linux:~ # /usr/sbin/usermod -G shinken shinken | ||
+ | |||
+ | Add the apache user to this group to allow external commands to be send from the web interface. | ||
+ | |||
+ | linux:~ # /usr/sbin/usermod -G shinken www-data | ||
+ | |||
+ | Download Shinken and the Plugins | ||
+ | |||
+ | Create a directory for storing the downloads. | ||
+ | |||
+ | linux:~ # mkdir ~/downloads | ||
+ | linux:~ # cd ~/downloads | ||
+ | |||
+ | Download the source code of Shinken and the Shinken plugins (visit http://www.nagios.org/download/ for links to the latest versions of the plugins). At the time of writing, the latest versions plugins were 1.4.13. | ||
+ | |||
+ | linux:~ # git clone git://shinken.git.sourceforge.net/gitroot/shinken/shinken | ||
+ | |||
+ | Install Shinken | ||
+ | |||
+ | linux:~ # cd shinken | ||
+ | linux:~ # sudo python setup.py install --install-scripts=/usr/bin | ||
+ | |||
+ | Don't start Shinken yet - there's still more that needs to be done… | ||
+ | Customize Configuration | ||
+ | |||
+ | Sample configuration files have now been installed in the ”/etc/shinken/” directory. These sample files should work fine for getting started with Shinken. You'll need to make just one change before you proceed… | ||
+ | Install the Nagios Plugins to use with Shinken | ||
+ | |||
+ | You can download plugins from source, but your debian-like administrator will just will you : | ||
+ | |||
+ | linux:~ # sudo apt-get install nagios-plugins | ||
+ | |||
+ | Start Shinken | ||
+ | |||
+ | Configure Shinken to automatically start when the system boots. | ||
+ | |||
+ | linux:~ # sudo ln -s /etc/init.d/shinken-scheduler /etc/rcS.d/S98shinken-scheduler | ||
+ | linux:~ # sudo ln -s /etc/init.d/shinken-poller /etc/rcS.d/S98shinken-poller | ||
+ | linux:~ # sudo ln -s /etc/init.d/shinken-reactionner /etc/rcS.d/S98shinken-reactionner | ||
+ | linux:~ # sudo ln -s /etc/init.d/shinken-broker /etc/rcS.d/S98shinken-broker | ||
+ | linux:~ # sudo ln -s /etc/init.d/shinken-arbiter /etc/rcS.d/S98shinken-arbiter | ||
+ | |||
+ | Verify the sample Shinken configuration files. | ||
+ | |||
+ | linux:~ # /usr/bin/shinken-arbiter -v -c /etc/shinken/nagios.cfg -c /etc/shinken/shinken-specific.cfg | ||
+ | |||
+ | If there are no errors, start Shinken. | ||
+ | |||
+ | linux:~ # sudo /etc/init.d/shinken-scheduler start | ||
+ | linux:~ # sudo /etc/init.d/shinken-poller start | ||
+ | linux:~ # sudo /etc/init.d/shinken-broker start | ||
+ | linux:~ # sudo /etc/init.d/shinken-reactionner start | ||
+ | linux:~ # sudo /etc/init.d/shinken-arbiter start | ||
+ | |||
+ | Thruk FastCGI | ||
+ | |||
+ | apt-get install libapache2-mod-fcgid libfile-copy-recursive-perl libmodule-install-perl apache2 |
Version du 23 mai 2011 à 12:53
Source : Nicolargo
La version 0.4 du script va installer:
- Shinken 0.6
- Thruk 1.0.2
La procédure pour installer ou mettre à jour votre serveur de supervision Shinken est toujours la même:
cd ~ rm -f shinkenautoinstall-debian.sh wget http://svn.nicolargo.com/shinkenautoinstall/trunk/shinkenautoinstall-debian.sh chmod a+x shinkenautoinstall-debian.sh sudo ./shinkenautoinstall-debian.sh
Si tout se passe comme prévu, le script devrait afficher:
---------------------------------------------------- Installation is finished ---------------------------------------------------- Backup configuration file : /tmp/shinken-backup-20110513073545.tgz Configuration file folder : /etc/shinken Log file : /var/lib/shinken/nagios.log Shinken startup script : /etc/init.d/shinken Thruk startup script : /etc/init.d/thruk Thruk web interface URL : http://sam:3000
Dans certain cas, notamment lors d'une mise à jour, il faut ensuite relancer Shinken:
sudo /etc/init.d/shinken restart
Pour remonter les éventuels bugs / nouvelles fonctions, merci d'utiliser le site officiel du script qui se trouve sur GitHub à l'adresse suivante: https://github.com/nicolargo/shinkenautoinstall.
Manuel :
If you follow these instructions, here's what you'll end up with:
Shinken and the plugins will be installed underneath
”/usr/local/shinken”
Required Packages
Make sure you've installed the following packages on your Ubuntu installation before continuing.
Python >= 2.4 Pyro (Python module for distributed objects) Git (If you want the lastest code) python-setuptools
On a debian based system (like Ubuntu) you can use apt-get to install these packages by running the following commands:
sudo apt-get install python pyro git-core python-setuptools
Create Account Information
Become the root user.
linux:~ $ sudo su -
Create a new shinken user account and give it a password.
linux:~ # /usr/sbin/useradd -m shinken linux:~ # passwd shinken
On Ubuntu server edition (9.10 and possible newer versions), you will need to also add a shinken group (it's not created by default). You should be able to skip this step on desktop editions of Ubuntu.
linux:~ # /usr/sbin/groupadd shinken linux:~ # /usr/sbin/usermod -G shinken shinken
Add the apache user to this group to allow external commands to be send from the web interface.
linux:~ # /usr/sbin/usermod -G shinken www-data
Download Shinken and the Plugins
Create a directory for storing the downloads.
linux:~ # mkdir ~/downloads linux:~ # cd ~/downloads
Download the source code of Shinken and the Shinken plugins (visit http://www.nagios.org/download/ for links to the latest versions of the plugins). At the time of writing, the latest versions plugins were 1.4.13.
linux:~ # git clone git://shinken.git.sourceforge.net/gitroot/shinken/shinken
Install Shinken
linux:~ # cd shinken linux:~ # sudo python setup.py install --install-scripts=/usr/bin
Don't start Shinken yet - there's still more that needs to be done… Customize Configuration
Sample configuration files have now been installed in the ”/etc/shinken/” directory. These sample files should work fine for getting started with Shinken. You'll need to make just one change before you proceed… Install the Nagios Plugins to use with Shinken
You can download plugins from source, but your debian-like administrator will just will you :
linux:~ # sudo apt-get install nagios-plugins
Start Shinken
Configure Shinken to automatically start when the system boots.
linux:~ # sudo ln -s /etc/init.d/shinken-scheduler /etc/rcS.d/S98shinken-scheduler linux:~ # sudo ln -s /etc/init.d/shinken-poller /etc/rcS.d/S98shinken-poller linux:~ # sudo ln -s /etc/init.d/shinken-reactionner /etc/rcS.d/S98shinken-reactionner linux:~ # sudo ln -s /etc/init.d/shinken-broker /etc/rcS.d/S98shinken-broker linux:~ # sudo ln -s /etc/init.d/shinken-arbiter /etc/rcS.d/S98shinken-arbiter
Verify the sample Shinken configuration files.
linux:~ # /usr/bin/shinken-arbiter -v -c /etc/shinken/nagios.cfg -c /etc/shinken/shinken-specific.cfg
If there are no errors, start Shinken.
linux:~ # sudo /etc/init.d/shinken-scheduler start linux:~ # sudo /etc/init.d/shinken-poller start linux:~ # sudo /etc/init.d/shinken-broker start linux:~ # sudo /etc/init.d/shinken-reactionner start linux:~ # sudo /etc/init.d/shinken-arbiter start
Thruk FastCGI
apt-get install libapache2-mod-fcgid libfile-copy-recursive-perl libmodule-install-perl apache2