Details

    • Bug
    • Resolution: Not A Bug
    • Major
    • None
    • Professional Edition
    • Alerting
    • Linux Centos 6.5, MySQL

    Description

      We updated the observium version and now the system cant send email with alerts.
      When run a trace i get this error:

      SQL[SELECT `contact_descr`, `contact_endpoint` FROM `alert_contacts` WHERE `contact_disabled` = 0 AND `contact_method` = 'email' AND `contact_id` IN (SELECT `alert_contact_id` FROM `alert_contacts_assoc` WHERE `alert_checker_id` = '1');]
      SQL RUNTIME[0.00026298s]
      ERROR[Error in query: (Unknown column 'alert_contact_id' in 'field list') 1054]
      Try send test notification for HOSTNAMEXXX to these email(s):
      favella@boldt.com.ar
      PHP Fatal error: Call to undefined function alert_notify() in /opt/observium/test_mail.php on line 218

      Fatal error: Call to undefined function alert_notify() in /opt/observium/test_mail.php on line 218

      Attachments

        Issue Links

          Activity

            [OBS-1518] Update Observium
            codycook Cody Cook added a comment -

            I believe I ran into this. Not sure when it started but I have it on 8010. Every test alert I am sending out seems to always go to the default and not my other examples. I'll try a fresh pull from svn and hope that helps.

            SQL[SELECT * FROM `alert_tests` WHERE 1]
            ROWS[9]
            SQL RUNTIME[0.00023103s]
            Cached 9 alert rules.
             
            SQL[SELECT * FROM `alert_assoc`]
            ROWS[11]
            SQL RUNTIME[0.00007796s]
             
            SQL[SELECT * FROM `alert_table` WHERE `alert_table_id` = '1']
            ROWS[0]
            SQL RUNTIME[0.00026011s]
             
            SQL[SELECT * FROM `devices` WHERE `device_id` = '']
            ROWS[0]
            SQL RUNTIME[0.00010085s]
             
            SQL[SELECT * FROM `` WHERE ``.`` = '']
            ROWS[-1]
            SQL RUNTIME[0.00009203s]
            ERROR[Error in query: (Incorrect table name '') 1103]
             
            SQL[SELECT * FROM `devices` WHERE `device_id` = '']
            ROWS[0]
            SQL RUNTIME[0.00010896s]
            

            codycook Cody Cook added a comment - I believe I ran into this. Not sure when it started but I have it on 8010. Every test alert I am sending out seems to always go to the default and not my other examples. I'll try a fresh pull from svn and hope that helps. SQL[SELECT * FROM `alert_tests` WHERE 1] ROWS[9] SQL RUNTIME[0.00023103s] Cached 9 alert rules.   SQL[SELECT * FROM `alert_assoc`] ROWS[11] SQL RUNTIME[0.00007796s]   SQL[SELECT * FROM `alert_table` WHERE `alert_table_id` = '1'] ROWS[0] SQL RUNTIME[0.00026011s]   SQL[SELECT * FROM `devices` WHERE `device_id` = ''] ROWS[0] SQL RUNTIME[0.00010085s]   SQL[SELECT * FROM `` WHERE ``.`` = ''] ROWS[-1] SQL RUNTIME[0.00009203s] ERROR[Error in query: (Incorrect table name '') 1103]   SQL[SELECT * FROM `devices` WHERE `device_id` = ''] ROWS[0] SQL RUNTIME[0.00010896s]

            Dear my friend.... I resolved it... delete the complete folder "/opt/observium/includes" and the I do svn update. The problem was resolved! You can close the issue pls!?

            favella@boldt.com.ar Fernando Avella added a comment - Dear my friend.... I resolved it... delete the complete folder "/opt/observium/includes" and the I do svn update. The problem was resolved! You can close the issue pls!?

            Sorry... but rrd are saved images.... I dont undertand why it has a relation whit email function. I move the folder but when i run svn update command the console show

            [root@observium observium]# svn update
            At revision 7133.

            favella@boldt.com.ar Fernando Avella added a comment - Sorry... but rrd are saved images.... I dont undertand why it has a relation whit email function. I move the folder but when i run svn update command the console show [root@observium observium] # svn update At revision 7133.

            rrd folder

            adama Adam Armstrong added a comment - rrd folder

            Sorry, I cant understand you... RED Directory? Can you explain more? The directory of instalation is /opt/observium... So I have to delete what some folders. Which ones?

            favella@boldt.com.ar Fernando Avella added a comment - Sorry, I cant understand you... RED Directory? Can you explain more? The directory of instalation is /opt/observium... So I have to delete what some folders. Which ones?

            You seem to have somehow managed to break your observium installation, either via svn misbehaving or via unresolved local changes.

            you should delete your installation and checkout a clean set of code.

            if you retain your config.php and red directory, you won't lose any data.

            adama Adam Armstrong added a comment - You seem to have somehow managed to break your observium installation, either via svn misbehaving or via unresolved local changes. you should delete your installation and checkout a clean set of code. if you retain your config.php and red directory, you won't lose any data.

            OK. I executed

            [root@observium observium]# php test_alert.php -a server -d
            PHP Warning: Module 'ldap' already loaded in Unknown on line 0
            DEBUG!

            SQL[SELECT * FROM `config`]
            SQL RUNTIME[0.00049996s]
            Observium 0.15.10.7107
            Test Alert Notification

            CMD[/opt/observium/scripts/distro]

            EXITCODE[0]
            CMD RUNTIME[0.034s]
            STDOUT[
            Linux|2.6.32-504.8.1.el6.x86_64|amd64|CentOS|6.6
            ]

            CMD[/usr/bin/env python --version 2>&1]

            EXITCODE[0]
            CMD RUNTIME[0.0023s]
            STDOUT[
            Python 2.6.6
            ]

            SQL[SELECT version()]
            SQL RUNTIME[0.00015998s]

            CMD[/usr/bin/snmpget --version 2>&1]

            EXITCODE[0]
            CMD RUNTIME[0.0036s]
            STDOUT[
            NET-SNMP version: 5.5
            ]

            CMD[/usr/bin/rrdtool --version |head -n1]

            EXITCODE[0]
            CMD RUNTIME[0.0029s]
            STDOUT[
            RRDtool 1.3.8 Copyright 1997-2009 by Tobias Oetiker <tobi@oetiker.ch>
            ]

            SQL[SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);]
            SQL RUNTIME[0.00018215s]

            CMD[/usr/bin/env apache2 -v | awk '/Server version:/

            {print $3}']

            EXITCODE[0]
            CMD RUNTIME[0.0034s]
            STDOUT[

            ]

            CMD[/usr/bin/env httpd -v | awk '/Server version:/ {print $3}

            ']

            EXITCODE[0]
            CMD RUNTIME[0.0145s]
            STDOUT[
            Apache/2.2.15
            ]

                    1. Software versions #####

            o OS Linux 2.6.32-504.8.1.el6.x86_64 [amd64] (CentOS 6.6)
            o Apache 2.2.15
            o PHP 5.4.44
            o Python 2.6.6
            o MySQL 5.1.73 (extension: mysqli 5.1.73)
            o SNMP NET-SNMP 5.5
            o RRDtool 1.3.8

            SQL[SHOW VARIABLES LIKE 'character_set_connection']
            SQL RUNTIME[0.00055885s]

                    1. Charset info #####

            o PHP UTF-8
            o MySQL utf8

                    1. Timezones info #####

            o Date Monday, 26-Oct-15 18:43:24 UTC
            o PHP +00:00
            o MySQL -03:00

            SQL[SELECT * FROM `alert_tests` WHERE 1]
            SQL RUNTIME[0.00028396s]
            Cached 9 alert rules.

            SQL[SELECT * FROM `alert_assoc`]
            SQL RUNTIME[0.00019002s]

            SQL[SELECT * FROM `alert_table` LEFT JOIN `alert_table-state` ON `alert_table`.`alert_table_id` = `alert_table-state`.`alert_table_id` WHERE `alert_table`.`alert_table_id` = 'server']
            SQL RUNTIME[0.00023198s]

            SQL[SELECT * FROM `devices` WHERE `device_id` = '']
            SQL RUNTIME[0.00021291s]

            SQL[SELECT * FROM `` WHERE ``.`` = '']
            SQL RUNTIME[0.00010991s]
            ERROR[Error in query: (Incorrect table name '') 1103]

            SQL[SELECT * FROM `alert_contacts` WHERE `contact_disabled` = 0 AND `contact_id` IN (SELECT `contact_id` FROM `alert_contacts_assoc` WHERE `alert_checker_id` = '');]
            SQL RUNTIME[0.00021219s]
            o Notifying [email] : email@server.com.ar
            PHP Parse error: syntax error, unexpected '<<' (T_SL) in /opt/observium/includes/alerting/email.inc.php on line 157

            Parse error: syntax error, unexpected '<<' (T_SL) in /opt/observium/includes/alerting/email.inc.php on line 157

            How can I fix? I make svn update, but the error persist!

            favella@boldt.com.ar Fernando Avella added a comment - OK. I executed [root@observium observium] # php test_alert.php -a server -d PHP Warning: Module 'ldap' already loaded in Unknown on line 0 DEBUG! SQL [SELECT * FROM `config`] SQL RUNTIME [0.00049996s] Observium 0.15.10.7107 Test Alert Notification CMD [/opt/observium/scripts/distro] EXITCODE [0] CMD RUNTIME [0.034s] STDOUT[ Linux|2.6.32-504.8.1.el6.x86_64|amd64|CentOS|6.6 ] CMD [/usr/bin/env python --version 2>&1] EXITCODE [0] CMD RUNTIME [0.0023s] STDOUT[ Python 2.6.6 ] SQL [SELECT version()] SQL RUNTIME [0.00015998s] CMD [/usr/bin/snmpget --version 2>&1] EXITCODE [0] CMD RUNTIME [0.0036s] STDOUT[ NET-SNMP version: 5.5 ] CMD [/usr/bin/rrdtool --version |head -n1] EXITCODE [0] CMD RUNTIME [0.0029s] STDOUT[ RRDtool 1.3.8 Copyright 1997-2009 by Tobias Oetiker <tobi@oetiker.ch> ] SQL [SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);] SQL RUNTIME [0.00018215s] CMD[/usr/bin/env apache2 -v | awk '/Server version:/ {print $3}'] EXITCODE [0] CMD RUNTIME [0.0034s] STDOUT[ ] CMD[/usr/bin/env httpd -v | awk '/Server version:/ {print $3} '] EXITCODE [0] CMD RUNTIME [0.0145s] STDOUT[ Apache/2.2.15 ] Software versions ##### o OS Linux 2.6.32-504.8.1.el6.x86_64 [amd64] (CentOS 6.6) o Apache 2.2.15 o PHP 5.4.44 o Python 2.6.6 o MySQL 5.1.73 (extension: mysqli 5.1.73) o SNMP NET-SNMP 5.5 o RRDtool 1.3.8 SQL [SHOW VARIABLES LIKE 'character_set_connection'] SQL RUNTIME [0.00055885s] Charset info ##### o PHP UTF-8 o MySQL utf8 Timezones info ##### o Date Monday, 26-Oct-15 18:43:24 UTC o PHP +00:00 o MySQL -03:00 SQL [SELECT * FROM `alert_tests` WHERE 1] SQL RUNTIME [0.00028396s] Cached 9 alert rules. SQL [SELECT * FROM `alert_assoc`] SQL RUNTIME [0.00019002s] SQL [SELECT * FROM `alert_table` LEFT JOIN `alert_table-state` ON `alert_table`.`alert_table_id` = `alert_table-state`.`alert_table_id` WHERE `alert_table`.`alert_table_id` = 'server'] SQL RUNTIME [0.00023198s] SQL [SELECT * FROM `devices` WHERE `device_id` = ''] SQL RUNTIME [0.00021291s] SQL [SELECT * FROM `` WHERE ``.`` = ''] SQL RUNTIME [0.00010991s] ERROR [Error in query: (Incorrect table name '') 1103] SQL [SELECT * FROM `alert_contacts` WHERE `contact_disabled` = 0 AND `contact_id` IN (SELECT `contact_id` FROM `alert_contacts_assoc` WHERE `alert_checker_id` = '');] SQL RUNTIME [0.00021219s] o Notifying [email] : email@server.com.ar PHP Parse error: syntax error, unexpected '<<' (T_SL) in /opt/observium/includes/alerting/email.inc.php on line 157 Parse error: syntax error, unexpected '<<' (T_SL) in /opt/observium/includes/alerting/email.inc.php on line 157 How can I fix? I make svn update, but the error persist!

            The alert_contacts_assoc table uses `contact_id`, not `alert_contact_id`.

            adama Adam Armstrong added a comment - The alert_contacts_assoc table uses `contact_id`, not `alert_contact_id`.

            test_email.php is no longer used

            adama Adam Armstrong added a comment - test_email.php is no longer used

            The version of Observium is 0.15.10.7107 At revision 7118.
            When I use execute a simple SQL Statement I get these results

            mysql> SELECT `alert_contact_id` FROM `alert_contacts_assoc`;
            ERROR 1054 (42S22): Unknown column 'alert_contact_id' in 'field list'

            favella@boldt.com.ar Fernando Avella added a comment - The version of Observium is 0.15.10.7107 At revision 7118. When I use execute a simple SQL Statement I get these results mysql> SELECT `alert_contact_id` FROM `alert_contacts_assoc`; ERROR 1054 (42S22): Unknown column 'alert_contact_id' in 'field list'

            People

              adama Adam Armstrong
              favella@boldt.com.ar Fernando Avella
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: