Page 1 of 2

Trouble installing a plugin

Posted: Wed Jan 31, 2018 2:30 pm
by angus
Hello,

I am having issues installing the plug in listed below. I attempted the install instructions on their readme but it seems some of the files are missing. It may also be that i have made a mistake. Can someone assist me?

The Plugin
https://github.com/thecodeteam/nagios-unity

The error i am getting at install:
No local packages or download links found for docopt>=0.6.2
error: Could not find suitable distribution for Requirement.parse('docopt>=0.6.2')

Thanks.

Re: Trouble installing a plugin

Posted: Wed Jan 31, 2018 3:24 pm
by npolovenko
@angus, Have you used the pip instructions or the git instructions to install the plugin? What is the version of your OS?

Re: Trouble installing a plugin

Posted: Thu Feb 01, 2018 8:43 am
by angus
I used the python setup below. I manually download the package and unzipped it in the /tmp dir. I am using Centos. I am not familiar with the PIP install options. Should i investigate PIP and go that route?
$ cd nagios-unity
$ sudo python setup.py install

Re: Trouble installing a plugin

Posted: Thu Feb 01, 2018 11:19 am
by npolovenko
@angus, Not really, I only asked that so I could go the same route and try to reproduce the problem.
You should install the docopt package:

Code: Select all

pip install docopt==0.6.2
If you don't have pip you need to install it:

Code: Select all

easy_install pip
Let me know how it goes.

Re: Trouble installing a plugin

Posted: Thu Feb 01, 2018 2:05 pm
by angus
Once I installed via PIP, i attempt to use the commands but i get an odd response. What is going on here?

/]# nagios-unity --help
Traceback (most recent call last):
File "/usr/bin/nagios-unity", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: urllib3>=1.21.1


Thanks.

Re: Trouble installing a plugin

Posted: Thu Feb 01, 2018 2:36 pm
by npolovenko
@angus, You may still be missing some of the required modules. Please run this command:

Code: Select all

pip install urllib3
I installed the plugin with one command:

Code: Select all

 pip install nagios-unity
And it seemed like python automatically downloaded all the dependent packages for me.
So then i ran:

Code: Select all

/usr/bin/nagios-unity -help
And haven't gotten any errors.

Re: Trouble installing a plugin

Posted: Fri Feb 02, 2018 7:35 am
by angus
Even after performing those commands, i still have the same issue.

~]# /usr/bin/nagios-unity -help
Traceback (most recent call last):
File "/usr/bin/nagios-unity", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: urllib3>=1.21.1

Re: Trouble installing a plugin

Posted: Fri Feb 02, 2018 7:57 am
by angus
I removed the two packages, urllib3 and nagios-unity, and reinstalled them. now i get a new set of errors.

/]# nagios-unity
Traceback (most recent call last):
File "/usr/bin/nagios-unity", line 7, in <module>
from nagiosunity.cli.client import main
File "/usr/lib/python2.6/site-packages/nagiosunity/cli/client.py", line 52, in <module>
from nagiosunity.lib import utils
File "/usr/lib/python2.6/site-packages/nagiosunity/lib/utils.py", line 17, in <module>
import bitmath
File "/usr/lib/python2.6/site-packages/bitmath/__init__.py", line 58, in <module>
import argparse
ImportError: No module named argparse

Thanks.

Re: Trouble installing a plugin

Posted: Fri Feb 02, 2018 8:04 am
by angus
I installed python-argparse manually and am now presented with the following:

]# /usr/bin/nagios-unity -help
Traceback (most recent call last):
File "/usr/bin/nagios-unity", line 7, in <module>
from nagiosunity.cli.client import main
File "/usr/lib/python2.6/site-packages/nagiosunity/cli/client.py", line 54, in <module>
from nagiosunity import commands
File "/usr/lib/python2.6/site-packages/nagiosunity/commands/__init__.py", line 47
commands_dict = {cmd.name: cmd for cmd in COMMANDS}
^
SyntaxError: invalid syntax

Thanks.

Re: Trouble installing a plugin

Posted: Fri Feb 02, 2018 1:43 pm
by kyang
Thanks for posting the errors, but since this isn't a plugin available in our nagios-plugins package.

It's probably best if you report these issues to the maintainer of this plugin.
https://github.com/thecodeteam/nagios-unity/issues

The last commit was in Dec 2017, so they seem fairly on point in terms of updates.