Module Expr Str Import alias Import alias Import alias Import alias ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str ListLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num If CompareIs NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Continue TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad decorator_list decorator_list
N/A N/A 
Collect the age in seconds of one or more files. An alias may be assigned
in place of the actuall file name. If no alias is included the base filename
will have dots replaced with underscores and be used as the metric name.



#### Dependencies


#### Example Configuration

FileAgeCollector.conf

```
    enabled = True
    paths = MyMetricName@/somepath/to/somefile.file, /somepath/to/somefile.file
```
 N/A diamond.collector N/A os N/A time N/A re FileAgeCollector N/A N/A N/A diamond collector Collector N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A self __totals N/A N/A N/A N/A N/A super FileAgeCollector self __init__ args kwargs N/A get_default_config_help N/A N/A self N/A N/A N/A config_help N/A N/A N/A super FileAgeCollector self get_default_config_help N/A N/A N/A config_help update N/A paths Array of paths to collect info on.Add an alias by prefixing with alias@ N/A config_help N/A get_default_config N/A N/A self N/A N/A N/A 
        Returns the default collector settings
         N/A config N/A N/A N/A super FileAgeCollector self get_default_config N/A N/A N/A config update N/A paths N/A /tmp N/A config N/A collect N/A N/A self N/A N/A N/A paths N/A N/A N/A self config get paths N/A N/A isinstance paths basestring N/A N/A paths N/A paths N/A path paths N/A N/A matches N/A N/A re search ((.+)\@)?(.+)? path N/A alias N/A N/A matches group 2 N/A myfile N/A N/A matches group 3 N/A N/A alias None N/A N/A N/A N/A filename N/A N/A N/A os path basename path N/A alias N/A N/A filename replace . _ N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self log error Could not derive bucket name: %s e N/A N/A N/A N/A test N/A open myfile N/A N/A N/A IOError N/A N/A N/A N/A N/A self log error Unable to access file: %s myfile N/A N/A stats N/A N/A os stat myfile N/A fileage N/A N/A N/A time time N/A stats st_mtime N/A N/A N/A self publish alias fileage N/A alias None N/A N/A