Page MenuHomePhabricator

Nagios check returns "Generic error: 'NoneType' object has no attribute '__getitem__'"
Closed, ResolvedPublic

Description

Since the latest service restart today the nagios checker on the MCS production machines returns a generic error complaining about NoneType not having an attribute getitem.

$ /usr/local/lib/nagios/plugins/service_checker 127.0.0.1 http://localhost:8888
Generic error: 'NoneType' object has no attribute '__getitem__'

Event Timeline

The checker script expects both request and response stanzas in an example. Alas, MCS' [most-read's response stanza](https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/spec.yaml;ed0e2e4b0065e61f4f18e411a5c21b794d681408$123) is wrongly indented. Fixing the indentation will fix the problem.

$ /usr/local/lib/nagios/plugins/service_checker 127.0.0.1 http://localhost:8888

As of recently, to achieve the same thing you can use:

$ check-mobileapps

Just for posterity sake: The error message was not very useful. @Mholloway found a previous instance of this occurring in our project and figured it out that way as well: https://gerrit.wikimedia.org/r/#/c/292377/