In trying to monitor some logs files which are in a new directory each day, I
was hoping I might be able to use the UNIX environment variables in my command
string... So I export the variables YEAR, MONTH, and DAY from /etc/profile and
/etc/bash.bashrc (then restarted, of course), but when I try to use them in my
command template (e.g. '...log\${YEAR}${MONTH}${DAY}\...'), I get the following
error:
Type: KeyError
Value: 'YEAR'
Traceback (innermost last):
* Module ZPublisher.Publish, line 114, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 40, in call_object
* Module Products.ZenModel.BasicDataSource, line 164, in
manage_testDataSource
* Module Products.ZenModel.RRDDataSource, line 202, in getCommand
* Module Products.PageTemplates.Expressions, line 224, in __call__
* Module Products.PageTemplates.Expressions, line 185, in __call__
* Module Products.PageTemplates.Expressions, line 173, in _eval
* Module Products.PageTemplates.Expressions, line 123, in _eval
__traceback_info__: YEAR
KeyError: 'YEAR'
...Obviously it's not finding an environment variable to match. Any tips on how
I could do this?
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=31871#31871
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users