Lemon Installation for GT Virtual Testbed

Server installation

A SLC4 64 virtual machine has been created using vNode: vtb-generic-45.cern.ch, with:
# cat /etc/redhat-release 
Scientific Linux CERN SLC release 4.8 (Beryllium)
# uname -a
Linux vtb-generic-45.cern.ch 2.6.9-78.0.13.EL.cernxenU #1 SMP Mon Jan 19 14:11:02 CET 2009 x86_64 x86_64 x86_64 GNU/Linux

The documentation for installing Lemon is here. The instructions for a flat file based server installation have been followed. A client installation will been done on the same host in order to do some preliminary tests.

The following repo file have been created:

[root@vtb-generic-19 yum.repos.d]# cat lemon.repo 
[lemon]
name=Lemon
baseurl=http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/
enabled=1
gpgcheck=1
gpgkey=http://linuxsoft/lemon/RPM-GPG-KEY-lemon

[root@vtb-generic-19 yum.repos.d]# cat lemon-server.repo 
[lemon-servers]
name=Lemon Servers
baseurl=http://linuxsoft.cern.ch/lemon/cern/
enabled=1
gpgcheck=1
gpgkey=http://linuxsoft/lemon/RPM-GPG-KEY-lemon
In order to solve some dependencies issues, some additional rpms have been downloaded directly from the repository http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/:
# wget http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/apr-1.2.9-1.x86_64.rpm
# wget http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/apr-util-1.2.8-1.x86_64.rpm

# rpm -ivh apr-1.2.9-1.x86_64.rpm
# yum install postgresql-libs
# rpm -ivh apr-util-1.2.8-1.x86_64.rpm

# yum install lemon-server
# yum install lemon-admin

Pysqlite2 needs to be installed as well if you plan to use an sqlite db:

#  wget http://pysqlite.googlecode.com/files/pysqlite-2.6.0.tar.gz
# tar -xvzf pysqlite-2.6.0.tar.gz
# cd pysqlite-2.6.0
# python setup.py build_static install

Server Configuration

# ls -l /etc/lemon-server-metadata.conf
-rw-r--r--  1 root root 174730 Aug 12  2008 /etc/lemon-server-metadata.conf
# usermod -a -G root lemon
# id lemon
uid=100(lemon) gid=103(lemon) groups=103(lemon),0(root)
# lemon-admin --backend=sqlite --create-schema
        Creating metadata structure.
                Processing file: flat/metric_tables.sql
                DDL successfull


# lemon-admin --backend=sqlite --create-schema > lemon-admin --backend=sqlite --all --file=/etc/lemon-server-metadata.conf
At this point the lemon database should be present in /var/lib/lemon-server/lemon.db

The file /etc/sysconfig/lemon-server has not been modified since it contains only Oracle information and we are not planning to use an Oracle database.

The file /etc/lemon/server/lemon-server.conf has been modified to enable the sqlite3 database:

 /* sqlite3 */
 filename   = "/var/lib/lemon-server/lemon.db";
 timeout    = 15;
 driver     = "/usr/lib64/lemon-server/libsqlite.so";

At this point the server should correctly (look at /var/log/lemon-server.log)

# /etc/init.d/lemon-server start 
Starting lemon-server:                                     [  OK  ]

Client installation

We want to install an agent and at least one sensor on the same server machine in order to validate the deployment.
# yum install lemon-agent
# yum install lemon-sensor-linux
The configurations file holding details about sensors and metrics, located in /etc/lemon/agent/*.conf have not been modified.

The agent process has been started enabling the debug mode:

# /etc/rc.d/init.d/lemon-agent start -d
Starting lemon-agent:                                      [  OK  ]

Metrics looks correctly accumulated in _ /var/spool/lemon-agent/vtb-generic-45/_, e.g:

# more /var/spool/lemon-agent/vtb-generic-45/last.00004115 
1273223935      GenuineIntel Intel(R)_Xeon(R)_CPU___________E5410__@_2.33GHz 2327 37281 8 8

Tests

In order to validate the installation, the CLI has been installed on the same host:
# yum install lemon-cli
To get usage info on the CLI use the '--help' option.

Check MSA.alive metric with:

# /usr/sbin/lemon-cli --metrics="alive"
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 12:00:32 2010 on vtb-generic-45.cern.ch
[VERB] Nodes:      vtb-generic-45 
[VERB] Metrics:    10003 
[VERB] Method:     Latest
[VERB] 
[INFO] local:   vtb-generic-45  10003   Fri May  7 11:58:58 2010        1 2 2
[VERB] 
[VERB] Total: 1 result

In order to retrieve the list of available metrics do:

# lemon-cli --info
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 15:12:14 2010 on vtb-generic-45.cern.ch
[INFO] 32
[INFO]          Name:   cupsd
[INFO]          Class:  system.numberOfProcesses
[INFO] 43
[INFO]          Name:   crond
[INFO]          Class:  system.numberOfProcesses

[...]

A simple query to validate the installation to retrieve the metric 'CPUInfo' in a specified time interval:

# lemon-cli --start 1273220000 --end 1273225000 --nodes vtb-generic-45 --metrics CPUInfo
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 15:06:29 2010 on vtb-generic-45.cern.ch
[VERB] Nodes:      vtb-generic-45 
[VERB] Metrics:    4115 
[VERB] Start:      Fri May  7 10:13:20 2010 - 1273220000
[VERB] End:        Fri May  7 11:36:40 2010 - 1273225000 (difference: 5000 seconds)
[VERB] Method:     Historical
[VERB] 
[INFO] local:   vtb-generic-45  4115    Fri May  7 11:18:55 2010        GenuineIntel Intel(R)_Xeon(R)_CPU___________E5410__@_2.33GHz 2327 37281 8 8
[VERB] 
[VERB] Total: 1 result

Note that by default the query is run against the local cache (--localcache). In order to run the query against the local server you have to specify the option --server.

After installing (yum install lemon-xml-gateway) and configuring (/var/www/conf/lemon-xml-gateway.conf) the XML gateway, the same query using the --server option returns the following error:

# lemon-cli --nodes vtb-generic-45 --metrics 4115 --server --server-url 'http://vtb-generic-45.cern.ch/lemon-xml/xml_gateway.php'
[INFO] lemon-cli version 1.2.0 started by root at Mon May 10 13:50:15 2010 on vtb-generic-45.cern.ch
[DEBUG] Using modular configuration "/etc/lemon/agent" (conversion required)
[DEBUG] Executing: "/usr/bin/lemon-buildconfig -d /etc/lemon/agent"
[VERB] Nodes:      vtb-generic-45 
[VERB] Metrics:    4115 
[DEBUG] All Nodes: vtb-generic-45
[DEBUG] All Metrics: 4115
[VERB] Method:     Latest
[VERB] 
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr
Aborted

Lemon-web installation

TODO

-- GianniPucciani - 05-May-2010

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2010-05-10 - GianniPucciani
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback