<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Deleting old entries from alarms table]]></title><description><![CDATA[<p dir="auto">Hi!<br />
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?</p>
<p dir="auto">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?<br />
Postgres database, if that matters.</p>
<p dir="auto">Table has grown quite large over time, and I would like to set up some archiving procedure.<br />
netxms=# select count(*) from alarms;<br />
 count <br />
--------<br />
 579673<br />
(1 row)</p>
<p dir="auto">Best regards,<br />
Kjell</p>
]]></description><link>https://forum.netxms.org/topic/1579/deleting-old-entries-from-alarms-table</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:16:50 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1579.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Jan 2012 16:37:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Deleting old entries from alarms table on Tue, 31 Jan 2012 17:52:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Yes, it's actually a bug. There should be retention time for alarms. I'll add it to bug list.<br />
Currently, you can safely delete terminated alarms while NetXMS server is running. You can do it like this:</p>
<p dir="auto">DELETE FROM alarms WHERE alarm_state=2 AND last_change_time&lt;(timestamp here)</p>
<p dir="auto">We use UNIX timestamp (seconds since 01.01.1970 00:00:00 UTC).</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/6838</link><guid isPermaLink="true">https://forum.netxms.org/post/6838</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 31 Jan 2012 17:52:13 GMT</pubDate></item></channel></rss>