Question on using -record with rasqlinsert and rasql
Carter Bullard
carter at qosient.com
Mon Sep 9 10:01:58 EDT 2013
Hey Jesse,
Yes, this is the expected result. From the mysql man page:
The principal function of rasql is to extract the 'record'
binary blob that is inserted by rasqlinsert.1 when adding
argus data to a mysql table.
If you would like to consider as an option, raconvert() can
convert ascii to argus, we could attempt to convert the database
table contents to argus, if the record isn't there.
BUT, there is a minimum set of data that the schema would have to
have to create a reasonable argus record, not sure how to convey
that requirement with a tool like that.
Carter
On Sep 8, 2013, at 10:28 PM, Jesse Bowling <jessebowling at gmail.com> wrote:
> I've noticed that if I created tables using rasqlinsert with a "-s -record" option, I'm unable to retrieve results using rasql. Is this expected behavior?
>
> # rasqlinsert --version
> RaCurses Version 3.0.7.15
> #rasqlinsert -m saddr -s "saddr stime ltime -record" -S localhost -w mysql://argus@localhost/argusip/aip_%Y_%m_%d -M time 1d drop rmon -d
>
> mysql> select saddr,stime,ltime from aip_2013_09_08 limit 1;
> +-------------+-------------------+-------------------+
> | saddr | stime | ltime |
> +-------------+-------------------+-------------------+
> | 10.10.10.251 | 1378693276.958246 | 1378693402.167377 |
> +-------------+-------------------+-------------------+
>
> #rasql -M time 1d sql="saddr='10.10.10.251'" -r mysql://argus@localhost/argusip/aip_%Y_%m_%d -t 2013/09/08 -D 10
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.665861 ArgusInitAddrtoname (0x7f158f4d0010, 0x0, 0x0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671441 ArgusParseInit(0x7f158f4d0010, NULL)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671586 ArgusCalloc (1, 480) returning 0x1736070
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671720 ArgusCalloc (1, 112) returning 0x1736260
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671808 ArgusCalloc (1, 72) returning 0x17362e0
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671833 ArgusNewQueue () returning 0x17362e0
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671855 ArgusCalloc (1, 56) returning 0x1736330
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671895 ArgusCalloc (65536, 8) returning 0x8f241010
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.671980 ArgusNewHashTable (65536) returning 0x1736330
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672008 ArgusCalloc (1, 72) returning 0x1736370
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672030 ArgusNewQueue () returning 0x1736370
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672064 ArgusCalloc (1, 72) returning 0x17363c0
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672140 ArgusNewQueue () returning 0x17363c0
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672165 ArgusCalloc (1, 72) returning 0x1736410
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672187 ArgusNewQueue () returning 0x1736410
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672209 ArgusCalloc (1, 512) returning 0x1736460
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.672612 ArgusCalloc (1, 1272) returning 0x1736740
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684176 RaMySQLInit () RaSource (null) RaArchive (null) RaFormat (null)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684214 ArgusCalloc (8, 65536) returning 0x8e6be010
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684907 ArgusFree (0x169b610)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684924 ArgusFree (0x169b5b0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684930 ArgusFree (0x169b550)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684934 ArgusFree (0x169b4f0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684939 ArgusFree (0x169b490)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684943 ArgusFree (0x169b430)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684947 ArgusFree (0x169b3d0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684952 ArgusFree (0x169b370)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684956 ArgusFree (0x169b310)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684961 ArgusFree (0x169b2b0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684965 ArgusFree (0x169b250)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684969 ArgusFree (0x169c5c0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684974 ArgusFree (0x169c620)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684978 ArgusFree (0x169c680)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684983 ArgusFree (0x169c6e0)
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.684989 ArgusCalloc (1, 80) returning 0x169c6e0
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.685003 ArgusCalloc (1, 80) returning 0x169c680
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.685011 ArgusCalloc (1, 80) returning 0x169c620
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.685033 ArgusCalloc (1, 461728) returning 0x8e64d010
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.685054 SQL Query SELECT record from aip_2013_09_08 WHERE saddr='10.10.10.251'
> rasql[28926.c047578f157f0000]: 09/08/13 22:24:51.685515 ArgusShutDown (2)
>
>
> I can understand if this is expected, but I was hoping to leverage a single interface to the data (rasql) rather than having to access via mysql myself...
>
> Cheers,
>
> Jesse
>
> --
> Jesse Bowling
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6837 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20130909/71ebfd95/attachment.bin>
More information about the argus
mailing list