pandorafms icon indicating copy to clipboard operation
pandorafms copied to clipboard

Error on import

Open tanimientras opened this issue 6 years ago • 2 comments

Importing pandora.sql raises the error message:

ERROR 1364 (HY000) at line 1107: Field 'field11' doesn't have a default value

It may be caused by truncated SQL statement

INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES
(1,'Mail to Admin',1,'[email protected]','[PANDORA] Alert from agent _agent_ on module _module_','<style type="text/css">
/* Take care of image borders and formatting */

  img {
    max-width: 600px;
    outline: none;
    text-decoration: none;
    -ms-interpolation-mode: bicubic;
  }

  a {
    border: 0;
    outline: none;
  }

  a img {
    border: none;
  }

  /* General styling */

  td, h1, h2, h3  {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
  }

  td {
    font-size: 14px;
    line-height: 150%;
    text-align: left;
  }

  body {
    -webkit-font-smoothing:antialiased;
    -webkit-text-size-adjust:none;
    width: 100%;
    height: 100%;
    color: #37302d;
    background: #ffffff;
  }

  table {
    border-collapse: collapse !important;
  }


  h1, h2, h3 {
    padding: 0;
    margin: 0;
    color: #444444;
    font-weight: 400;
    line-height: 110%;
  }

  h1 {
    font-size: 35px;
  }

  h2 {
    font-size: 30px;
  }

  h3 {
    font-size: 24px;
  }

  h4 {
    font-size: 18px;
    font-weight: normal;
  }

  .important-font {
    color: #21BEB4;
    font-weight: bold;
  }

  .hide {
    display: none !important;
  }

  .force-full-width {
    width: 100% !important;
  }
</style>
<style type="text/css" media="screen">
@media screen {
        @import url(http://fonts.googleapis.com/css?family=Open+Sans:400);

        /* Thanks Outlook 2013! */
        td, h1, h2, h3 {
          font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif !important;
        }
      }
</style>
<style type="text/css" media="only screen and (max-width: 600px)">
/* Mobile styles */
    @media only screen and (max-width: 600px) {

      table[class="w320"] {
        width: 320px !important;
      }

      table[class="w300"] {
        width: 300px !important;
      }

      table[class="w290"] {
        width: 290px !important;
      }

      td[class="w320"] {
        width: 320px !important;
      }

      td[class~="mobile-padding"] {
        padding-left: 14px !important;
        padding-right: 14px !important;
      }

      td[class*="mobile-padding-left"] {
        padding-left: 14px !important;
      }

      td[class*="mobile-padding-right"] {
        padding-right: 14px !important;
      }

      td[class*="mobile-block"] {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 15px !important;
      }

      td[class*="mobile-no-padding-bottom"] {
        padding-bottom: 0 !important;
      }

      td[class~="mobile-center"] {
        text-align: center !important;
      }

      table[class*="mobile-center-block"] {
        float: none !important;
        margin: 0 auto !important;
      }

      *[class*="mobile-hide"] {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        line-height: 0 !important;
        font-size: 0 !important;
      }

      td[class*="mobile-border"] {
        border: 0 !important;
      }
    }
</style>
<table style="width: 100%;" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td align="center" valign="top" bgcolor="#ffffff" width="100%">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background: #1f1f1f; height: 70px;" width="100%"><center>
<table class="w320" style="width: 600px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-block mobile-no-padding-bottom mobile-center" style="background: #1f1f1f; padding: 10px 10px 10px 20px;" valign="top" width="270"><a style="text-decoration: none;" href="#"> <img src="https://pandorafms.com/images/logo_pandora_email.png" alt="Your Logo" width="200"> </a></td>
<td class="mobile-block mobile-center" style="background: #1f1f1f; padding: 17px 15px 10px 10px;" valign="top" width="270"> </td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="border-bottom: 1px solid #e7e7e7;"><center style="padding-bottom: 20px;">
<table class="w320" style="width: 600px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-padding" style="padding: 20px;" align="left"><br class="mobile-hide">
<h2>Pandora FMS alert system</h2>
<br> Dear customer,<br><br> We have <strong>bad news</strong> for you. Something is on <strong>CRITICAL</strong> status!<br> <br>
<table style="width: 100%;" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tbody>
<tr>
<td style="width: 100px; background: #D84A38;">
<div><!--[if mso]>
                          <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="#" style="height:33px;v-text-anchor:middle;width:100px;" stroke="f" fillcolor="#D84A38">
                            <w:anchorlock/>
                            <center>
                          <![endif]--> <a style="background-color: #1f1f1f; color: whitesmoke; display: inline-block; font-family: sans-serif; font-size: 13px; font-weight: bold; line-height: 33px; text-align: center; text-decoration: none; width: 250px; -webkit-text-size-adjust: none;" href="_homeurl_">Go to Pandora FMS Console</a> <!--[if mso]>
                            </center>
                          </v:rect>
                          <![endif]--></div>
</td>
<td style="background-color: #ffffff; font-size: 0; line-height: 0;" width="281"> </td>
</tr>
</tbody>
</table>
</td>
<td class="mobile-hide" style="padding-top: 20px; padding-bottom: 0; vertical-align: bottom;" valign="bottom">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-bottom: 0px; vertical-align: bottom;" align="right" valign="bottom"><img style="vertical-align: bottom; padding-bottom: 10px;" src="https://pandorafms.com/images/alerta_roja.png" alt="" width="130"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="background-color: #f8f8f8; border-bottom: 1px solid #e7e7e7; padding-top: 10px;" valign="top"><center>
<table class="w320" style="height: 100%; width: 600px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-padding" style="padding: 20px;" valign="top">
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-right: 20px;" colspan="2"><strong>Monitoring details</strong></td>
</tr>
<tr>
<td style="padding-top: 25px; width: 150px; border-top: 1px solid #E7E7E7; vertical-align: top;"><strong>Data</strong></td>
<td style="padding-top: 25px; padding-right: 20px; border-top: 1px solid #E7E7E7; vertical-align: top;">_data_ <em>(_modulestatus_)</em></td>
</tr>
<tr>
<td><strong>Agent</strong></td>
<td>_agent_ <em>_address_</em></td>
</tr>
<tr>
<td><strong>Module</strong></td>
<td>_module_ <em>_moduledescription_ </em></td>
</tr>
<tr>
<td><strong>Timestamp</strong></td>
<td>_timestamp_</td>
</tr>
</tbody>
</table>
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-top: 20px;">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="vertical-align: top;" width="350">This is a graph of latest 24hr data for this module: <br><br> _modulegraph_24h_</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="background-color: #1f1f1f;"><center>
<table class="w320" style="height: 100%; color: #ffffff; width: 600px;" border="0" cellspacing="0" cellpadding="0" bgcolor="#1f1f1f">
<tbody>
<tr>
<td class="mobile-padding" style="font-size: 12px; padding: 20px; background-color: #1f1f1f; color: #ffffff; text-align: center;" align="right" valign="middle"><a style="color: #ffffff;" href="https://pandorafms.com/company/contact/">Contact Us</a>  |   <a style="color: #ffffff;" href="https://forums.pandorafms.com/">Support</a>  |   <a style="color: #ffffff;" href="https://wiki.pandorafms.com">Docs</a>  |  </td>
</tr>
</tbody>
</table>
</center></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>','','','','','','','',0,0,'','','<style type="text/css"><!--
/* Take care of image borders and formatting */

  img {
    max-width: 600px;
    outline: none;
    text-decoration: none;
    -ms-interpolation-mode: bicubic;
  }

  a {
    border: 0;
    outline: none;
  }

  a img {
    border: none;
  }

  /* General styling */

  td, h1, h2, h3  {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
  }

  td {
    font-size: 14px;
    line-height: 150%;
    text-align: left;
  }

  body {
    -webkit-font-smoothing:antialiased;
    -webkit-text-size-adjust:none;
    width: 100%;
    height: 100%;
    color: #37302d;
    background: #ffffff;
  }

  table {
    border-collapse: collapse !important;
  }


  h1, h2, h3 {
    padding: 0;
    margin: 0;
    color: #444444;
    font-weight: 400;
    line-height: 110%;
  }

  h1 {
    font-size: 35px;
  }

  h2 {
    font-size: 30px;
  }

  h3 {
    font-size: 24px;
  }

  h4 {
    font-size: 18px;
    font-weight: normal;
  }

  .important-font {
    color: #21BEB4;
    font-weight: bold;
  }

  .hide {
    display: none !important;
  }

  .force-full-width {
    width: 100% !important;
  }
--></style>
<style type="text/css" media="screen"><!--
@media screen {
        @import url(http://fonts.googleapis.com/css?family=Open+Sans:400);

        /* Thanks Outlook 2013! */
        td, h1, h2, h3 {
          font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif !important;
        }
      }
--></style>
<style type="text/css" media="only screen and (max-width: 600px)"><!--
/* Mobile styles */
    @media only screen and (max-width: 600px) {

      table[class="w320"] {
        width: 320px !important;
      }

      table[class="w300"] {
        width: 300px !important;
      }

      table[class="w290"] {
        width: 290px !important;
      }

      td[class="w320"] {
        width: 320px !important;
      }

      td[class~="mobile-padding"] {
        padding-left: 14px !important;
        padding-right: 14px !important;
      }

      td[class*="mobile-padding-left"] {
        padding-left: 14px !important;
      }

      td[class*="mobile-padding-right"] {
        padding-right: 14px !important;
      }

      td[class*="mobile-block"] {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 15px !important;
      }

      td[class*="mobile-no-padding-bottom"] {
        padding-bottom: 0 !important;
      }

      td[class~="mobile-center"] {
        text-align: center !important;
      }

      table[class*="mobile-center-block"] {
        float: none !important;
        margin: 0 auto !important;
      }

      *[class*="mobile-hide"] {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        line-height: 0 !important;
        font-size: 0 !important;
      }

      td[class*="mobile-border"] {
        border: 0 !important;
      }
    }
--></style>
<table style="width: 100%;" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td align="center" valign="top" bgcolor="#ffffff" width="100%">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background: #1f1f1f; height: 70px;" width="100%"><center>
<table class="w320" style="width: 600px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-block mobile-no-padding-bottom mobile-center" style="background: #1f1f1f; padding: 10px 10px 10px 20px;" valign="top" width="270"><a style="text-decoration: none;" href="#"> <img src="https://pandorafms.com/images/logo_pandora_email.png" alt="Your Logo" width="200"> </a></td>
<td class="mobile-block mobile-center" style="background: #1f1f1f; padding: 17px 15px 10px 10px;" valign="top" width="270"> </td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="border-bottom: 1px solid #e7e7e7;"><center style="padding-bottom: 20px;">
<table class="w320" style="width: 600px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-padding" style="padding: 20px;" align="left"><br class="mobile-hide">
<h2>Pandora FMS alert system</h2>
<br> Dear customer,<br><br> We have <strong>good news</strong> for you. Alert has been <strong>RECOVERED</strong> status!<br> <br>
<table style="width: 100%;" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tbody>
<tr>
<td style="width: 100px; background: #D84A38;">
<div><!--[if mso]>
                          <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="#" style="height:33px;v-text-anchor:middle;width:100px;" stroke="f" fillcolor="#D84A38">
                         ERROR 1364 (HY000) at line 1107: Field 'field11' doesn't have a default value
   <w:anchorlock/>
                            <center>
                          <![endif]--> <a style="background-color: #1f1f1f; color: whitesmoke; display: inline-block; font-family: sans-serif; font-size: 13px; font-weight: bold; line-height: 33px; text-align: center; text-decoration: none; width: 250px; -webkit-text-size-adjust: none;" href="_homeurl_">Go to Pandora FMS Console</a> <!--[if mso]>
                            </center>
                          </v:rect>
                          <![endif]--></div>
</td>
<td style="background-color: #ffffff; font-size: 0; line-height: 0;" width="281"> </td>
</tr>
</tbody>
</table>
</td>
<td class="mobile-hide" style="padding-top: 20px; padding-bottom: 0; vertical-align: bottom;" valign="bottom">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-bottom: 0px; vertical-align: bottom;" align="right" valign="bottom"><img style="vertical-align: bottom; padding-bottom: 10px;" src="https://pandorafms.com/images/alerta_verde.png" alt="" width="130"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="background-color: #f8f8f8; border-bottom: 1px solid #e7e7e7; padding-top: 10px;" valign="top"><center>
<table class="w320" style="height: 100%; width: 600px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="mobile-padding" style="padding: 20px;" valign="top">
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-right: 20px;" colspan="2"><strong>Monitoring details</strong></td>
</tr>
<tr>
<td style="padding-top: 25px; width: 150px; border-top: 1px solid #E7E7E7; vertical-align: top;"><strong>Data</strong></td>
<td style="padding-top: 25px; padding-right: 20px; border-top: 1px solid #E7E7E7; vertical-align: top;">_data_ <em>(_modulestatus_)</em></td>
</tr>
<tr>
<td><strong>Agent</strong></td>
<td>_agent_ <em>_address_</em></td>
</tr>
<tr>
<td><strong>Module</strong></td>
<td>_module_ <em>_moduledescription_ </em></td>
</tr>
<tr>
<td><strong>Timestamp</strong></td>
<td>_timestamp_</td>
</tr>
</tbody>
</table>
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-top: 20px;">
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="vertical-align: top;" width="350">This is a graph of latest 24hr data for this module: <br><br> _modulegraph_24h_</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center></td>
</tr>
<tr>
<td style="background-color: #1f1f1f;"><center>
<table class="w320" style="height: 100%; color: #ffffff; width: 600px;" border="0" cellspacing="0" cellpadding="0" bgcolor="#1f1f1f">
<tbody>
<tr>
<td class="mobile-padding" style="font-size: 12px; padding: 20px; background-color: #1f1f1f; color: #ffffff; text-align: center;" align="right" valign="middle"><a style="color: #ffffff;" href="https://pandorafms.com/company/contact/">Contact Us</a>  |   <a style="color: #ffffff;" href="https://forums.pandorafms.com/">Support</a>  |   <a style="color: #ffffff;" href="https://wiki.pandorafms.com">Docs</a>  |  </td>
</tr>
</tbody>
</table>
</center></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>','text/html','','','','','','')

tanimientras avatar Nov 14 '17 13:11 tanimientras

Hello! please remember sql_mode must be set to "" in /etc/my.cnf

https://wiki.pandorafms.com/index.php?title=Pandora:FAQ#Error:_.22A_problem_occurred_when_adding_the_module._Processing_error.22

Hope it helps you

fbsanchez avatar Dec 13 '17 22:12 fbsanchez

that solves

c-nunes avatar Sep 14 '18 17:09 c-nunes