file_dirs_names_service_plugin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Monasca |
New
|
Undecided
|
Unassigned |
Bug Description
Info:
Cannot configure ServicePlugin to watch file in directory
Reproduce:
Download master branch of monasca-agent
Execute: monasca-setup -d keystone -a "file_dirs_
Expected:
Plugin successfully created monitoring aforementioned files
Observed:
(monasca-agent) root@devstack:
Traceback (most recent call last):
File "/opt/monasca-
sys.
File "/opt/monasca-
skip_
File "/opt/monasca-
new_config = detect.
File "/opt/monasca-
conf = self.build_config()
File "/opt/monasca-
file_names = file_dir_name[1]
IndexError: string index out of range
It looks like iteration over file_dirs_names expects that argument will be parsed into an array, however it is still a string at this point therefore iteration goes by each character in this string.
For file_size and directory check, monasca-setup command line is not support it. Because depends on the files, the directory and file name combination can be very long. Right now, you can create your own customer defined detection plugin based on the template: https:/ /github. com/openstack/ monasca- agent/blob/ master/ monasca_ setup/detection /plugins/ file_size. py to run file_size check.