pavlovdo / pystormon

Zabbix storage monitoring via CIM/WBEM
16 stars 8 forks source link

No section: 'NetworkDevice' #4

Closed tommytnt83 closed 4 years ago

tommytnt83 commented 4 years ago

If I try to execute any of the python scripts from console I receive an exception:

Traceback`` (most recent call last):
  File "/usr/lib64/python3.6/configparser.py", line 1138, in _unify_values
    sectiondict = self._sections[section]
KeyError: 'NetworkDevice'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./storage_discovery.py", line 44, in <module>
    nd_parameters = configread(conf_file, 'NetworkDevice', 'device_file', 'login', 'password', 'name_space', 'zabbix_server')
  File "/usr/lib/zabbix/externalscripts/configread.py", line 16, in configread
    params[parameter] = config.get(section, parameter)
  File "/usr/lib64/python3.6/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib64/python3.6/configparser.py", line 1141, in _unify_values
    raise NoSectionError(section)
configparser.NoSectionError: No section: `'NetworkDevice'

it seems that it is not able to read config files, but I can't understand why: permission are ok, I'm running scripts as root. Any idea?