Differences between revisions 53 and 54

Deletions are marked like this. Additions are marked like this.
Line 55: Line 55:
Add the following content to the /etc/profile.
 {{{
export VIEWPOINT=/home/vwpoint/viewPoint
export LD_LIBRARY_PATH=/home/vwpoint/viewPoint/lib:$LD_LIBRARY_PATH }}}

Create environment files in /etc/profile.d/

oraenv.sh
{{{
ORACLE_SID=XE;export ORACLE_SID
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH;export PATH
}}}


gnwenv.sh
{{{
VIEWPOINT=/home/vwpoint/viewPoint; export VIEWPOINT
LD_LIBRARY_PATH=/home/vwpoint/viewPoint/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
}}}


----

Installing Monitoring Software


Sync Production Node Software

Login as vwpoint or root

Use rsync to copy all the contents over.

  • rsync -avprz --exclude=".ssh" cablegnw.globalnetwatch.com:/home/vwpoint/ /home/vwpoint/
    chown root /home/vwpoint/viewPoint/bin/pingAgent
    chmod +s /home/vwpoint/viewPoint/bin/pingAgent
    

Edit the .bash_profile and add the following content. [Note: Change the address of GNW_DBSERVER to the server ip you want to send back data to]

  • export VIEWPOINT=/home/vwpoint/viewPoint
    export EMAILLIST=maint@globalnetwatch.com
    export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    export ORACLE_SID=XE
    export LD_LIBRARY_PATH=${ORACLE_HOME}/lib
    export GNW_DBSERVER=10.199.199.120
    export GNW_SERVERLEVEL=secondary
    export PATH=${PATH}:/sbin:/usr/sbin:.:${ORACLE_HOME}/bin
    

Add the following to .bashrc

  • # Aliases for vwpoint's most accessed directories
    # GNW  Directories
    alias gnwbin='cd ${VIEWPOINT}/bin'
    alias gnwtls='cd ${VIEWPOINT}/tools'
    alias gnwchk='cd ${VIEWPOINT}/checks'
    alias gnwinb='cd ${VIEWPOINT}/var/dataUpdate/inbound'
    alias gnwvar='cd ${VIEWPOINT}/var'
    # Netwatch Start/Stop
    alias gnwstart='${VIEWPOINT}/bin/startNetWatch.sh'
    alias gnwstop='${VIEWPOINT}/bin/stopNetWatch.sh'
    

Now since most of the check scripts run as bourne shell you need to add the following content to the .profile file. [Note: Change the address of GNW_DBSERVER to the server ip you want to send back data to]

  • export PATH=$PATH:$HOME/bin
    export EDITOR=vi
    export VIEWPOINT=/home/vwpoint/viewPoint
    export EMAILLIST=maint@globalnetwatch.com
    export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    export ORACLE_SID=XE
    export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${VIEWPOINT}/lib
    export GNW_DBSERVER=10.199.199.100
    export GNW_SERVERLEVEL=secondary
    export PATH=${PATH}:/sbin:/usr/sbin:.:${ORACLE_HOME}/bin:${VIEWPOINT}/bin
    


Create root User Environment

Create environment files in /etc/profile.d/

oraenv.sh

ORACLE_SID=XE;export ORACLE_SID
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH;export PATH

gnwenv.sh

VIEWPOINT=/home/vwpoint/viewPoint; export VIEWPOINT
LD_LIBRARY_PATH=/home/vwpoint/viewPoint/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH


As root setup the folders /data/extra and /data/tmp.

  • rsync -avprz cablegnw.globalnetwatch.com:/data/ /data/
    


Configure Node Software

  • Edit /home/vwpoint/viewPoint/etc/serviceAgents.xml and configure the number of agent instances

  • Remove all files from the log folder

  • Remove all files from the postData folder

  • Remove all files from the var folder

  • Create a file under var with the ip address of the GNW server that you want this node to report to

  • Remove all files from the var/dataUpdate/inbound and var/dataUpdate/tmp folders


Configure Background Cron Jobs

Edit vwpoint users crontab with crontab -e and add the following content.

  • ########################################################################
    # Standard Secondary Processing
    #
    # This runs under vwpoint user.  Check root's crontab for more entries
    
    # upload the new updated database information
    4,9,14,19,24,29,34,39,44,49,54,59 * * * * . /home/vwpoint/.profile; ${VIEWPOINT}/bin/rcvNetWatchData
    
    # Daily shutdown and startup.
    4 5 * * * . /home/vwpoint/.profile; /home/vwpoint/viewPoint/bin/stopNetWatch.sh
    5 5 * * * . /home/vwpoint/.profile; /home/vwpoint/viewPoint/bin/startNetWatch.sh
    
    #Ensure that the disk space utilization is within daily limits
    3 9 * * * . /home/vwpoint/.profile; ${VIEWPOINT}/checks/fileSystemStatus.sh 80%
    
    #Ensure that the disk space utilization is within hourly limits
    5 * * * * . /home/vwpoint/.profile; ${VIEWPOINT}/checks/fileSystemStatus.sh 85%
    
    #Ensure that the inbound queue is not stuck
    5,20,35,50 * * * * . /home/vwpoint/.profile; ${VIEWPOINT}/checks/checkUpdateInboundQ.sh
    
    #Ensure that the system is running
    7,17,27,37,47,57 * * * * . /home/vwpoint/.profile; ${VIEWPOINT}/checks/CheckNodeHealth.sh
    
    # Check snapshot directories for stuck files
    47 9 * * * . /home/vwpoint/.profile; ${VIEWPOINT}/bin/snapshotCheckNode.sh
    
    ########################################################################
    # Node specific processing
    #########
    

Login as root and edit the crontab with crontab -e and append the following content.

  • #Cleanup up the daily files
    8 8 * * * . /home/vwpoint/.profile; ${VIEWPOINT}/checks/NodeCleanMaster.sh >> /dev/null
    


Configure Shared Library

Create a new file /etc/ld.so.conf.d/viewPoint.conf with the following content.

  • /home/vwpoint/viewPoint/lib
    

Then execute ldconfig to update the shared library cache. You will have to press return twice.

  • ldconfig
    

Then do the following to verify that it is configured correctly.

  • ldconfig -v | grep viewPoint
    


Configure Email Server

The default sendmail configuration on RedHat/Fedora only listens on 127.0.0.1. All GNW nodes need to be able to receive email from the server. This email contains the configuration information telling the node what to monitor. There is a line in /etc/mail/sendmail.mc that looks like this:

  • dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
    

As root you need to comment out that line by adding "dnl" to the beginning then rebuild the sendmail.cf file:

  • # cd /etc/mail
    # cp sendmail.cf sendmail.cf.orig
    # m4 sendmail.mc > sendmail.cf
    # service sendmail restart
    

Still as root edit the /etc/aliases file and add the following content

  • root:   maint@globalnetwatch.com
    # email from the server (for vwpoint) is processed by this program
    vwpoint: "| emailMsgSave.sh -v /home/vwpoint/viewPoint"
    

Now make the new aliases affective:

  • # newaliases
    

Change directory to /etc/smrsh. In this directory create a symbolic link to the emailMsgSave executable. The smrsh program (used by sendmail) will only allow files in this directory to be executed from the /etc/aliases file.

  • cd /etc/smrsh
    ln -s /home/vwpoint/viewPoint/bin/emailMsgSave.sh
    

Change directory to /home/vwpoint/viewPoint/bin. Set the sticky bit on emailMsgSave and emailMsgSave.sh

  • chmod 6755 emailMsgSave
    chmod 6755 emailMsgSave.sh
    

To allow outgoing email add the following line to the /etc/hosts.allow file

  • sendmail:  localhost
    

Check the /etc/hosts file. The order of listing is important. The word localhost should come after the address. Use the following format:

  • 127.0.0.1       localhost nodename.globalnetwatch.com nodename localhost.localdomain
    

Now restart the mail server.

  • service sendmail restart
    

To evaluate your sendmail server settings.

  • echo '$=w' | /usr/sbin/sendmail -bt -d0.4
    


Configuring Node in Server Database

Login to the server as vwpoint user. Login to sqlplus as the vwpoint user. Insert the new node into the MONITOR_NODE and VALIDNODELIST tables.

  • insert into monitornode 
    values (40, 'devnodefc4.globalnetwatch.com', '10.199.199.155', 
            'Development Node - Fedora Core 4 Platform', 0, 'A');
    
    insert into validnodelist values (200, 40, 'Dev Node FC4', 0, 0);
    
    commit;
    

Now flush the change out to the nodes.

  • sndNetWatchData
    


Start the Node Software

Ensure your GNW_SERVERLEVEL is set to 'secondary' and the your GNW_DBSERVER has the correct IP address.

  • [vwpoint@devnodefc4 ~]$ env | grep GNW
    GNW_SERVERLEVEL=secondary
    GNW_DBSERVER=10.199.199.100
    

Finally, start the node software with the alias gnwstart.

  • gnwstart
    

Installing Monitoring Software (last edited 2019-11-08 21:58:00 by EricC)