How to generate alert message when MicroStrategy I Server goes down on Linux?


Intelligence Server is the essence of the MicroStrategy engine on which the enterprise BI platform of large organizations run. When the Intelligence Server service goes down the entire MicroStrategy platform is down. There are times when the Intelligence Server goes down abruptly and there could be multiple reasons leading to the same.
It is very important to understand the exact root cause for the failure and consider corrective actions accordingly. But before all that is done it is necessary that IT is alerted of the failure and communication is sent across to the business. In case of a high impact time, such as during month end when BI reports are an absolute necessity, steps need to be considered by IT to bring back the production system back to life immediately so that business impact could be minimized.

Thus it is very much important to have an alert mechanism in place which can send out alert emails when a failure of MicroStrategy Intelligence Server takes place. With MicroStrategy 10 now released we have Operations Manager which has got this capability in built; but in case you are still on a lower version or looking for an alternative here is a shell script which can help you achieve the monitoring capability.

The alert script is created to send an auto generated email from the LINUX environment whenever the I Server state changes from ‘running’. This alert script would thus notify the concerned teams whenever the I Server is stopped or terminated, thus helping them takes the necessary steps.
Along with providing the status of the Intelligence Server, the script would also show the paging space utilization for the Linux machine.

"
#! /usr/bin/ksh

istate=`/mstrsit/MicroStrategy/bin/mstrctl -s IntelligenceServer gs | grep -i state`;
istatus=`echo $istate | cut -f2 -d ">" | cut -f1 -d "<" `;
psused=`free -m -t|grep -i swap|cut -c24-29`;
pstotal=`free -m -t|grep -i swap|cut -c13-18`;
percent_usage=

if [ "$istatus" == "running" ]
then
  echo "`date` MicroStrategy IntelligenceServer on <I Server machine name> is running. Status: $istatus:: Paging Space Usage:$psused MB of$pstotal MB used (Percentage Usage: $((
psused % pstotal))
)"
else
  echo "`date` MicroStrategy IntelligenceServer on <I Server machine name> is NOT running. Status: "$istatus""
  echo "`date` Paging Space used : $psused MB Paging Space Total : $pstotal MB"
  echo "`date` Percentage Usage :  $((psused % pstotal)) "
  echo "Status: $istatus at `date` $Content MicroStrategy Intelligence Server is NOT running and current status is "$istatus" at `date`
  Paging Space information: $((psused % pstotal))% ($psused MB) used out of $pstotal MB
  Please check status ASAP.
  Sent automatically from Production BI Server. Please do not reply.

Please escalate this alert to MicroStrategy Support Team" | mailx -s "MicroStrategy I Server on <I Server machine name> is NOT running" "<Email ID 1>" "<Email Id 2>"


fi

"
The script could placed in a directory of the Linus server hosting Intelligence Server engine. The Linux user which is used to run the MicroStrategy I Server service should also have an execute access on the script.




The script can then be scheduled using the crontab scheduler to run after a specified interval, say 5 mins, and monitor status of the Intelliegence Server service. If I Server service is not in a running state it would generate an alert email to ids specified in the script.