Skip to main content

Advanced configuration topics

Global status script

An icon in the top banner can be animated using a script. This script can be defined in Global configuration, using the parameter GlobalStatusFile:

 


 

This script must write the following to the standard output :

<unique id>,<severity>,<message>

1.       The unique id should uniquely identify the nature of the message.

2.       The  severity must be either OK,INFO, WARNING or CRITICAL

3.       The  message is free format on a single line.

 

The following script can be used as a sample


cd `dirname $0`
mquery -n $CellName -a PROACTIVEPACK_DB_IMPORT_EV -w "\$THIS.status == OPEN" -q -s mc_ueid,severity,msg -f CSV
InfoId="Last 12 minutes MAJOR-CRITICAL Count";
InfoSeverity=CRITICAL;
NowTS=$(date +%s)
NowDate=$(date)
TenMinBeforeTS=$(($NowTS - 600))
InfoCount=$(mquery -n $CellName -a EVENT -w "\$THIS.mc_arrival_time > $TenMinBeforeTS AND \$THIS.severity within [MAJOR,CRITICAL] " -q -s COUNT)
InfoMessage="Il y a $InfoCount events CRITICAL sur les 10 dernieres minutes"
echo "$InfoId,$InfoSeverity,$NowDate: $InfoMessage";

Using this script

echo "Welcome,INFO,INFO Message: Happy to see you";
echo "Welcome,WARNING,WARNING Message: Happy to see you";
echo "Welcome,CRITICAL,CRITICAL Message: Happy to see you";

 Will give this output:

image.png

 Custom message catalogs

You can create custom message catalogs under $PRODUCT_HOME/config/custom/locale

These message catalogs can be used to provide labels for custom event slots, or override existing labels.

You can create message catalog files named :

-       messages.all – covers all languages

-       messages.<language> - covers a specific language

 

E.G. to set a label of a custom event slot, use entries of the type :

ESlot_<slotname>=<slot label>