TSM Status Monitor - Another reporting tool for TSM

The documentation is for Redhat5/Centos5. But Ubuntu 9.10 might work with some tweaks.

JeanSeb, are yu getting any errors in the web interface and/or apache logs?
 
Thanks for the answer pallsigurdson :) No, basically i point my browser to htp://myurl.org/statmon/, but no page pops up as a defaut "index.html" if you will. Apache give me a listing of all the files instead. Should a .py file in there be interpretated as the main page for statmon by Apache but it's not ?
 
Hmm well the file /var/www/statmon/.htaccess should exist and apache should be configured to read .htaccess files. Might be that you are lacking some apache configuration.

Try creating a /etc/apache2/conf.d/statmon-apache.conf that looks something like this:
#-------------------------------------------
<Directory "/var/www/statmon">
Options Indexes FollowSymLinks
AllowOverride FileInfo AuthConfig Limit Indexes
Order deny,allow
#Allow from all
</Directory>
#-------------------------------------------


Opviously the "Allow from all" statement needs to be either uncommented or changed.

Then reload apache configuration with /etc/init.d/apache reload
 
On second thought. Noticed the latest tarball does not include .htaccess!

Create /var/www/statmon/.htaccess with the following content:

SetHandler mod_python
PythonHandler statmonHandler::handler
PythonDebug On
PythonInterpPerDirective On


ps: Also hacked a bit with the project this weekend, latest version on github now supports TSM 6.x
 
all config files are as expected, but keeps bailing out...

Code:
Thu Sep 30 15:27:48 2010] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 configured -- resuming normal operations
[Thu Sep 30 15:27:48 2010] [info] Server built: Apr 19 2010 19:57:58
[Thu Sep 30 15:27:48 2010] [debug] prefork.c(1032): AcceptMutex: sysvsem (default: sysvsem)
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.html denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.cgi denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.pl denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.php denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.xhtml denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/statmon/index.htm denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.html denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.cgi denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.pl denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.php denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.xhtml denied
[Thu Sep 30 15:30:30 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /statmon/core/index.htm denied
[Thu Sep 30 15:30:32 2010] [notice] mod_python (pid=16330, interpreter='daniel.edvz.uni-linz.ac.at'): Importing module '/var/www/statmon/statmonHandler.py'
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] mod_python (pid=16330, interpreter='daniel.edvz.uni-linz.ac.at', phase='PythonHandler', handler='statmonHandler'): Application error, referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] ServerName: 'daniel.edvz.uni-linz.ac.at', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] DocumentRoot: '/var/www/', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] URI: '/statmon/statmonHandler.py', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] Location: None, referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] Directory: '/var/www/statmon/', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] Filename: '/var/www/statmon/statmonHandler.py', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] PathInfo: '', referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] Traceback (most recent call last):, referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent), referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target\n    module = import_module(module_name, path=path), referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 296, in import_module\n    log, import_path), referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1]   File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 680, in import_module\n    execfile(file, module.__dict__), referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1]   File "/var/www/statmon/statmonHandler.py", line 5, in <module>\n    from statmon.defaultConfig import config, referer: http://localhost/statmon/
[Thu Sep 30 15:30:32 2010] [error] [client 127.0.0.1] ImportError: No module named statmon.defaultConfig, referer: http://localhost/statmon/
 
linuxdomination, looks like a permission problem. Make sure the apache user has read access to /var/www/statmon directory.

Looks to me like you are running on Debian-based system, by default the apache user is called 'www-data'

Try running these commands to fix the problem:
# chown -R www-data /var/www/statmon
# chmod -R 750 /var/www/statmon/



If problem persists, check /var/log/apache2/*log for clues.
 
shame on me...the permisions were indeed cranked up....

logs are clean now
Code:
Fri Oct 01 07:26:00 2010] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 configured -- resuming normal operations
[Fri Oct 01 07:26:00 2010] [info] Server built: Apr 19 2010 19:57:58
[Fri Oct 01 07:26:00 2010] [debug] prefork.c(1032): AcceptMutex: sysvsem (default: sysvsem)
[Fri Oct 01 07:26:49 2010] [notice] mod_python (pid=9209, interpreter='daniel.edvz.uni-linz.ac.at'): Importing module '/var/www/statmon/statmonHandler.py'
[Fri Oct 01 07:27:23 2010] [notice] mod_python (pid=9211, interpreter='daniel.edvz.uni-linz.ac.at'): Importing module '/var/www/statmon/statmonHandler.py'

but still only get directory listing or "
Forbidden

You don't have permission to access /statmon/statmonHandler.py on this server."


well, this python stuff is really strange..any hints?
 
Agreed, mod_python is not the easiest to troubleshoot.

Questions:
1) What are the permissions of /var/www/statmon/statmonHandler.py ?
2) What are the contents of /etc/apache2/conf.d/statmon-apache.conf ?
3) What are the contents of /var/www/statmon/.htaccess ?
 
here we go...:)

permissions under /var/www/statmon (everything under statmon isv 750)
Code:
total 96K
drwxr-x--- 6 www-data www-data 4.0K 2010-09-20 16:11 core
-rwxr-x--- 1 www-data www-data  35K 2010-09-09 12:15 LICENSE
-rwxr-x--- 1 www-data www-data 4.0K 2010-09-09 12:11 README
drwxr-x--- 6 www-data www-data 4.0K 2010-09-20 16:11 statmon
-rwxr-x--- 1 www-data www-data 1.3K 2010-09-30 15:30 statmonConfig.xml
-rwxr-x--- 1 www-data www-data 2.3K 2010-09-09 12:12 statmonHandler.py
Code:
daniel:/var/www/statmon# cat /etc/apache2/conf.d/statmon-apache.conf
<Directory "/var/www/statmon/">
  Options Indexes FollowSymLinks
  AllowOverride FileInfo AuthConfig Limit Indexes
  Order deny,allow
  #Allow from all
</Directory>
Code:
daniel:/var/www/statmon# cat /var/www/statmon/.htaccess
SetHandler mod_python
PythonHandler statmonHandler::handler
PythonDebug On
PythonInterpPerDirective On
 
Great software. Please find attached our patch for TSM version 6.
 

Attachments

  • statmon-1.2-tsm6-updated.patch.gz
    8.1 KB · Views: 86
Last edited:
Hi Pallsigurdsson,

I have installed your software on to a RHEL5 Server and it is now collecting data from my tsm server. There is a wealth of data there for me to use for reporting purposes which is great. The only issue I seem to be having is that some of the graphs are not whowing any data whereas others are. e.g on the home page the 'Daily Amount of Backup' graph is showing data but the others are not. I wondered if you could point me in the right direction?

Thanks Andy
 
Andy,
From my experience, if you type on graph you will get down to debug message. Or check /tmp/debug.lo.

Alex.
 
Hi hi

I have installed the newest packed found on Github, Version 1.2. I am trying to collect data from four servers but I have some problems.

Collecting and web server is Centos 5.5. Web pages for all four servers are shown normally. Collection for two of them fails with error at excatly same place.

TSM Servers:
Linux Redhat TSM 5.5.5.0 (collection working fine)
AIX 6.x TSM 6.2.2.0 (collection not working)
AIX 6.x TSM 6.2.2.2 (collection not working)
AIX 6.x TSM 6.1.3.1 (collection working fine)

Errors:
File "collector.py", line 364, in ?
if __name__ == '__main__': main()
File "collector.py", line 67, in main
collector.run()
File "collector.py", line 92, in run
tmp.run()
File "collector.py", line 143, in run
self.end()
File "collector.py", line 137, in end
self.local.query(query)
File "/var/www/html/server2/statmon/datasource.py", line 62, in query
count = self.cursor.execute(string)
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, "Column 'node_name' cannot be null")

Does anyone know what this is about?
regards Herning
 
Last edited:
Hello

Nobody using Statmon on TSM 6.2.2.x?

I was adding the fifth server to my Statmon enviroment. This server is running Redhat and TSM version 6.2.1.0. Collection works fine.
So I'm wondering if this is related to version 6.2.2.x of TSM servers.

regards Herning
 
Hi
I have one instance for each server.

My problem stops in here on two servers:
class Occupancy_snapshot(Job):
items = 'node_name,filespace_id,stgpool_name,type,num_files,physical_mb,logical_mb'
selectQuery = 'select %s from occupancy'

Herning
 
Back
Top