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

Monday, October 20, 2014

How to upgrade Nagios core 3.5.0 to 4.0.8 version?

  Download nagios-4.0.8.tar.gz from http://www.nagios.org/download 
  Untar the source code:

# tar zxvf nagios-4.0.8.tar.gz
# cd nagios-4.0.8

  Compile the new source code:
nagios-4.0.8]# ./configure --with-command-group=nagcmd
nagios-4.0.8]# make all
nagios-4.0.8]# make install
  Verify the Nagios configuration for errors:

nagios-4.0.8]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Running pre-flight check on configuration data...

Checking objects...
        Checked 1231 services.
        Checked 221 hosts.
        Checked 34 host groups.
        Checked 2 service groups.
        Checked 28 contacts.
        Checked 27 contact groups.
        Checked 127 commands.
        Checked 7 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 221 hosts
        Checked 0 service dependencies
        Checked 172 host dependencies
        Checked 7 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

  Start Nagios service # service nagios restart
  Now check Nagios GUI http://<Nagios server IP>/nagios and observe the new version.

Tuesday, March 25, 2014

Weblogic Console tips

Change the URL console Path step by step:

  1. In the left pane of the Console, under Domain Structure, select the domain name
  2. Select Configuration > General, and click Advanced at the bottom of the page.
  3. In Console Context Path, enter the context path that you want to use.



You can change "console" context path.

How To disable console:

  • under Domain Structure, select the domain name.
  • Select Configuration > General, and click Advanced at the bottom of the page
  • Deselect Console Enabled. Save it and restart the admin server.
Note: If you disable the console, you will not access the admin console.It will be useful for  added security measure in a production environment.

How to configure monitoring refresh rate:

Top of the right pane of the Administration Console, click Preferences.
User Preferences page, in the Refresh Interval box, we can set the value (sec).

How to record WLST script : 

1. Specify the recorded wlst script file name (optional) in preferences-> WLST SCRIPT RECORDING

2. Start recording.

You cannot remove or undo a command once it has been recorded. Instead, you can edit the script file after you stop recording or you can set your preferences to overwrite the script file and re-record the commands.

3. Stop recording

If you click again the record option it will end the session.

The recording session has ended. Script recorded to D:\New Folder\user_projects\domains\test\Script1355000778567.py.

If you want to view recorded commands , you can view like goto preferences->wlst script recording->control


Tuesday, February 11, 2014

How to enable Nagios Serivce Acknowledgement Comments in Emails?

If you would like to see acknowledgement comments in the Nagios email alerts that get sent so that the other admins do not need to login to Nagios GUI and view the comment, You need to do some changes in the commands.cfg file.

What to do?

Modify the command “notify-service-by-email” in the commands.cfg file. 
You just need to add “\nNotes: $SERVICEACKCOMMENT$”  before “/bin/mail” as shown in below command definition:

# vim /usr/local/nagios/etc/objects/commands.cfg
# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nNotes: $SERVICEACKCOMMENT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

 Save and exit.

Thats it, reload nagios service  - /etc/init.d/nagios reload

Now acknowledge any WARNING/CRITICAL alert and check the mail along with the comment/acknowledgement.

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=,<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* 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