HLRmon for WeNMR

HLRmon web page: https://hlrmon-01.pd.infn.it:50080

Access reserved to registered users


Management instructions

Add data of sites not using DGAS sensors

  • after receiving data from administrators of sites, use the following script to insert data into DB hlrmon (see instructions inside the script):
    • hlrmon-external_data.sh

Add a user

Users are identified by their certificates, signed by trusted CAs. To register a new user, add an entry in mysql DB on hlrmon-01; example:

mysql -h 127.0.0.1 -u root -p
mysql> use hlrmon;
mysql> INSERT INTO users (dn, u_role,u_where, validity, user_confirm, admin_confirm, enabled, email) VALUES ("/C=IT/O=INFN/OU=Personal Certificate/L=LNL/CN=Simone Badoer","hlrmon_man",NULL,NULL,NULL,NULL,1,"badoer@pd.infn.it"); 
A new user can sign up via web page. As a new user sign up, a number or new rows appear on this 'users' table, one row for each role selected by the user. Every line waiting for authorization has the field enabled=0. To authorize that role for the user, by hand, you can simply update the value putting enabled=1.

Installation instructions

Followed these guides:

Steps executed on hlrmon-01.pd.infn.it (SL5 x86_64)

chkconfig myslqd on
service mysqld start
/usr/bin/mysqladmin -u root password 'rootpw'
/usr/bin/mysqladmin -u root -h hlrmon-01.pd.infn.it password 'rootpw'
mysql -h 127.0.0.1 -u root -prootpw
mysql> create database hlrmon;
mysql> grant all on hlrmon.* to 'hlrmonuser'@'localhost' identified by 'hlrmon-pw';
mysql> grant all on hlrmon.* to 'hlrmonuser'@'hlrmon-01.pd.infn.it' identified by 'hlrmon-pw';
mysql> flush privileges; 

mysql -u hlrmonuser -p hlrmon < /opt/hlrmon/hlrmon_initial_schema_and_data_prod.sql
  • edited /opt/hlrmon/db_conn.conf changing:
    • dbprm={'dbhost':'hlrmon-01.pd.infn.it','dbname':'hlrmon','dbuser':'hlrmonuser','dbpwd':'hlrmon-pw'}
  • edited /opt/hlrmon/dgas2hlrmon.conf changing:
    • hlrdict={'2l_HLR':'grid-2lhlr-01.pd.infn.it'}
    • HLRMON_DB_UPDATE=1
    • dict( select_field= "CASE SUBSTRING(SUBSTRING_INDEX(griduser,'/',3), LENGTH(SUBSTRING_INDEX(griduser, '/', 2)) + 2) WHEN 'DC=test' THEN 'Test' ELSE 'CAs' END",
  • last line is a fake: it should be used to aggregate accounting data by different CAs, but I don't know which are enmr.eu CAs, so I leave only one a void group (Test) and a general group (named CAs)
  • on the 2nd level HLR, grid-2lhlr-01.pd.infn.it, it's necessary to allow hlrmon-01 to access data:
[grid-2lhlr-01]#/opt/glite/sbin/glite-dgas-hlr-addadmin -a "/C=IT/O=INFN/OU=Host/L=Padova/CN=hlrmon-01.pd.infn.it" -H 
  • test:
[hlrmon-01]#glite-dgas-hlr-query -H grid-2lhlr-01.pd.infn.it -Q sqlCsv -A "select * from jobTransSummary order by endDate desc limit 1"
[hlrmon-01]#cd /opt/hlrmon
[hlrmon-01]#./dgas2hlrmon.py 20110104 1 
  • edited /var/www/html/hlrmon/include/config.php changing:
    • DB stuff
    • server URL
    • smarty_dir directory
    • the server_dir
    • The registration_email (the address where the requests from new users are sent)
    • The web title of the HLRmon instance
  • edited /etc/php.ini adding:
    • ; HLRMon
    • include_path = ".:/var/www/jpgraph-1.19:/usr/share/pear/:/usr/share/smarty/"
  • edited /etc/httpd/conf.d/ssl.conf changing:
    • Listen 50080
  • edited changing:
  • add administator user
mysql -h 127.0.0.1 -u root -p
mysql> use hlrmon;
mysql> INSERT INTO users (dn, u_role,u_where, validity, user_confirm, admin_confirm, enabled, email) VALUES ("/C=IT/O=INFN/OU=Personal Certificate/L=LNL/CN=Simone Badoer","hlrmon_man",NULL,NULL,NULL,NULL,1,"badoer@pd.infn.it");
mysql> INSERT INTO users (dn, u_role,u_where, validity, user_confirm, admin_confirm, enabled, email) VALUES ("/C=IT/O=INFN/OU=Personal Certificate/L=LNL/CN=Simone Badoer","roc_man",NULL,NULL,NULL,NULL,1,"badoer@pd.infn.it"); 
  • get site information:
cd /opt/hlrmon/utilities
./get_site_status.py 
  • edit /etc/sudoers and comment the line:
    • # Defaults requiretty

  • started http
chkconfig httpd on
service httpd start 

  • get vo information
cd /opt/hlrmon/utilities
./get_vo_disciplines.py
cd /var/www/html/hlrmon/report/
./get_discipline.sh
  • got this error:
    • Error A plot has an illegal scale. This could for example be that you are trying to use text autoscaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only '-' or 'x')

  • edited /etc/cron.d/hlrmon-plots.cron changing:
    • 30 7 * * * root cd /var/www/html/hlrmon/report && ./get_discipline.sh > /dev/null 2>&1

  • edited /etc/cron.d/hlrmon.cron changing: * 15 4 * * * root cd /opt/hlrmon && ./dgas2hlrmon.py `/bin/date +\%Y\%m\%d` 40

-- MarcoVerlato - 2012-03-08

Topic revision: r1 - 2012-03-08 - MarcoVerlato
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback