Hi All,
I don't know if this is the place to ask but i don't see any ELSA forum?? please point me in the right direction if i missed it.
Im trying to create a new parser og class if you will.
I have read the documentation at the ELSA site and i think i understand most of it
https://code.google.com/p/enterprise-log-search-and-archive/wiki/Documentation#Adding_Parsers
Now the part that i have trouble understanding is:
Fields creation
and
the use of i0 i1 i2 s0
First Field creation:
quote from documentation:
Our fields will be conn_bytes, srcip, and dstip, which already exist in the "fields" table as well as "myuser" which we will create here for demonstration purposes:
INSERT INTO fields (field, field_type, pattern_type) VALUES ("myuser",
"string", "QSTRING");
INSERT INTO fields_classes_map (class_id, field_id, field_order)
VALUES ((SELECT id FROM classes WHERE class="NEWCLASS"), (SELECT
id FROM fields WHERE field="srcip"), 5);
INSERT INTO fields_classes_map (class_id, field_id, field_order)
VALUES ((SELECT id FROM classes WHERE class="NEWCLASS"), (SELECT
id FROM fields WHERE field="conn_bytes"), 6);
INSERT INTO fields_classes_map (class_id, field_id, field_order)
VALUES ((SELECT id FROM classes WHERE class="NEWCLASS"), (SELECT
id FROM fields WHERE field="dstip"), 7);
Now the string field "myuser" at field_order 11, which maps to the first string column "s0":
INSERT INTO fields_classes_map (class_id, field_id, field_order)
VALUES ((SELECT id FROM classes WHERE class="NEWCLASS"), (SELECT
id FROM fields WHERE field="myuser"), 11);
Quote end
We have chosen to use source ip, destination ip and byte count which already exist in the database with the field_order og 5 6 and 7. How do we know that? Can i look it up somehow? I may need to make a class with another field that may allready exist and so i need to know its filed_order number.
Also we choose to create a new filed called myuser and give it field_order number of 11. The documentation state we do this because it would match the first string column of s0.
What is s0? and how should use this in the future if I have more custom fields i need to create?
also field_number 5 6 7 is said to match i0 i1 i2 in the schema. How should I relate to this if I have more predefined fields then 3?
I really love ELSA and what it gives me and learning to do this brings it to a whole new level!!
A big thank your to the ELSA team out there... outstanding work!
Thanks
Casper
--
You received this message because you are subscribed to the Google Groups "security-onion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to security-onio...@googlegroups.com.
To post to this group, send email to securit...@googlegroups.com.
Visit this group at http://groups.google.com/group/security-onion?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Arg... im so not used to this!!
ok so i played around the mysql server of SO and god it took me a while to figure out i had to end my statements with a ; before i would accept them. When i got through that i tried a show databases; that got me a database test and information_schema where the only one showing any tables was information_schema but none of what you mention Martin?
this is the output of information_schema:
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEY_COLUMN_USAGE |
| PARAMETERS |
| PARTITIONS |
| PLUGINS |
| PROCESSLIST |
| PROFILING |
| REFERENTIAL_CONSTRAINTS |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| SESSION_VARIABLES |
| STATISTICS |
| TABLES |
| TABLESPACES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
| INNODB_BUFFER_PAGE |
| INNODB_TRX |
| INNODB_BUFFER_POOL_STATS |
| INNODB_LOCK_WAITS |
| INNODB_CMPMEM |
| INNODB_CMP |
| INNODB_LOCKS |
| INNODB_CMPMEM_RESET |
| INNODB_CMP_RESET |
| INNODB_BUFFER_PAGE_LRU |
+---------------------------------------+
what am i doing wrong??
I think i got what i need to learn the rest on my own..
THANKS!...again
/Casper