Oct 9, 2016

Caché Journaling Status Monitoring

In InterSystems Caché, Journals are the files that record the changes made to the Databases. 
The process are recording the Database changes is called Journaling.

Journaling Uses:
1. Record of changes made to Data
2. Supports restoring Data from backup
3. Supports Transaction processing
4. Protects Application Data
5. Prevents Data loss or inconsistent Data
6. Required for
a.      Shadowing
b.      Mirroring
c.       Shared-disk cluster configurations

In our Caché on AIX architecture, Journals are continuously shipped from Production Server (called as Primary Server) to Reporting Server (called as Secondary Server). Journal files are mounted on /journal file system.

Whenever the /journal file system becomes full, Journaling daemon tries multiple times to continue with the activity before getting Disabled. Journaling will not be Enabled automatically after additional Storage is added to /journal file system, and has to be done manually.

There is no direct approach for pro-active monitoring of the Journaling Status. I coded a simple Shell Script that’ll help in monitoring the Status. The Script is scheduled to run every 30 minutes, and email if the Journaling Status is found as Disabled.

#!/bin/ksh
DB_JRN_DET=/home/rfo7936/db_jrn_det
csession cache "Status^JOURNAL"    > $DB_JRN_DET
cat $DB_JRN_DET | grep -i enabled  > $DB_JRN_DET
if [[ -s $DB_JRN_DET ]] then RC=0
 else RC=1
fi
if (( $RC > 0 )) then
    mail -s "JOURNALING is disabled on $HOSTNAME"  <email ID>
    exit $RC
  else
    exit $RC
fi

No comments:

Post a Comment