On Fri, May 10, 2013 at 6:34 PM, Jeremy Hoel <
jth...@gmail.com> wrote:
> Just a quick update..
>
> When I got back from lunch I went through and set all the sensors to
> go back and rebuild barnyard using the older 2.1.11 build. Once they
> finished building and starting up, after caching was complete and I
> got the Database: output in the logs.. once all of them caught up,
> mysql usage dropped back down to it's normal sub 5% usage. Before
> that, hours in, none of the 40+ sensors had gotten that far. This
> only took about 10 minutes a box, once the startup started
>
> I was going to try and use the fix-signals branch first, but I
> couldn't see it in the firnsy tree.. i see now it's in binf. That was
> going to be my first test. So, right now I'll let this stabilize over
> the weekend.. make sure all the alerts catch up and come in and then
> look about trying the upgrade again next week.
>
Fix-signals will fix whats the query executed below 638 occurences
of the same signature,generator couple, there must have been also some restart
in there. (automatic rule update script (start/stop mabey??)
It will be upstreamed soon an 2-1.13 will be tagged soon enough,
firnsy lives in oceania and i lives in north america
so there is a slight delay in communication inherently derived from that ;).
Yesturday i worked with Bill green to fix exactly whats i think is
happening below and is a regression issue due to integration
of support for sid-msg.mapv2 format in barnyard2.
> This seems to be constant now.. not moving up or anything..
>
> mysql> select count(*) from signature;
> +----------+
> | count(*) |
> +----------+
> | 302805 |
> +----------+
> 1 row in set (0.06 sec)
>
Constant but obviously rediculous if you have ~15k possible sigs and you end
up having 300k entries in the signature table (see above)
Now the problem there is with the schema is that events logged are
logged with database
sid_id and not real gid,sid,rev. If you let it run over the weekend
then the recovery process can become harder
if you do not archive your unified2 files.
So, if you can and trust me since my fix at the time of this writing
has not been yet upstreamed, i would greatly suggest
to use the branch link i provided you as source.
If you want to wait, then you should make sure that you keep unified2
files, delete waldo and re-process old unified2 file when you make the
move.
If you want more clarifications do not hesitate i will try to express
it better, and your testing is appreciated, hopefully we do not want
to
hinder your detection capapbility, and those steps are also
considering this. (in any cases people should archive unified2 file in
uncompressed or compressed form,
for a while in case they hit a DRP senario.)
> Here's the query you asked about. I'm going to hold on on deleteing
> anything until you have a look and We get a good idea where we might
> need to go. Like I said, right now it's stable, alerts are showing up
> and they have the correct information in them.
>
>
>
<SNIP>
> mysql> SELECT * FROM (SELECT count(*) AS a,sig_sid,sig_gid FROM
> signature GROUP BY sig_sid,sig_gid) AS tq WHERE tq.a>1;
> +-----+---------+---------+
> | a | sig_sid | sig_gid |
> +-----+---------+---------+
> | 638 | 1 | 2 |
> | 638 | 1 | 100 |
> | 638 | 1 | 101 |
> | 638 | 1 | 102 |
>
</SNIP>
>
>
>
> And I hear you about the DB on the VM.. but again, it's become fairly
> common, depending on how used it is. We have about 300 events a day..
> so it's not getting super taxed.
>
Well it depends, if its for "local" uses lets say a org with a few
sensors (below hundreds) it should be technically fine,
allways depends on the hypervison and how the ressources are splited
betwen guests. But ultimately if you are at one point
wondering why some operations could be slow (query) this could be a
root issue, especialy in a heavy transactional environement.
If you are only consulting/querying the information and depending on
the ressources assigned/reserved
to the guest it could be fine but its a complete different topic in it
self that i would currently
discard because of the resultset you returned from the query i asked
you for "above".
Lets hope this helps clarify some stuff, its friday.
-elz