You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, congrats to you and your job and thanks to share this project with us.
I'm trying to launch the stack but the metric-collector container displays an error when it attempts to check the credentials configuration file :
2021-03-10 09:57:15,534 collector: INFO: Sending Datapoint to: http://telegraf:8186/write
2021-03-10 09:57:15,534 scheduler: INFO: Worker Worker-120sec-1 took 0.0012273788452148438 seconds to run
2021-03-10 09:59:15,572 scheduler: INFO: Worker-120sec-1: Starting collection for 1 hosts
2021-03-10 09:59:15,573 scheduler: INFO: Worker-120sec-1: Collector Thread-1 scheduled with following hosts: ['switch-1']
2021-03-10 09:59:15,573 collector: INFO: Collector starting for: switch-1
2021-03-10 09:59:15,573 netconf_collector: INFO: Connecting to host: switch-1
Exception in thread Thread-8:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/source/lib/metric_collector/collector.py", line 57, in collect
dev.connect() File "/source/lib/metric_collector/netconf_collector.py", line 75, in connect
if self.__credential['method'] in "key": TypeError: 'NoneType' object is not subscriptable
2021-03-10 09:59:15,577 collector: INFO: Sending Datapoint to: http://telegraf:8186/write
2021-03-10 09:59:15,577 scheduler: INFO: Worker Worker-120sec-1 took 0.0009467601776123047 seconds to run
For authentication, I use SSH key method
Here is my credentials (lab-0-credentials.yaml) file :
lab_credentials:
username: user
method: key
key_file: keys/private-key
tags: juniper
"private-key" file is stored in quickstart/keys/
Can you confirm it is the right place to store it ?
Because of a proxy, I have to build first the metric-collector container : $ CREDENTIALS=lab-0-credentials.yaml HOSTS=lab-0-hosts.yaml docker-compose build --build-arg http_proxy=http://proxy1:80/ --build-arg https_proxy=http://proxy1:80/
then I can launch the stack: $ CREDENTIALS=lab-0-credentials.yaml HOSTS=lab-0-hosts.yaml docker-compose up
Error displays seems to be related to the non-existing method value but hosts information file is well recognized since device hostname is configured for netconf_collector.
Can you tell me if I do something wrong ?
Thanks again !
The text was updated successfully, but these errors were encountered:
I too am having the exact same problem on a brand new Ubuntu 20.04 LTS system
i had to update the setup.py file as pip20 broke the initial deployment
ubuntu@py-dash:~/py-metric-collector$ diff setup.py setup.py.orig
15,19c15
< requirements_data = list(requirements_data)
< try:
< requirements = [str(ir.req) for ir in requirements_data]
< except:
< requirements = [str(ir.requirement) for ir in requirements_data]
---
> requirements = [str(package.req) for package in requirements_data]
I get the same NoneType error on 'method' key lookup as trif666 above. i'm guessing python 3.8 has changed.
Hello,
First, congrats to you and your job and thanks to share this project with us.
I'm trying to launch the stack but the metric-collector container displays an error when it attempts to check the credentials configuration file :
For authentication, I use SSH key method
Here is my credentials (lab-0-credentials.yaml) file :
"private-key" file is stored in
quickstart/keys/
Can you confirm it is the right place to store it ?
Because of a proxy, I have to build first the metric-collector container :
$ CREDENTIALS=lab-0-credentials.yaml HOSTS=lab-0-hosts.yaml docker-compose build --build-arg http_proxy=http://proxy1:80/ --build-arg https_proxy=http://proxy1:80/
then I can launch the stack:
$ CREDENTIALS=lab-0-credentials.yaml HOSTS=lab-0-hosts.yaml docker-compose up
Error displays seems to be related to the non-existing method value but hosts information file is well recognized since device hostname is configured for netconf_collector.
Can you tell me if I do something wrong ?
Thanks again !
The text was updated successfully, but these errors were encountered: