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

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

    <bug>
          <bug_id>44501</bug_id>
          
          <creation_ts>2022-11-30 16:28:52 +0300</creation_ts>
          <short_desc>функция from_unixtime(integer) не существует</short_desc>
          <delta_ts>2022-12-02 17:56:26 +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>nagiosdigger</component>
          <version>unstable</version>
          <rep_platform>x86_64</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>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgeny Shesteperov">alimektor</reporter>
          <assigned_to name="manowar@altlinux.org">manowar</assigned_to>
          <cc>manowar</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>218166</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2022-11-30 16:28:52 +0300</bug_when>
    <thetext>Версия
======

nagiosdigger-0.9-alt6.noarch
nagios-3.0.6-alt16.x86_64
postgresql14-14.5-alt1.x86_64

Дистрибутивы
============

- p10-server-10-x86-64

Шаги воспроизведения
====================

1. Настроить nagios, клиентов с osec, настроить nagiosdigger на работу с PostgreSQL.
2. Получить некоторые логи с nagios.
3. Перейти в веб-интерфейс Nagiosdigger: https://server/nagiosdigger
4. Перейти в Global statistics → Number of events per week, проверить значение.

Ожидаемый результат: отсутствие ошибок SQL.

Фактический результат: присутствуют ошибки SQL.

        Query failed: ОШИБКА: функция from_unixtime(integer) не существует LINE 1: ...s != &apos;OK&apos; AND status_type = &apos;HARD&apos; GROUP BY WEEK(FROM_UNIXT... ^ HINT: Функция с данными именем и типами аргументов не найдена. Возможно, вам следует добавить явные приведения типов.: SELECT AVG(after_where.nr) AS avg, STDDEV(after_where.nr) AS stddev FROM (SELECT COUNT(*) AS nr FROM logs WHERE status != &apos;OK&apos; AND status_type = &apos;HARD&apos; GROUP BY WEEK(FROM_UNIXTIME(unixts))) after_where</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>218167</commentid>
    <comment_count>1</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2022-11-30 16:30:13 +0300</bug_when>
    <thetext>Воспроизводится в Sisyphus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>218313</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2022-12-02 17:56:26 +0300</bug_when>
    <thetext>nagiosdigger-0.9.1-alt1 -&gt; sisyphus:

 Fri Dec 02 2022 Paul Wolneykien &lt;manowar@altlinux&gt; 0.9.1-alt1
 - Fixed divide by zero in &quot;Predict problems&quot; (closes: 44502).
 - Fixed date/time functions for PostgreSQL (closes: 44501).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>