Installation de Shinken sur une Debian : Différence entre versions
De wikiGite
Ligne 1 : | Ligne 1 : | ||
− | + | Version Arch & Perl | |
− | + | perl -e 'use Config; print "$Config{archname} \n"' | |
− | + | perl -e 'use Config; print "$Config{version} \n"' | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Configuration file folder : /etc/shinken | Configuration file folder : /etc/shinken | ||
Log file : /var/lib/shinken/nagios.log | Log file : /var/lib/shinken/nagios.log | ||
Shinken startup script : /etc/init.d/shinken | Shinken startup script : /etc/init.d/shinken | ||
− | + | Thruk web interface URL : http://<hostname>:3000 | |
− | Thruk web interface URL : http:// | ||
− | |||
− | |||
− | |||
− | Pour | + | Pour relancer Shinken: |
+ | /etc/init.d/shinken restart | ||
------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ||
− | |||
− | |||
If you follow these instructions, here's what you'll end up with: | If you follow these instructions, here's what you'll end up with: | ||
Ligne 38 : | Ligne 19 : | ||
Required Packages | Required Packages | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
sudo apt-get install python pyro git-core python-setuptools | sudo apt-get install python pyro git-core python-setuptools | ||
+ | apt-get install python python-dev python-setuptools pyro libgd2-xpm-dev nagios-plugins git-core | ||
Create Account Information | Create Account Information | ||
Become the root user. | Become the root user. | ||
− | |||
sudo su - | sudo su - | ||
Create a new shinken user account and give it a password. | Create a new shinken user account and give it a password. | ||
− | |||
/usr/sbin/useradd -m shinken | /usr/sbin/useradd -m shinken | ||
passwd shinken | 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. | 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. | ||
− | |||
/usr/sbin/groupadd shinken | /usr/sbin/groupadd shinken | ||
/usr/sbin/usermod -G shinken shinken | /usr/sbin/usermod -G shinken shinken | ||
Ligne 71 : | Ligne 41 : | ||
Create a directory for storing the downloads. | Create a directory for storing the downloads. | ||
− | |||
mkdir ~/downloads | mkdir ~/downloads | ||
cd ~/downloads | cd ~/downloads | ||
Ligne 79 : | Ligne 48 : | ||
Install Shinken (repasser en utilisateur normal) | Install Shinken (repasser en utilisateur normal) | ||
− | |||
cd shinken | cd shinken | ||
− | + | python setup.py install --install-scripts=/usr/bin | |
Don't start Shinken yet - there's still more that needs to be done… | Don't start Shinken yet - there's still more that needs to be done… | ||
Ligne 90 : | Ligne 58 : | ||
You can download plugins from source, but your debian-like administrator will just will you : | You can download plugins from source, but your debian-like administrator will just will you : | ||
− | |||
− | |||
cp libexec/* /usr/lib/nagios/plugins/ | cp libexec/* /usr/lib/nagios/plugins/ | ||
Ligne 97 : | Ligne 63 : | ||
Configure Shinken to automatically start when the system boots. | Configure Shinken to automatically start when the system boots. | ||
− | + | ln -s /etc/init.d/shinken-scheduler /etc/rcS.d/S98shinken-scheduler | |
− | + | ln -s /etc/init.d/shinken-poller /etc/rcS.d/S98shinken-poller | |
− | + | ln -s /etc/init.d/shinken-reactionner /etc/rcS.d/S98shinken-reactionner | |
− | + | ln -s /etc/init.d/shinken-broker /etc/rcS.d/S98shinken-broker | |
− | + | ln -s /etc/init.d/shinken-arbiter /etc/rcS.d/S98shinken-arbiter | |
− | |||
Verify the sample Shinken configuration files. | Verify the sample Shinken configuration files. | ||
− | |||
/usr/bin/shinken-arbiter -v -c /etc/shinken/nagios.cfg -c /etc/shinken/shinken-specific.cfg | /usr/bin/shinken-arbiter -v -c /etc/shinken/nagios.cfg -c /etc/shinken/shinken-specific.cfg | ||
If there are no errors, start Shinken. | If there are no errors, start Shinken. | ||
− | + | /etc/init.d/shinken-scheduler start | |
− | + | /etc/init.d/shinken-poller start | |
− | + | /etc/init.d/shinken-broker start | |
− | + | /etc/init.d/shinken-reactionner start | |
− | + | /etc/init.d/shinken-arbiter start | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Version du 31 mai 2011 à 14:47
Version Arch & Perl
perl -e 'use Config; print "$Config{archname} \n"' perl -e 'use Config; print "$Config{version} \n"'
Configuration file folder : /etc/shinken Log file : /var/lib/shinken/nagios.log Shinken startup script : /etc/init.d/shinken Thruk web interface URL : http://<hostname>:3000
Pour relancer Shinken:
/etc/init.d/shinken restart
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
sudo apt-get install python pyro git-core python-setuptools apt-get install python python-dev python-setuptools pyro libgd2-xpm-dev nagios-plugins git-core
Create Account Information
Become the root user.
sudo su -
Create a new shinken user account and give it a password.
/usr/sbin/useradd -m shinken 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.
/usr/sbin/groupadd shinken /usr/sbin/usermod -G shinken shinken
Add the apache user to this group to allow external commands to be send from the web interface.
/usr/sbin/usermod -G shinken www-data
Download Shinken and the Plugins
Create a directory for storing the downloads.
mkdir ~/downloads 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.
git clone git://shinken.git.sourceforge.net/gitroot/shinken/shinken
Install Shinken (repasser en utilisateur normal)
cd shinken 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 :
cp libexec/* /usr/lib/nagios/plugins/
Start Shinken
Configure Shinken to automatically start when the system boots.
ln -s /etc/init.d/shinken-scheduler /etc/rcS.d/S98shinken-scheduler ln -s /etc/init.d/shinken-poller /etc/rcS.d/S98shinken-poller ln -s /etc/init.d/shinken-reactionner /etc/rcS.d/S98shinken-reactionner ln -s /etc/init.d/shinken-broker /etc/rcS.d/S98shinken-broker ln -s /etc/init.d/shinken-arbiter /etc/rcS.d/S98shinken-arbiter
Verify the sample Shinken configuration files.
/usr/bin/shinken-arbiter -v -c /etc/shinken/nagios.cfg -c /etc/shinken/shinken-specific.cfg
If there are no errors, start Shinken.
/etc/init.d/shinken-scheduler start /etc/init.d/shinken-poller start /etc/init.d/shinken-broker start /etc/init.d/shinken-reactionner start /etc/init.d/shinken-arbiter start