nagiosplugins.org
Responsibilities
Nagios Plugin Team responsible for:
- website, including drupal and backups
- mysql
- user administration
Login
ssh -p 1022 {user}@nagiosplugins.opsera.com
Sites
There are three sites:
- dev.nagiosplugins.org
- staging.nagiosplugins.org
- nagiosplugins.org
These are under /srv/www.
Site promotion
cd /srv/www
copy_site {site name}
This will copy the site across, taking files + database if applicable.
Scripts
Stored under /usr/local/nagiosplugin/bin. TODO: use git to version control - speak to Thomas
Man page updates
This is invoked from a cron job by the nagiosplugins user, running the /home/nagiosplugins/bin/np_build_from_sf script. This calls the update_man_pages script which updates the drupal database with the latest --help output.
If a new plugin is added, the script will fail. You need to manually add the page in drupal and then re-run. When adding a page:
- Add a child page to http://nagiosplugins.org/man
- Set the title to the name of the plugin
- Add some text in the body
- Set the URL path to man/{nameofplugin}
- Set "no promote to front page"
Emails get sent to Ton on failure.
Backups
Run from tonvoon's crontab at 3am UK time. Backs up into /srv/backups, files and database. Retains last 30 backups.
Directory is rsync onto Ton's home server.
Restores
gunzip -c /srv/backups/nagiosplugins.latest.db.gz | mysql -u root dev
cd /srv/www/dev.nagiosplugins.org
tar --gzip -xvf /srv/backups/nagiosplugins.latest.tar.gz
Then check http://dev.nagiosplugins.org
Users and groups
Will have two groups:
- nagiosplugins - all team members
- npadmin - team leader + deputy
Only npadmin have sudo access to root (to review).
Will have 1 user called nagiosplugins to handle cronjobs and drupal. Any one in the nagioplugins team can switch to this application user:
sudo su - nagiosplugins
New users
Only npadmin group can do.
sudo useradd -g nagiosplugins -s /bin/bash -d /home/{user} -m {user}
sudo passwd {user} # Set to some random one
sudo usermod -G npadmin {user} # If team admin
User should then sort out their ssh keys and password:
passwd
ssh -p 1022 {user}@nagiosplugins.opsera.com
mkdir .ssh
exit
scp -P 1022 {id_dsa.pub} {user}@nagiosplugins.opsera.com:.ssh/authorized_keys
ssh -p 1022 {user}@nagiosplugins.opsera.com # Check key works
Removing users
sudo userdel {user}
mysql
Mysql root password held by Ton and Holger.
- Printer-friendly version
- Login or register to post comments