Just upgraded to nagios 5.6 and it broke all python scripts
Posted: Fri Apr 26, 2019 4:12 pm
Below is a transcript of the upgrade 5.6 and our python errors.
This is a VM in ESXi.
Linux Distribution and version?
32 or 64bit?
VMware Image or Manual Install of XI?
Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
**If you are encountering multiple issues that may not be related, start a thread for each issue
1) CentOS Linux release 7.6.1810 (Core)
2) 64bit
3) Manual Install of XI
4) SSL is being used for https
Chat on nagios.com
Conversation started on : Friday, April 26, 2019, at 19:58 (GMT+0)
[19:58] Nagios: Hi there! We're happy to help answer any questions you have about Nagios. Just ask!
[19:59] V1529074156483989: Just upgraded to nagios 5.6 and it broke all python scripts
[20:00] Brian has joined the conversation
[20:00] Brian: Hi, I'm Brian and I'm here to help. With whom am I speaking?
[20:00] V1529074156483989: gary
[20:01] Brian: Hi Gary, just for clarity, are you saying it broke the nagios plugins which are python scripts?
[20:02] V1529074156483989: We have a lot of services calling python scripts, that we have written
[20:02] Brian: As in custom plugins?
[20:04] V1529074156483989: Some may be from plugons but mainly we wrote the python scripts and created a nagios command to call the scripts and then have services using the nagios commands in the CCM
[20:05] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:05] Brian: I'll need a minute to check on something
[20:06] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:06] V1529074156483989: Posted command and service examples
[20:06] Brian: In what way are the scripts broken?
[20:07] Brian: AAlso, are you a current Nagios customer with support and maintenance?
[20:07] V1529074156483989: Traceback (most recent call last):
File "unifi_sw_lanesboro.py", line 55, in <module>
devNETGUARD.check_port_status(devNETGUARD.oid_alarm_status)
File "unifi_sw_lanesboro.py", line 18, in check_port_status
payload = alarm.poll_device_on_oid(self, oid)
File "/usr/local/alarm_scripts/unifi_v1/../alarm.py", line 12, in poll_device_on_oid
cmdGen = cmdgen.CommandGenerator()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 168, in __init__
self.snmpEngine = snmpEngine or SnmpEngine()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/engine.py", line 92, in __init__
'__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize')
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 400, in importSymbols
self.loadModules(modName, **userCtx)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 362, in loadModules
self.loadModule(modName, **userCtx)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 330, in loadModule
'MIB module \"%s\" load error: %s' % (modPath, traceback.format_exception(*sys.exc_info()))
pysnmp.smi.error.MibLoadError: MIB module "/usr/lib/python2.7/site-packages/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyc" load error: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 325, in loadModule\n exec (modData, g)\n', ' File "/tmp/pip-build-E8J2rJ/pysnmp/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py", line 24, in <module>\n', ' File "/tmp/pip-build-E8J2rJ/pysnmp/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py", line 86, in clone\n', 'TypeError: clone() takes at most 2 arguments (4 given)\n']
[20:08] V1529074156483989: I am going to post the impact screen next :
[20:08] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:08] V1529074156483989: We rely heavily on scripting
[20:09] V1529074156483989: AAlso, are you a current Nagios customer with support and maintenance? Yes
[20:10] V1529074156483989: File : [REDACTED]
[20:11] Brian: You're best bet would be to open a ticket. The support people work closely with the developers and would be best equipped to resolve your issue.
[20:11] V1529074156483989: Ok, we will have to roll back 5.11 soon. So you have no suggestions?
This is a VM in ESXi.
Linux Distribution and version?
32 or 64bit?
VMware Image or Manual Install of XI?
Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
**If you are encountering multiple issues that may not be related, start a thread for each issue
1) CentOS Linux release 7.6.1810 (Core)
2) 64bit
3) Manual Install of XI
4) SSL is being used for https
Chat on nagios.com
Conversation started on : Friday, April 26, 2019, at 19:58 (GMT+0)
[19:58] Nagios: Hi there! We're happy to help answer any questions you have about Nagios. Just ask!
[19:59] V1529074156483989: Just upgraded to nagios 5.6 and it broke all python scripts
[20:00] Brian has joined the conversation
[20:00] Brian: Hi, I'm Brian and I'm here to help. With whom am I speaking?
[20:00] V1529074156483989: gary
[20:01] Brian: Hi Gary, just for clarity, are you saying it broke the nagios plugins which are python scripts?
[20:02] V1529074156483989: We have a lot of services calling python scripts, that we have written
[20:02] Brian: As in custom plugins?
[20:04] V1529074156483989: Some may be from plugons but mainly we wrote the python scripts and created a nagios command to call the scripts and then have services using the nagios commands in the CCM
[20:05] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:05] Brian: I'll need a minute to check on something
[20:06] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:06] V1529074156483989: Posted command and service examples
[20:06] Brian: In what way are the scripts broken?
[20:07] Brian: AAlso, are you a current Nagios customer with support and maintenance?
[20:07] V1529074156483989: Traceback (most recent call last):
File "unifi_sw_lanesboro.py", line 55, in <module>
devNETGUARD.check_port_status(devNETGUARD.oid_alarm_status)
File "unifi_sw_lanesboro.py", line 18, in check_port_status
payload = alarm.poll_device_on_oid(self, oid)
File "/usr/local/alarm_scripts/unifi_v1/../alarm.py", line 12, in poll_device_on_oid
cmdGen = cmdgen.CommandGenerator()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 168, in __init__
self.snmpEngine = snmpEngine or SnmpEngine()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/engine.py", line 92, in __init__
'__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize')
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 400, in importSymbols
self.loadModules(modName, **userCtx)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 362, in loadModules
self.loadModule(modName, **userCtx)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 330, in loadModule
'MIB module \"%s\" load error: %s' % (modPath, traceback.format_exception(*sys.exc_info()))
pysnmp.smi.error.MibLoadError: MIB module "/usr/lib/python2.7/site-packages/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyc" load error: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 325, in loadModule\n exec (modData, g)\n', ' File "/tmp/pip-build-E8J2rJ/pysnmp/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py", line 24, in <module>\n', ' File "/tmp/pip-build-E8J2rJ/pysnmp/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py", line 86, in clone\n', 'TypeError: clone() takes at most 2 arguments (4 given)\n']
[20:08] V1529074156483989: I am going to post the impact screen next :
[20:08] V1529074156483989: File : https://tawk.link/587930f25bcc2b263bda7 ... /image.png
[20:08] V1529074156483989: We rely heavily on scripting
[20:09] V1529074156483989: AAlso, are you a current Nagios customer with support and maintenance? Yes
[20:10] V1529074156483989: File : [REDACTED]
[20:11] Brian: You're best bet would be to open a ticket. The support people work closely with the developers and would be best equipped to resolve your issue.
[20:11] V1529074156483989: Ok, we will have to roll back 5.11 soon. So you have no suggestions?