MoniFarm
From EGEE-see WIki
Contents |
What is MoniFarm?
MoniFarm is a script that collects data from a local batch system and from a local CE GRIS (Glue Schema v1.2) and store the results in a Round Robin Database (RRD) using the rrdtool programme from Toby Oetiker. It is developed by David Groep from NIKHEF.
These notes are based on AEGIS01-PHY-SCL experiences. Configuration file used on AEGIS01-PHY-SCL, as well as html files that display generated graphs, are available on http://glite.phy.bg.ac.yu/monifarm/
How MoniFarm works? When you install it, you have basically two executable perl scripts in /opt/monifarm/bin: monifarm and plotfarm. First script gathers data from local batch system and CE GRIS, and stores it in a local database (two files in /opt/monifarm: monifarm-lrms.rrd and monifarm-gris.rrd), while the second script plots graphs. Configuration file is /opt/monifarm/etc/monifarm.conf, and all generated graphs are by default put in /var/www/html (can be changed in the configuration file). To display graphs, there are three template html files, by default located in /opt/monifarm/share/doc/monifarm-0.1/www/. These files should be copied to /var/www/html and adjusted accordingly.
All details regarding installation are available from http://www.nikhef.nl/pub/projects/grid/gridwiki/index.php/MoniFarm_Utilities
Examples of what MoniFarm does can be seen at the following links:
http://www.nikhef.nl/grid/stats/ndpf-prd/
MoniFarm should be installed on a machine that has web server installed, that is allowed to query local batch system, and that has installed OpenLDAP client so that it can query CE GRIS. This can be CE if it has working web server installed; if not, you can still install MoniFarm on CE, but transfer generated graphs on another machine (web server); in this case, html files used for displaying graphs should be transfered to this machine.
Here we cover what should be put in /opt/monifarm/etc/monifarm.conf - MoniFarm configuration file. After this file is created, you should execute
/opt/monifarm/bin/monifarm --create
and ensure that monifarm and plotfarm are executed regularly from cron, as explained in NIKHEF installation notes.
All details from /opt/monifarm/etc/monifarm.conf that possibly need adjustment are mentioned below.
Location of the local RRD databases
$rrdb_lrms="/opt/monifarm/monifarm-lrms.rrd"; $rrdb_gris="/opt/monifarm/monifarm-gris.rrd";
Location of the CE GRIS LDAP server
These variables should provide GLUE v1.2 compatible data. Example:
$gris_ldap_url="ldap://ce.phy.bg.ac.yu:2135/"; $gris_ldap_base="mds-vo-name=local,o=grid";
If you are querying gliteCE, then port should be 2170, and $gris_ldap_base="mds-vo-name=resource,o=grid".
Hostname of the LRMS server ("pbs_server")
$lrms_host="ce.phy.bg.ac.yu";
Where to put the PNG plots (graphs) from plotfarm
$webdir="/var/www/html";
VO definitions
@vodefinitions=(
{
"name" => "aegis",
"fullname" => "AEGIS VO",
"accountmap" => "g:aegis",
"voviewname" => "aegis",
"colour" => "6060c0"
}
);
This example record contains definition for AEGIS VO. Here important part is accountmap, where you should specify which groups belong to this definiton. You can add as well some individual accounts here (if they are not part of generic VO groups) using syntax like this:
"accountmap" => "g:aegis u:aegissgm"
Note that this allows you to create fake "VO" for local usage overview (jobs submitted locally, not through grid) - just create additional VO definition, name it somehow, and provide account mapping (example is given in /opt/monifarm/etc/monifarm.conf.example)
It is also important to note here that if you want to add more VOs later, all history data will be lost. Therefore, put some dummy VO definitions in monifarm.conf, so that you can later use them for new VOs. Helping detail is that if you don't define colour for a VO, it won't be shown; this way dummy VOs will be skipped until they are needed and properly defined.
