About Me

My photo
Kalyan Kumar Pasupuleti B-Tech(Information Technology). • RedHat Certified Engineer(RHCE) • Directory Services and Authentication Certificate of Expertise(LDAP) • Red Hat SELinux Policy Administration Certificate of Expertise(SELinux) • Network Services Security Certificate of Expertise (Network Services) • RedHat Certified Virtualization Administrator(RHCVA) • Red Hat Certified Security Specialist (RHCSS) Working as Cloud DevOps engineer

Wednesday, January 22, 2014

Fix for OpenManage 7.3.2 issue

ERROR: (SNMP) OpenManage is not installed or is not working correctly

  1. After upgrading OpenManage to version 7.3.2 on your server,OpenManage service checks from your monitoring tool(Nagios, Zabbix or op5) might fail and display an error message such as :
    • ERROR: (SNMP) OpenManage is not installed or is not working correctly
  2. To fix this issue, log on to your server as root and run the following commands:
    • sed -r -i 's/^(SNMP)=disable$/\1=enable/' /opt/dell/srvadmin/etc/srvadmin-omilcore/install.ini (Here we are enabling SNMP)
    • Remove dcsnmp.off file : rm /opt/dell/srvadmin/var/lib/srvadmin-deng/dcsnmp.off
    • cd /opt/dell/srvadmin/sbin/
    • Restart the server admin services : srvadmin-services.sh restart
    • Restart snmp daemon : service snmpd restart
  3. Now recheck the OpenManage services in your monitoring tool(Nagios, Zabbix or op5)

Sunday, January 19, 2014

How to install NRPE agent(Using Yum) on a Linux machine?

Download and install repo packages:

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

Now start the procedure:

  1. Install the below packages
    • # yum install nrpe nagios nagios-plugins-all
    • # chkconfig nrpe on
  2. The nrpe configuration file is : /etc/nagios/nrpe.cfg
  3. Make the necessary changes to the nrpe config file, so that Nagios server can communicate to the client machine.
    • # vim /etc/nagios/nrpe.cfg
    • allowed_hosts= 127.0.0.1,<Nagios server IP address>
  4. Also, define the below commands in the same nrpe.cfg file as shown below. So that you can use them while adding these to Nagios server for monitoring:
    • command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% --local -X tmpfs -X none
    • command[check_memory]=/usr/local/sbin/check_memory.pl -C -u -w 90 -c 95
  5. Save and exit
  6. Restart nrpe service after the modifications done to the nrpe.cfg file.
    • # /etc/init.d/nrpe restart
  7. Check whether the port 5666 is listening on localhost (the machine in which NRPE agent is installed) or not.
    • # netstat -an | grep 5666
    • tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
  8. Check whether you are able to telnet to port 5666 from Nagios server or not
    • # telnet <Client IP> 5666
  9. If telnet is not listening to port 5666 from Nagios server, then enable the port by writing below iptable rule:
    • Stop iptables: # /etc/init.d/iptables stop
    • Paste the below rule in the iptables file (# vi /etc/sysconfig/iptables)
    • -A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
    • Save and exit.
    • Start iptables: /etc/init.d/iptables start
  10. Now check whether you are able to telnet to port 5666 from Nagios server or not
    • # telnet <Client IP> 5666

Upgrade Nagios core from 3.X version to 3.5 Howto?

Follow the below procedure to upgrade Nagios core 3.X version to 3.5:

  1. Take the backup of your nagios folder:
    • # cd /usr/local/
    • # tar -cvzf nagios.bkp-yyyy-mm-dd.gz nagios/
  2. After taking backup,Remove the following old HTML files that were used by the web frontend.
    • # rm -f /usr/local/nagios/share/{main,side,index}.html
  3. Download the source code tarball of the Nagios Core version 3.5 from URL: http://www.nagios.org/download/ and copy it to /opt directory in Nagios server
  4. Change directory to /opt:
    • # cd /opt
  5. Extract the Nagios source code tarball:
    • # tar -xzvf nagios-3.5.tar.gz
  6. Change directory to nagios-3.5:
    • # cd nagios-3.5
  7. Now run the Nagios configure script:
    • # ./configure --with-command-group=nagcmd
  8. Next, Compile the Nagios source code using make all command
  9. Install updated binaries, documentation, and web web interface using make install command
  10. Verify the configuration files. Correct any errors shown here before proceeding with the next step:
    • # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
  11. Restart Nagios service: /etc/init.d/nagios restart
  12. You are done. Now check your Nagios web interface using URL: http://<Nagios server IP>/nagios