Today I was searching for a nagios check which gets memory information over snmp. So I came across check_netsnmp_memory. It has also a nice php template for pnp4nagios. To test the command I run: # ./check_netsnmp_memory -L “Memory Utilization” -A ‘*’ -H graylog2.domb.net -C public -a ‘total,user,cached,buffer,%used_real,%used_swap,%user_real,%cached_real’ -w ‘,,,500MB,,65%,65%,’ -c ‘,,,800MB,,80%,80%,’ As a result I got this: ERROR: snmp get_request failed – Received noSuchName(2) error-status at error-index 7. Seems that [ Read More ]
Yesterday I’ve had to clean up a host from the storeconfig mysql database. I ran the puppetstoredconfigclean.rb script and bumped into the following documented Bug http://projects.puppetlabs.com/issues/12405 which will be fixed in version 2.7.12: # ./puppetstoredconfigclean.rb kvm0.domb.net ################################################################### /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — sqlite3 (MissingSourceFile) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem’ from /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in [ Read More ]
This How to will walk you thru the steps of installing Pupppet, The Foreman, RabbitMQ, and MCollective: 1. Add your hostname to /etc/hosts.conf and /etc/sysconfig/network [root@puppet ~]# echo -e “127.0.0.1 puppet.${DOMAIN} puppet foreman.yourdomain.com foreman localhost” > /etc/hosts [root@puppet ~]# echo -e “NETWORKING=yes\nHOSTNAME=puppet.yourdomain.com” > /etc/sysconfig/network [root@puppet ~]# hostname foreman.yourdomain.com 2. First we need to add the repositories for the installation (you need to be root or have sudo permissions to do [ Read More ]
Syncing a 100-200 hosts every 30 minutes and reporting to the dashboard creates a huge amount of data. This reflects in the /var/lib/mysql/ibdata file which can easily grow to 15-20GB. In this blog post I’ll show how to shrink ibdata and how to write a cleanup job for puppet-dashboard. 1. If you are not sure how big your tables are you can login into your mysql database by using the [ Read More ]
We run a quite early version of puppet-dashboard (version 1.1.0). In the dashboard I have the possibility to delete nodes, create nodes, create classes and groups… As a system engineer I want to be able to do the tasks on the command line. So I researched a little and found that if you “cd” into the /usr/share/puppet-dashboard/ and execute: #rake -T you get a list of possible commands: (in /usr/share/puppet-dashboard) [ Read More ]
Today I was searching anti virus software for Linux and I came across Bitdefender. Surprisingly Bitdefender gives away free licenses for home use. Here are the steps to install Bitdefender on Mint 12: 1. Go to their website http://download.bitdefender.com/SMB/Workstation_Security_and_Management/BitDefender_Antivirus_Scanner_for_Unices/Unix/Current/EN_FR_BR_RO/Linux/ and download the file BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.i586.deb.run 2. Set the correct permission for BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.i586.deb.run # chmod +x BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.i586.deb.run 3. Then install the dependencies: #apt-get install ia32-libs libstdc++6:i386 (4.6.1-9ubuntu3, automatic), gcc-4.6-base:i386 libgcc1:i386 libc6:i386 4. [ Read More ]
Howto Resize KVM lvm guest image Here is how you add 5 GB of disk space to your guest: 1a. # qemu-img create -f raw temp.img 5G 2.a # cat oldimage.img temp.img > newdiskimage.img Sometimes you don’t have enough space to create a complete new image. If thats the case you can use this 1.b #qemu-img create -f raw temp.raw 5G 2.b #cat temp.raw >> oldimage.img 3. After createing the [ Read More ]
The goal of this post is to install a RHEL6 Server onto an ISCSI san disk and let it boot via gxpe. 1. Create an ISCSI disk on NS4600 Log in to the Promise Array Storage Manager (PASM). Go to Administrator and enter the Main Menu. Click on RAID MANAGMENT and select iSCSI MANAGMENT. You will need to set up your disk volumes for iSCSI acess to be available. Note: You will need [ Read More ]
Lot of admin turn SELinux off because it looks complicated. Here is a cheat sheet to make your life easier Two important documentations about Selinux can be found here: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/index.html http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/index.html —————————————————————————– If you work on Centos or Redhat, install the following packages on your system: setroubleshoot.noarch : Helps troubleshoot SELinux problems setroubleshoot-plugins.noarch : Analysis plugins for use with setroubleshoot setroubleshoot-server.noarch : SELinux troubleshoot server [root@client1 ~]# yum install setroubleshoot [ Read More ]
Please note that all double quote characters in this example are plain ASCII ” characters not typographical ones! Step 1: first we need to install the required packages: #yum install openldap-servers migrationtools Step2: As the configuration for LDAP is stored inside the LDAP server itself the configuration has to be done by editing LDIF files under the /etc/openldap/slapd.d/ directory. Now create the ldap password: #slappasswd you’ll get something like this [ Read More ]
















