<div dir="ltr">Thanks!!! Just what I needed!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-07 14:19 GMT+01:00 Juan Hernández <span dir="ltr">&lt;<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/07/2015 02:05 PM, Koen Vanoppen wrote:<br>
&gt; Thanks. But, is there no other way, besides screwing around in the database?<br>
&gt;<br>
<br>
</span>You can use the Python SDK:<br>
<br>
#!/usr/bin/python<br>
<br>
import ovirtsdk.api<br>
import ovirtsdk.xml<br>
<br>
api = ovirtsdk.api.API(<br>
  url=&quot;<a href="https://engine.example.com/ovirt-engine/api" target="_blank">https://engine.example.com/ovirt-engine/api</a>&quot;,<br>
  username=&quot;admin@internal&quot;,<br>
  password=&quot;******&quot;,<br>
  ca_file=&quot;/etc/pki/ovirt-engine/ca.pem&quot;<br>
)<br>
<br>
alerts = api.events.list(query=&quot;severity=alert&quot;)<br>
for alert in alerts:<br>
    alert.delete()<br>
<br>
api.disconnect()<br>
<span class=""><br>
<br>
&gt; 2015-01-07 13:07 GMT+01:00 Eli Mesika &lt;<a href="mailto:emesika@redhat.com">emesika@redhat.com</a><br>
</span>&gt; &lt;mailto:<a href="mailto:emesika@redhat.com">emesika@redhat.com</a>&gt;&gt;:<br>
<span class="">&gt;<br>
&gt;<br>
&gt;<br>
&gt;     ----- Original Message -----<br>
&gt;     &gt; From: &quot;Koen Vanoppen&quot; &lt;<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a><br>
</span><span class="">&gt;     &lt;mailto:<a href="mailto:vanoppen.koen@gmail.com">vanoppen.koen@gmail.com</a>&gt;&gt;<br>
&gt;     &gt; To: <a href="mailto:users@ovirt.org">users@ovirt.org</a> &lt;mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;<br>
&gt;     &gt; Sent: Wednesday, January 7, 2015 7:42:25 AM<br>
&gt;     &gt; Subject: [ovirt-users] Alerts<br>
&gt;     &gt;<br>
&gt;     &gt; Hi All,<br>
&gt;     &gt;<br>
&gt;     &gt; We recently had a major crash on our ovirt environment due a<br>
&gt;     strange bug (has<br>
&gt;     &gt; been reported in the meanwhile).<br>
&gt;     &gt;<br>
&gt;     &gt; But now we are left we a bunch of aerts (+100) that are still standing<br>
&gt;     &gt; there... Is there a way I can flush them manually from command<br>
&gt;     line or so?<br>
&gt;     &gt; Because the right click+clear all, doesn&#39;t seem to work that<br>
&gt;     good... :-).<br>
&gt;<br>
&gt;     If you want to remove ALL alerts run from command line<br>
&gt;<br>
&gt;     psql -U engine -c &quot;delete from audit_log where severity = 10;&quot; engine<br>
&gt;<br>
&gt;     NOTE:<br>
&gt;     Keep in mind that before any manual operation on your database you<br>
&gt;     should backup it first.<br>
&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; Kind regards,<br>
&gt;     &gt;<br>
&gt;     &gt; Koen<br>
&gt;     &gt;<br>
&gt;     &gt; _______________________________________________<br>
&gt;     &gt; Users mailing list<br>
</span>&gt;     &gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>&gt;<br>
&gt;     &gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<div class="HOEnZb"><div class="h5">&gt;     &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</font></span></blockquote></div><br></div>