<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>30687</bug_id>
          
          <creation_ts>2015-01-28 19:11:32 +0300</creation_ts>
          <short_desc>Перестала работать проверка monit&apos;а nagios&apos;ом</short_desc>
          <delta_ts>2019-10-29 21:34:39 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>nagios-plugins-check_monit</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>33309</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter>anton</reporter>
          <assigned_to>anton</assigned_to>
          <cc>lav</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>149899</commentid>
    <comment_count>0</comment_count>
    <who name="">anton</who>
    <bug_when>2015-01-28 19:11:32 +0300</bug_when>
    <thetext>В пакете nagios-plugins-check_monit есть плагин для nagios, чтобы опрашивать monit. После обновления monit&apos;a до версии 5.8.1-alt1 и выше (проверил 5.9 и 5.11 - та же проблема) ответ плагину возвращается ошибочный:

#  /usr/lib/nagios/plugins/check_monit.py -H &lt;hostname&gt; -u &lt;username&gt; -P &lt;password&gt;

Traceback (most recent call last):
  File &quot;/usr/lib/nagios/plugins/check_monit.py&quot;, line 214, in &lt;module&gt;
    main()
  File &quot;/usr/lib/nagios/plugins/check_monit.py&quot;, line 198, in main
    process_monit_response(get_status())
  File &quot;/usr/lib/nagios/plugins/check_monit.py&quot;, line 166, in process_monit_response
    tree = xml.etree.ElementTree.fromstring(response)
  File &quot;/usr/lib64/python2.7/xml/etree/ElementTree.py&quot;, line 1300, in XML
    parser.feed(text)
  File &quot;/usr/lib64/python2.7/xml/etree/ElementTree.py&quot;, line 1642, in feed
    self._raiseerror(v)
  File &quot;/usr/lib64/python2.7/xml/etree/ElementTree.py&quot;, line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1272

Monit версии 5.8 отвечает корректно:

#  /usr/lib/nagios/plugins/check_monit.py -H &lt;hostname&gt; -u &lt;username&gt; -P &lt;password&gt;
OK: Total 2 services are monitored

Вероятно, требуется внести изменения в плагин nagios.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149908</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2015-01-28 20:53:09 +0300</bug_when>
    <thetext>Перевешиваю на разработчика плагина. Для начала нужно доказать, что ответ плагину неправильный, а не плагин его неправильно понимает.

# rpm --changelog nagios-plugins-check_monit
* Mon Oct 14 2013 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1.0-alt2
- cleanup spec

* Mon Oct 14 2013 Anton Agapov &lt;anton@etersoft.ru&gt; 1.0-alt1
- initial build for ALT Linux Sisyphus</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149923</commentid>
    <comment_count>2</comment_count>
    <who name="">anton</who>
    <bug_when>2015-01-29 15:35:15 +0300</bug_when>
    <thetext>Сам плагин взят отсюда: https://code.google.com/p/nagios-monit-plugin/

Там же есть сообщение об ошибке: https://code.google.com/p/nagios-monit-plugin/issues/detail?id=6 - подтвердил наличие проблемы.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166989</commentid>
    <comment_count>3</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2017-11-06 21:12:21 +0300</bug_when>
    <thetext>(В ответ на комментарий №2)
&gt; Сам плагин взят отсюда: https://code.google.com/p/nagios-monit-plugin/
&gt; 
&gt; Там же есть сообщение об ошибке:
&gt; https://code.google.com/p/nagios-monit-plugin/issues/detail?id=6 - подтвердил
&gt; наличие проблемы.

GoogleCodeExporter pushed a commit that referenced this issue on 26 Apr 2015
 
Fixed &lt;request/&gt; CDATA for monit &gt;= 5.8.1 (closes #6)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185173</commentid>
    <comment_count>4</comment_count>
    <who name="">anton</who>
    <bug_when>2019-10-29 18:27:40 +0300</bug_when>
    <thetext>Кстати, а по какой причине статус баги все еще &quot;Состояние: ASSIGNED&quot; ? Она давным давно была решена:

 * Чт фев 12 2015 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1.3-alt1
 - the plugin updated to fit to new monit versions (5.8.1+)

И решение успешно эксплуатировалось. Правда, новая беда с плагином, но это - другая задача: https://bugzilla.altlinux.org/show_bug.cgi?id=37396</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185181</commentid>
    <comment_count>5</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2019-10-29 21:34:39 +0300</bug_when>
    <thetext>(В ответ на комментарий №3)
...
&gt; Fixed &lt;request/&gt; CDATA for monit &gt;= 5.8.1 (closes #6)
Плагин обновлён.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>