Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. The table 'alarm_event' is full in NetXMS 4.5.3-1 version

The table 'alarm_event' is full in NetXMS 4.5.3-1 version

Scheduled Pinned Locked Moved Support
10 Posts 3 Posters 69.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    J
    jbriseno
    wrote on last edited by
    #1

    Hi, there. five days ago, we did no able to log into the NetXMS server. The NetXMS client sent back the following message: Connection refused. I decided to look up for in the log of the system. I found the following message:

    2024.02.14 16:49:51.981 *E* [db.drv            ] SQL query failed (Query = "INSERT INTO alarm_events (alarm_id,event_id,event_code,event_name,severity,source_object_id,event_timestamp,message) VALUES (?,?,?,?,?,?,?,?)"): The table 'alarm_events' is full

    Any idea how to fix this database issue? Thanks in advance.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      it looks to be disk space issue. You probably can truncate biggest tables (possible candidates are event_log and top idata_ tables). 
      If you are ok with losing all alarms and event history, you can truncate tables event_log, alarms, alarm_events, and alarm_notes.

      What database you are using?

      Best regards,
      Victor

      1 Reply Last reply
      0
      • J
        J
        jbriseno
        wrote on last edited by
        #3

        Hi, Victor. First, I appreciate your time to reply my message. Second, even better you reply it as soon as possible. Third, we are using: mysql  Ver 15.1 Distrib 10.3.39-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

        Best regards !
        Jose

        1 Reply Last reply
        0
        • J
          J
          jbriseno
          wrote on last edited by
          #4

          Before to do it. Do I have to think about the primary key on these tables? because, I had have problems with mariaDB tables when I use the Mysql TRuncate table command. Thanks in advance

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

            Seems to be MariaDB specific issue. I'm not an expert on it unfortunately, but seems that they have all sort of strange limits on tables. One thing you may want to look at is big_tables configuration option. Maybe you should turn it on. Or consider migration to PostgreSQL 🙂
            How many records do you have in this table? And how many active alarms? It is a bit unexpected that event_log for example works fine, but alarm_events is full. This table should contain event records for active alarms only.

            Best regards,
            Victor

            P.S. Primary key on that table is alarm_id,event_id - those are two integers, so should not be an issue as such.

            1 Reply Last reply
            0
            • J
              J
              jbriseno
              wrote on last edited by
              #6

              Awesome ! Thanks ! I will do it.

              Best regards

              Jose

              1 Reply Last reply
              0
              • J
                J
                jbriseno
                wrote on last edited by
                #7

                Victor, for your information: 

                event_log table

                105941216 rows

                alarm_events table

                55125439  rows

                MariaDB [netxms]> describe alarm_events;
                +------------------+---------------+------+-----+---------+-------+
                | Field            | Type          | Null | Key | Default | Extra |
                +------------------+---------------+------+-----+---------+-------+
                | alarm_id        | int(11)      | NO  | PRI | NULL    |      |
                | event_id        | bigint(20)    | NO  | PRI | NULL    |      |
                | event_code      | int(11)      | NO  |    | NULL    |      |
                | event_name      | varchar(63)  | YES  |    | NULL    |      |
                | severity        | int(11)      | NO  |    | NULL    |      |
                | source_object_id | int(11)      | NO  |    | NULL    |      |
                | event_timestamp  | int(11)      | NO  |    | NULL    |      |
                | message          | varchar(2000) | YES  |    | NULL    |      |
                +------------------+---------------+------+-----+---------+-------+
                8 rows in set (0.027 sec)

                1 Reply Last reply
                0
                • J
                  J
                  jbriseno
                  wrote on last edited by
                  #8

                  Victor. I have other question:

                  Do I need to stop the NetXMS server before to truncate both tables?

                  1 Reply Last reply
                  0
                  • V
                    V
                    Victor Kirhenshtein
                    wrote on last edited by
                    #9

                    Yes, it's better to stop it.

                    Best regards,
                    Victor

                    1 Reply Last reply
                    0
                    • B
                      B
                      bdefloo
                      wrote on last edited by
                      #10

                      Hi,

                      Hopping over from https://www.netxms.org/forum/general-support/netxmsd-hangs-during-startup/ to say thanks for the pointer towards alarm_events which solved my issue!

                      I also had a huge number of rows in this table, and found the culprit in a misconfigured event processing policy which was catching too many events. You may also have something similar.

                      In my case I discovered it by looking at alarms with very high repeat counts. If you open the alarm details it will show the EPP rule which created it.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      Powered by NodeBB Contributors
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups