dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
83 stars 31 forks source link

I have issue with zabbix-vsphere-import #267

Closed jungkung6 closed 5 years ago

jungkung6 commented 5 years ago

I have issue as zabbix-vsphere-import: command not found when I try to running "zabbix-vsphere-import -f zabbix-vsphere-import.yaml" I very linux newbie. Any one please help me.

dnaeon commented 5 years ago

Just navigate to the directory with the script and do one of the following commands.

./zabbix-vsphere-import python zabbix-vsphere-import

Marin

On Tue, Jul 2, 2019, 12:54 jungkung6 notifications@github.com wrote:

I have issue as zabbix-vsphere-import: command not found when I try to running "zabbix-vsphere-import -f zabbix-vsphere-import.yaml" I very linux newbie. Any one please help me.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dnaeon/py-vpoller/issues/267?email_source=notifications&email_token=AAB3JC43J3G2OEZNKWE4RMLP5MQW5A5CNFSM4H42B5Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G423TZQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3JC6SJ2UBNMQT47PCLHTP5MQW5ANCNFSM4H42B5ZQ .

jungkung6 commented 5 years ago

Hi Marin,

After running command it's show error as below. py-vpoller/extra/zabbix/vsphere-import$ python zabbix-vsphere-import Traceback (most recent call last): File "zabbix-vsphere-import", line 38, in <module> import yaml ImportError: No module named yaml Wong

dnaeon commented 5 years ago

@jungkung6

Try these steps.

Make sure that you have Python 3 and create a new virtualenv.

python3 -m venv venv
source venv/bin/activate

Create therequirements.txt file with the following content.

certifi==2019.6.16
chardet==3.0.4
docopt==0.6.2
idna==2.8
pyvmomi==6.7.1.2018.12
PyYAML==5.1.1
pyzabbix==0.7.5
pyzmq==18.0.2
requests==2.22.0
six==1.12.0
tabulate==0.8.3
urllib3==1.25.3
vconnector==0.5.3
vpoller==0.7.3

Install the dependencies.

pip install -r requirements.txt

Run the script.

python zabbix-vsphere-import
jungkung6 commented 5 years ago

@dnaeon

Thank you so much!

After running zabbix-vsphere-import it's still show error as below.

$ python zabbix-vsphere-import -f zabbix-vsphere-import.yaml zabbix-vsphere-import:838: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. options = yaml.load(f) [2019-07-03 13:43:40,640] - INFO - JSON-RPC Server Endpoint: http://192.168.233.128/zabbix/api_jsonrpc.php [2019-07-03 13:43:40,641] - INFO - Connecting to Zabbix server at http://192.168.233.128/zabbix [2019-07-03 13:43:40,670] - INFO - Zabbix API version is 4.0.10 [2019-07-03 13:43:40,671] - INFO - [Datacenter@10.80.2.73] Importing objects to Zabbix [2019-07-03 13:43:42,645] - INFO - [Datacenter@10.80.2.73] Number of objects to be imported: 1 [2019-07-03 13:43:42,673] - WARNING - Unable to find Zabbix proxy 'zbx-proxy.example.org'

dnaeon commented 5 years ago

Hi,

Did you provide the correct location to the vpoller-proxy in the config file used by the zabbix-vsphere-import tool?

Thanks, Marin

On Wed, Jul 3, 2019 at 9:41 AM jungkung6 notifications@github.com wrote:

@dnaeon https://github.com/dnaeon

Thank you so much!

After running zabbix-vsphere-import it's still show error as below.

[2019-07-03 10:29:01,454] - INFO - JSON-RPC Server Endpoint: http://192.168.233.128/zabbix/api_jsonrpc.php [2019-07-03 10:29:01,455] - INFO - Connecting to Zabbix server at http://192.168.233.128/zabbix [2019-07-03 10:29:01,507] - INFO - Zabbix API version is 4.0.10 [2019-07-03 10:29:01,507] - INFO - [Datacenter@10.80.2.73] Importing objects to Zabbix [2019-07-03 10:29:04,529] - WARNING - Did not receive response, retrying... [2019-07-03 10:29:07,534] - WARNING - Did not receive response, retrying... [2019-07-03 10:29:10,539] - WARNING - Did not receive response, retrying... [2019-07-03 10:29:10,543] - ERROR - Did not receive response, aborting... [2019-07-03 10:29:10,543] - ERROR - vPoller task failed: {u'msg': u'Did not receive response, aborting...', u'success': 1}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dnaeon/py-vpoller/issues/267?email_source=notifications&email_token=AAB3JC7II3H4FB5TLZ56IILP5RCYHA5CNFSM4H42B5Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZDODQY#issuecomment-507961795, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3JC7LCGHH3JASG7DWSMDP5RCYHANCNFSM4H42B5ZQ .

-- Marin Atanasov Nikolov

dnaeon AT gmail DOT com http://www.unix-heaven.org/

jungkung6 commented 5 years ago

@dnaeon

I just only configure daemon service for vpoller-proxy by supervisor. Could you please tell me how to configure that?

Thank you, Wong

dnaeon commented 5 years ago

Please refer to the documentation

https://vpoller.readthedocs.io/en/latest/vpoller-zabbix.html

There's also a sample config file in the repo for the script, which you can use.

On Wed, Jul 3, 2019, 10:00 jungkung6 notifications@github.com wrote:

@dnaeon https://github.com/dnaeon

I just only configure daemon service for vpoller-proxy by supervisor. Could you please tell me how to configure that?

Thank you, Wong

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dnaeon/py-vpoller/issues/267?email_source=notifications&email_token=AAB3JC6LZ4GOU4RCHPNWIG3P5RFABA5CNFSM4H42B5Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZDPM2A#issuecomment-507967080, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3JC3XMD75C3XMK5OFLX3P5RFABANCNFSM4H42B5ZQ .

jungkung6 commented 5 years ago

@dnaeon

Thank you so much for your very kind support. I have already sync with my vCenter after remove proxy in .yaml file.

After vcenter has been import to zabbix, I do not receive any trigger. Could you please tell me any point to make trigger work?

After I check in zabbix, I have try to run Check now in Discovery rules menu in template but it's show error "Details Cannot send request Cannot send request: host is not monitored."