Actions
Anomalie #1261
ferméRendre générique et simplifier le déploiement d'une sonde cucumber-nagios
Difficulté:
2 Facile
Description
Dans le but de simplifier le déploiement de futures sondes cucumber-nagios et de permettre facilement à des bénévoles de contribuer, il faudrait rendre générique et simplifier déploiement d'une sonde Nagios utilisant Cucumber.
Commits Git concernés :
https://agir.april.org/projects/admins/repository/revisions/cee6e0fe3e866e54b9b5eace11fc4c8a3c22c112
https://agir.april.org/projects/admins/repository/revisions/47e83533982b99561b59e344edb98f4c91afd587
https://agir.april.org/projects/admins/repository/revisions/46db5c6c9899f9eafcaec626207201f98a3f0014
Documentation pour l'ajout d'un nouveau projet Cucumber :
Cucumber_nagios
Actions
#3
Mis à jour par Loïc Dachary il y a plus de 11 ans
ssh root@puppet.vm.april-int cd /srv/admins \; git pull
# ssh root@spip.libre-en-fete.vm.april-int # sudo apt-get update -o Acquire::PDiffs=false # puppet agent -vt info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb info: Caching catalog for spip.libre-en-fete.org info: Applying configuration version '1367227599' notice: /Stage[main]/April_nagios::Nrpe_server/Package[nagios-plugins-contrib]/ensure: ensure changed 'purged' to 'present' notice: /Stage[main]/April_nagios::Nrpe_server/Package[nagios-nrpe-server]/ensure: ensure changed 'purged' to 'present' notice: Augeas[nrpe.cfg](provider=augeas): --- /etc/nagios/nrpe.cfg 2013-03-09 07:53:42.000000000 +0000 +++ /etc/nagios/nrpe.cfg.augnew 2013-04-29 09:29:07.199544998 +0000 @@ -78,7 +78,6 @@ # # NOTE: This option is ignored if NRPE is running under either inetd or xinetd -allowed_hosts=127.0.0.1 @@ -226,3 +225,4 @@ # only snipplets ending in .cfg will get included include_dir=/etc/nagios/nrpe.d/ +server_address=10.145.4.14 notice: /Stage[main]/April_nagios::Nrpe_server/Augeas[nrpe.cfg]/returns: executed successfully info: /Stage[main]/April_nagios::Nrpe_server/Augeas[nrpe.cfg]: Scheduling refresh of Service[nagios-nrpe-server] notice: /Stage[main]/April_nagios::Check_mysql/April_nagios::Nrpe_plugin[check_mysql]/File[/etc/nagios/nrpe.d/check_mysql.cfg]/ensure: created info: /Stage[main]/April_nagios::Check_mysql/April_nagios::Nrpe_plugin[check_mysql]/File[/etc/nagios/nrpe.d/check_mysql.cfg]: Scheduling refresh of Service[nagios-nrpe-server] notice: /Stage[main]/April_nagios::Nrpe_server/Service[nagios-nrpe-server]: Triggered 'refresh' from 2 events notice: Finished catalog run in 93.65 seconds
Actions
#4
Mis à jour par Loïc Dachary il y a plus de 11 ans
# ssh -A root@nagios.vm.april-int # apt-get update -o Acquire::Pdiffs=false # puppet agent -vt info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb info: Caching catalog for nagios.vm.april-int info: Applying configuration version '1367227599' info: FileBucket adding {md5}6012c41bdee5fc81efd49f4cf70ff07f info: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/env]: Filebucketed /usr/share/nagios3/plugins/april/cucumber/scripts/env to puppet with sum 6012c41bdee5fc81efd49f4cf70ff07f notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/env]/ensure: ensure changed 'file' to 'link' notice: /Stage[main]/April_nagios::Cucumber/File[/usr/lib/nagios/install-cucumber.sh]/content: --- /usr/lib/nagios/install-cucumber.sh 2013-04-05 12:47:46.788460999 +0200 +++ /tmp/puppet-file20130429-3329-1mhzm58-0 2013-04-29 11:34:13.948460993 +0200 @@ -2,26 +2,29 @@ # Installation script for cucumber-nagios # Quick and dirty version - export INSTALL_DIR=/usr/share/nagios3/plugins/april/cucumber export GEM_HOME=$INSTALL_DIR/gems +#Main strucure mkdir -p $INSTALL_DIR mkdir -p $INSTALL_DIR/gems mkdir -p $INSTALL_DIR/scripts mkdir -p $INSTALL_DIR/projects +mkdir -p $INSTALL_DIR/projects_features +#Gems apt-get install -y ruby rubygems ruby-dev libxml2-dev libxslt1-dev -gem install cucumber -v 1.1.2 -gem install rspec -v 2.13.0 -gem install aruba -v 0.3.4 -gem install cuken -v 0.1.1 -gem install webrat -v 0.7.2 -gem install mechanize -v 1.0.0 -gem install templater -v 1.0.0 -gem install net-ssh -v 2.1.4 -gem install amqp -v 0.6.7 -gem install bundler -v 1.0.22 -gem install rake -gem install cucumber-nagios -v 0.9.2 +gem install --no-ri --no-rdoc cucumber -v 1.1.2 +gem install --no-ri --no-rdoc rspec -v 2.13.0 +gem install --no-ri --no-rdoc aruba -v 0.3.4 +gem install --no-ri --no-rdoc cuken -v 0.1.1 +gem install --no-ri --no-rdoc webrat -v 0.7.2 +gem install --no-ri --no-rdoc mechanize -v 1.0.0 +gem install --no-ri --no-rdoc templater -v 1.0.0 +gem install --no-ri --no-rdoc net-ssh -v 2.1.4 +gem install --no-ri --no-rdoc amqp -v 0.6.7 +gem install --no-ri --no-rdoc bundler -v 1.0.22 +gem install --no-ri --no-rdoc rake +gem install --no-ri --no-rdoc cucumber-nagios -v 0.9.2 + info: FileBucket adding {md5}18c778913150c72009f6e10678617a8d info: /Stage[main]/April_nagios::Cucumber/File[/usr/lib/nagios/install-cucumber.sh]: Filebucketed /usr/lib/nagios/install-cucumber.sh to puppet with sum 18c778913150c72009f6e10678617a8d notice: /Stage[main]/April_nagios::Cucumber/File[/usr/lib/nagios/install-cucumber.sh]/content: content changed '{md5}18c778913150c72009f6e10678617a8d' to '{md5}d6578fc04247b5582a83d78f9344e253' notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber]/content: --- /usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber 2013-04-05 12:50:42.248460998 +0200 +++ /tmp/puppet-file20130429-3329-9j5um1-0 2013-04-29 11:34:14.276460983 +0200 @@ -1,5 +1,9 @@ #!/bin/bash +export INSTALL_DIR=/usr/share/nagios3/plugins/april/cucumber +export GEM_HOME=$INSTALL_DIR/gems +export PATH=$INSTALL_DIR/gems/bin:$PATH + if [ -z "$1" ] then echo "UNKNOW : project not set" info: FileBucket adding {md5}815c98484626fb1b44dd7f6f622482ba info: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber]: Filebucketed /usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber to puppet with sum 815c98484626fb1b44dd7f6f622482ba notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber]/content: content changed '{md5}815c98484626fb1b44dd7f6f622482ba' to '{md5}5b4ec8e3575a2a5dae2f520bb14e7b2d' notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/lib/nagios/install-cucumber-project.sh]/ensure: defined content as '{md5}06ed21a49ad00545de9b14f1882b4628' notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/projects_features]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org/spip-ping]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org/spip-admin]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/Exec[install-cucumber-project-spip-spip.libre-en-fete.org]/returns: executed successfully notice: /Stage[main]/April_nagios::Server/Nagios_service[check_mysql_spip.libre-en-fete.org]/ensure: created info: FileBucket adding {md5}2bcf777dd6558f8985f35ca94db656fa info: /Stage[main]/April_nagios::Server/Nagios_service[check_mysql_spip.libre-en-fete.org]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Service[nagios3]: Triggered 'refresh' from 1 events notice: Finished catalog run in 4.24 seconds
Actions
#5
Mis à jour par Loïc Dachary il y a plus de 11 ans
# ssh -A root@nagios-hetzner.vm.april-int # apt-get update -o Acquire::Pdiffs=false # puppet agent -vt info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb info: Caching catalog for nagios-hetzner.vm.april-int info: Applying configuration version '1367227599' err: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/env]/ensure: change from absent to link failed: Could not set 'link on ensure: No such file or directory - /usr/share/nagios3/plugins/april/cucumber/scripts at /etc/puppet/modules/april_nagios/manifests/init.pp:55 notice: /Stage[main]/April_nagios::Cucumber/File[/usr/lib/nagios/install-cucumber.sh]/ensure: defined content as '{md5}d6578fc04247b5582a83d78f9344e253' notice: /Stage[main]/April_nagios::Cucumber/Exec[install-cucumber]/returns: executed successfully notice: /Stage[main]/April_nagios::Cucumber/File[/etc/nagios3/conf.d/cucumber_commands.cfg]/ensure: defined content as '{md5}5f44f02c6242b9443d9b0dac25124b26' notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/check_cucumber]/ensure: defined content as '{md5}5b4ec8e3575a2a5dae2f520bb14e7b2d' notice: /Stage[main]/Ssh::Knownhosts/Sshkey[spip.libre-en-fete.org_dsa]/ensure: created info: FileBucket adding {md5}2df25a12037cd6bff99089febe312846 notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/lib/nagios/install-cucumber-project.sh]/ensure: defined content as '{md5}06ed21a49ad00545de9b14f1882b4628' notice: /Stage[main]/April_munin::Node/Package[munin-node]/ensure: ensure changed 'purged' to 'present' notice: /Stage[main]/April_munin::Node/File_line[cidr_allow_10]/ensure: created info: /Stage[main]/April_munin::Node/File_line[cidr_allow_10]: Scheduling refresh of Service[munin-node] notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org/spip-ping]/ensure: created notice: /Stage[main]/April_munin::Node/File_line[cidr_allow_192]/ensure: created info: /Stage[main]/April_munin::Node/File_line[cidr_allow_192]: Scheduling refresh of Service[munin-node] notice: /Stage[main]/April_munin::Node/Service[munin-node]: Triggered 'refresh' from 2 events notice: /Stage[main]/April_nagios::Server/Nagios_host[spip.libre-en-fete.org]/ensure: created info: FileBucket adding {md5}4af6cd47d08eb698939da0aa5b45b635 info: /Stage[main]/April_nagios::Server/Nagios_host[spip.libre-en-fete.org]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Nagios_host[opium.lan.april-int]/hostgroups: defined 'hostgroups' as 'munin-node' info: /Stage[main]/April_nagios::Server/Nagios_host[opium.lan.april-int]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Nagios_host[puppet.vm.april-int]/hostgroups: defined 'hostgroups' as 'munin-node' info: /Stage[main]/April_nagios::Server/Nagios_host[puppet.vm.april-int]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Nagios_service[http_spip.libre-en-fete.org]/ensure: created info: FileBucket adding {md5}5cae6aa5846298babaf71398a567c89d info: /Stage[main]/April_nagios::Server/Nagios_service[http_spip.libre-en-fete.org]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/File[/usr/share/nagios3/plugins/april/cucumber/projects_features/spip.libre-en-fete.org/spip-admin]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/Exec[install-cucumber-project-spip-spip.libre-en-fete.org]: Dependency File[/usr/share/nagios3/plugins/april/cucumber/scripts/env] has failures: true warning: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/Exec[install-cucumber-project-spip-spip.libre-en-fete.org]: Skipping because of failed dependencies notice: /Stage[main]/April_nagios::Server/Nagios_service[check_cucumber_spip_spip.libre-en-fete.org]: Dependency File[/usr/share/nagios3/plugins/april/cucumber/scripts/env] has failures: true warning: /Stage[main]/April_nagios::Server/Nagios_service[check_cucumber_spip_spip.libre-en-fete.org]: Skipping because of failed dependencies notice: /Stage[main]/April_nagios::Server/Nagios_service[check_mysql_spip.libre-en-fete.org]/ensure: created info: /Stage[main]/April_nagios::Server/Nagios_service[check_mysql_spip.libre-en-fete.org]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Service[nagios3]: Dependency File[/usr/share/nagios3/plugins/april/cucumber/scripts/env] has failures: true warning: /Stage[main]/April_nagios::Server/Service[nagios3]: Skipping because of failed dependencies notice: /Stage[main]/April_nagios::Server/Service[nagios3]: Triggered 'refresh' from 5 events notice: /Stage[main]/Ssh::Knownhosts/Sshkey[spip.libre-en-fete.org_rsa]/ensure: created notice: Finished catalog run in 242.59 seconds
Actions
#6
Mis à jour par Loïc Dachary il y a plus de 11 ans
# puppet agent -vt info: Retrieving plugin info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb info: Caching catalog for nagios-hetzner.vm.april-int info: Applying configuration version '1367227599' notice: /Stage[main]/April_nagios::Cucumber/File[/usr/share/nagios3/plugins/april/cucumber/scripts/env]/ensure: created notice: /Stage[main]/April_nagios::Server/April_nagios::Check_cucumber_generate_spip[check_cucumber_generate_spip.libre-en-fete.org]/Exec[install-cucumber-project-spip-spip.libre-en-fete.org]/returns: executed successfully notice: /Stage[main]/April_nagios::Server/Nagios_service[check_cucumber_spip_spip.libre-en-fete.org]/ensure: created info: FileBucket adding {md5}e3fa484c8e3b2183f5f234e796597792 info: /Stage[main]/April_nagios::Server/Nagios_service[check_cucumber_spip_spip.libre-en-fete.org]: Scheduling refresh of Service[nagios3] notice: /Stage[main]/April_nagios::Server/Service[nagios3]: Triggered 'refresh' from 1 events notice: Finished catalog run in 5.55 seconds
Actions
#7
Mis à jour par Quentin CHERGUI il y a plus de 11 ans
- Statut changé de En cours de traitement à Résolu
Actions