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. Deleting old entries from alarms table

Deleting old entries from alarms table

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 25.4k 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.
  • K
    K
    KjellO
    wrote on last edited by
    #1

    Hi!
    I have not been able to find any retention settings for the alarms table, in the same way you can set retention for events (Server config). Am I missing something?

    Otherwise, is it safe to manually delete old entries from alarms table? Are there some related tables that should be cleaned as well? Could deletion be done while the netxms server is running?
    Postgres database, if that matters.

    Table has grown quite large over time, and I would like to set up some archiving procedure.
    netxms=# select count(*) from alarms;
     count 
    --------
     579673
    (1 row)

    Best regards,
    Kjell

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

      Hi!

      Yes, it's actually a bug. There should be retention time for alarms. I'll add it to bug list.
      Currently, you can safely delete terminated alarms while NetXMS server is running. You can do it like this:

      DELETE FROM alarms WHERE alarm_state=2 AND last_change_time<(timestamp here)

      We use UNIX timestamp (seconds since 01.01.1970 00:00:00 UTC).

      Best regards,
      Victor

      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