QuatView
QuatView at the T2B
Installing Quatview
- Download the quatview from here http://sourceforge.net/projects/quattor/files/quatview/1.1.2/
- ccq3 is missing module named MySQLdb. For this you need to do
yum install python-devel yum install MySQL-python
Configuration Overview
- Quatview consists out of two parts, a backend and a frontend
- The backend is essentially a python script that fills a database (mysql) by parsing the xml templates from quattor
- The script is executed on ccq3
- The database is located on mon
- The frontend is a web page that queries this database and displays it's information
- The frontend is completely located on mon
Backend
- On mon:
- The database is located on mon since this machine will host the web-interface
- A new user needs to be created, this is quattor
- Make sure all privileges are set correctly for this user
- Add a database named quattor
- On ccq3:
- The python script to parse the xml files into the database can be found here /root/quatview/quatview-1.1.2
- The config file to run the quatview.py should be located here /etc/quatview.conf
- The runcheck script is extended with following lines to have the qautview script executed
sys.path.append('/root/quatview/quatview-1.1.2/') import quatview print "Executing quatview: filling the database" quatview.main() print "Executing quatview: done, exiting"
- REMARK: the ipmi feature is disabled
Frontend
- On mon:
- The web pages are located in /var/www/html/quatview/frontend/
- config.php; contains variables to connect to database
- index.php; web-interface to search the database
- myquery.php; home-brew php page that allows to query the database based on input given in the url
- The main webpage can be found here: http://mon.iihe.ac.be/quatview/frontend/
- To query the database given an address similar to: http://mon.iihe.ac.be/quatview/frontend/myquery.php?MACaddress=00:30:48:94:6D:80
Using the Quatview database
- Query the database through a web interface http://mon.iihe.ac.be/quatview/frontend/myquery.php?MACaddress=00:30:48:94:6D:80
- QR codes can easily be generated on this webpage: http://www.qrdvark.com/qr-generator/
- A sample QR code is here, try it out on your fancy smartphone :)
Tips and Tricks
- A good tool to work with mysql databases is phpmyadmin, this allows you to easily browse and manipulate your databases
- If you are new to mysql these page can help you:
mysql -h localhost -u quattor -p # connect to the database select * from mysql.user;# show all users show databases ; use database_name; show tables; select * from table_name;
- Some PHP pages that have helped