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

Traceback with newer versions of Monit #6

Closed
GoogleCodeExporter opened this issue Apr 26, 2015 · 5 comments
Closed

Traceback with newer versions of Monit #6

GoogleCodeExporter opened this issue Apr 26, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

./check_monit -H host -s -u user -P password

What is the expected output?

OK: Total 14 services are monitored

What do you see instead?

Traceback (most recent call last):
  File "./check_monit.py", line 224, in <module>
    main()
  File "./check_monit.py", line 208, in main
    process_monit_response(get_status())
  File "./check_monit.py", line 175, in process_monit_response
    tree = xml.etree.ElementTree.fromstring(response)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, 
column 1257

What version of the product are you using? On what operating system?

running what you have on this site with the following two lines added to get it 
working with SSL:

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

monit is... version 5.9

Please provide any additional information below.

Original issue reported on code.google.com by Screamin...@gmail.com on 2 Jan 2015 at 2:38

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I confirm the issue with monit 5.8.1, 5.9, 5.11: the same error output is. If I 
use 5.8 and 5.7 - no problem then. I've checked the linux versions of monit 
only.

Original comment by anton.wo...@gmail.com on 29 Jan 2015 at 12:34

@GoogleCodeExporter
Copy link
Author

First of all I apologise for the delay.

I have just pushed #r10 that is tested against monit 5.8.1, 5.6 and 5.1.1 - 
everything works seemingly fine, but please test the change on your systems.

Original comment by stas.vit...@gmail.com on 31 Jan 2015 at 4:12

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Hi, thank you a lot, it seems it's quite good for now, but not perfect.
I've tested on monit 5.10, so if all services are OK , then no differences:

OK: Total 4 services are monitored

But if any service monitored is "broken", then I see no the reason why:

New version on monit 5.10:
CRITICAL: PROCESS test

Old version on monit 5.5:
CRITICAL: PROCESS test: failed to start 

Original comment by anton.wo...@gmail.com on 30 Mar 2015 at 5:16

@GoogleCodeExporter
Copy link
Author

If I understood you correctly, you expect to see status message for failed 
services?

It looks like monit removed <status_message/> XML tag from their status output 
at around 5.6, so there's no way to report it since then.

This is how failed sshd status looks like on Monit 5.8.1:

<service type="3">
  <name>sshd</name>
  <collected_sec>1428022523</collected_sec>
  <collected_usec>891721</collected_usec>
  <status>4608</status>
  <status_hint>0</status_hint>
  <monitor>1</monitor>
  <monitormode>0</monitormode>
  <pendingaction>0</pendingaction>
</service>

Original comment by stas.vit...@gmail.com on 3 Apr 2015 at 1:30

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

1 participant