Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafkacheck gets TypeError: '<' not supported between instances of 'int' and 'NoneType' #346

Open
FallingSkie opened this issue Oct 5, 2020 · 6 comments

Comments

@FallingSkie
Copy link

FallingSkie commented Oct 5, 2020

In Icinga I'm getting this error: TypeError: '<' not supported between instances of 'int' and 'NoneType'. How can I solve this?

Here more detailed: File "/lib64/nagios/plugins/check_kafka.py", line 292, in CheckKafka().main() File "/lib64/nagios/plugins/check_kafka.py", line 69, in init super(CheckKafka, self).init() File "/lib64/nagios/plugins/pylib/harisekhon/nagiosplugin/pubsub_nagiosplugin.py", line 56, in init super(PubSubNagiosPlugin, self).init() File "/lib64/nagios/plugins/pylib/harisekhon/nagiosplugin/nagiosplugin.py", line 55, in init super(NagiosPlugin, self).init() File "/lib64/nagios/plugins/pylib/harisekhon/cli.py", line 127, in init width = min(width, 200) TypeError: '<' not supported between instances of 'int' and 'NoneType'

and here the debug from the server:
File "/usr/lib64/nagios/plugins/pylib/harisekhon/cli.py", line 179, in main
self.run()
File "./check_kafka.py", line 121, in run
raise CriticalError(err)

Thanks VallingSki

@HariSekhon
Copy link
Owner

HariSekhon commented Oct 5, 2020

Are you using the latest version of the code?

Can you please paste the full -vvv debug output which will show the stack trace as well as the version numbers. I suspect that newer code has already solved this issue.

You can run the output through anonymize.py --all from DevOps-Python-tools if you want to remove sensitive information like hostnames, IP addresses etc...

Thanks

Hari

@FallingSkie
Copy link
Author

Hello,

sorry for my late answer. I have updated to a newer version now. Now i get this one:
File "./check_kafka.py", line 342, in
CheckKafka().main()
File "./check_kafka.py", line 96, in init
' (optional, default: {} secs)'.format(self.default_sleep_secs)
AttributeError: 'CheckKafka' object has no attribute 'default_sleep_secs'

What am I missing here?

LG

@HariSekhon
Copy link
Owner

Did you do a standard install which pulls in pylib?

default_sleep_secs if defined in the inherited class PubSubNagiosPlugin.

@HariSekhon HariSekhon self-assigned this Oct 9, 2020
@FallingSkie
Copy link
Author

I have only copied the code.
How can I only update this check. Without downloading any other checks?

@HariSekhon
Copy link
Owner

You should download and replace pylib with the latest. See the offline install section in the README.md

@HariSekhon
Copy link
Owner

Did you resolve this by downloading the current version of pylib?

Why don't you just clone the repo as-is, it's the simplest thing to do? Are you restricted behind a corporate firewall? In many cases you can use specify an internal proxy to download normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants