Howto install and Configure a Regional MonaLisa Collector
Installing and Configuring a Regional MonaLisa Collector (MLrepository)
Useful links: MonaLisa Cluster Monitoring by Costin Grigoras [1]
1) Check your host definition file (linux: /etc/hosts file). Make sure your machine is properly listed
127.0.0.1 YourMachineName localhost.localdomain localhost
- 1 localhost6.localdomain6 localhost6
- 1 localhost6.localdomain6 localhost6
You might need other entries.
2) execute the command hostsname -f and make sure it returns your Fully Qualified Domain Name (FWDN).
3) Check that you have the correct java version. java -version It needs to be versin 1.6 or greater.
4) From a browser, download the Mona Lisa Repository tar ball from
http://monalisa.cern.ch/monalisa_Download_MonALISA_Service.html
and then click on the tab labeled "Downloads". From there get the latest version of the "MonALISA Repository Download".
5) The installer will want to make an account, or you can create one yourself (typically MonaLisa or some such thing).
It could be good to extract the tar ball you got in step 4) there.
6) NOT AS ROOT! extract the tar ball tar -zxvf MLrepository.tar.bz2. This will create a MLrepository directory. The INSTALL
file in MLrepository will give you the most up to date information.
7) check your firewalls to see that ports 8080 and 5432 are open (8080 and 5432 at the very least. Check files MLrepository/conf/ostgresql.conf
and storage_configuration.properties for the correct port numbers.). On many Linux systems under
the "System" tab, choose "Administration" and the application "Security Level and Firewall". Here you can see which ports
are "open" and for which protocols. If needed add 8080 as a tcp protocol port. This will require root privilege. nmap localhost
will show you which ports are open and being used (8080 should not be listed there until you start the repository).
8) Enter into MLrepository and run the install.sh script. If you created an account enter that account name. Do not start
the repository yet (no big deal if you did).
9) To display the google map on the web page, you will need to get a key from google.
i) go to the google web page
https://developers.google.com/maps/documentation/javascript/v2/introduction#Obtaining_Key
You will need a google account. If you don't have one you will be asked to create one. Click on the link to create the key. You will be shown
a long list of applications. Choose "google maps API v2" and switch it on. If you don't see this list, make sure the panel on the top left has
"Services" selected. Then select "API Access" and listed under "Simple API Access" will be some information including the key.
ii) Open the file MLrepository/tomcat/webapps/ROOT/map.jsp at about line 48 is listed
String sKey = "abunchoflettersandnumbers";
and replace the string with the key from the google page (copy and past so that you don't mistake an O for 0.
10) now from MLrepository execute the start.sh script.
11) In a browser enter the browser location "http://localhost:8080/" and this should display a MonaLisa page with a google map.
12) Now also try this with your machines tcp/ip name (for ALICE-USA I am using http://alice00.creighton.edu:8080).
If you get a massage that you need a google maps key, you did not do part 9 correctly.
13) Now stop the repository so that we can finish configuring it.
i) edit MLrepository/JStoreClient/conf/App.properties
Line containing "lia.Monitor.group =" should be equal to your group (for our case that is alice).
Line containing "lia.Monitor.Jiniclient.Store.predicates=" should list all of the sites/cluster/data to be collected and stored
in the repository (for ALICE-USA I have, at the moment,
LBL/ExternalScripts,LBL/Site_Jobs_Summary/*/,\
LBL/LBL_jobAgent_Summary/ce/,LBL/LBL_CE_Alice::LBL::CONDOR/*/,\
LLNL/Site_Jobs_Summary/*/,LLNL/LLNL_JobAgent_Summary/ce/,\
LLNL/LLNL_CE_Alice::LLNL::CREAM/*/,OSC/Site_Jobs_Summary/*/,\
OSC/OSC_JobAgent_Summary/ce/,OSC_CE_Alice::OSC::PBS/*/
where "\" is a continuation line.
NERSC Notes
The MonALISA starts a cron job. At NERSC, this cron job needs to be modified, because
they use a virtual OS system the OS needs to be chosen and properly initilized. To do
this modify the MLrepository/start.sh script. There the line
CRON=`crontab -l | grep -v -E -e "(scripts/verify.sh)|(^#.+(DO NOT)|(/tmp/crontab)|Cron version)"`
(echo "$CRON"; echo "* * * * * `pwd`/scripts/verify.sh >> `pwd`/scripts/verify.log 2>&1") | crontab -
should read
CRON=`crontab -l | grep -v -E -e "(scripts/verify.sh)|(^#.+(DO NOT)|(/tmp/crontab)|Cron version)"`
(echo "$CRON"; echo "* * * * * CHOS=sl64 /usr/bin/chos `pwd`/scripts/verify.sh >> `pwd`/scripts/verify.log 2>&1") | crontab -
The CHOS=sl64 chooses Scientific Linux 6.4 and the /usr/bin/chos make this work.
Adding additional information to the MonaLisa Collector
To add additional information which can be monitored by MonaLisa first that information must be collected
by the site's collector. The file which configures what data will be collected can be found in the
sites MonaLisa directory tree (~/MonaLisa/Service/myFarm). The file is called ml.properties. This file
configures many features of the local collector including what data will be collected. To collect information
that is not supported by an existing package (class) an External Script can be used. The command to be added
to the lm.properties files is
*ExternalScripts{monStatusCmd, localhost, "/path/to/the/command.sh"}%60
ExternalScripts is the existing class where this collected data is kept in.
monStatusCmd is the "Command/filter" which decodes the <tab> separated file of information.
localhost is the host name of the host where the data is located only experts should use
something other than localhost.
/path/to/the/command.sh is the shell script to be executed to collect and configure the data.
Its output should be in the form Property_Class<tab>Property_name_0<tab>Value_0 [...<tab>property_name_1<tab>Value_1]