How do i use Cisco Pix Regex to insert into mysql

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

How do i use Cisco Pix Regex to insert into mysql

Postby speedfox » Thu Oct 02, 2008 11:22 am

Hi Guys

Ive got the regex for Cisco pix as being
regexp=(?P<date>\SYSLOG_DATE)\s*(?P<sensor>[^\s]*).*:.*?(PIX|ASA)-\d-(?P<sid>\d+):.*?(from|src|for inside|for outside|src inside|src outside).*?(?P<src>\IPv4)(\/(?P<sport>\d+))?.*?(dst|to inside|to outside|dst inside|dst outside).*?(?P<dst>\IPv4)(\/(?P<dport>\d+))?

how do i configure the rsyslog.conf that a message conforms to the above regex then it must insert into mysql.SystemEvents table?\

Please help

Thanks
Stuart
speedfox
Frequent Poster
 
Posts: 70
Joined: Wed Oct 01, 2008 2:07 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: How do i use Cisco Pix Regex to insert into mysql

Postby mph » Fri Oct 03, 2008 3:07 pm

Check out: http://kb.monitorware.com/cisco-pix-asa-logging-starter-t8720.html

It only has a few examples, but that's all I needed. As best as I can figure you have to filter by the identifiers I.E. ASA-7-106100, etc... It's kinda crude but it does work. If you do find a better way please post it!!!

Hope it helps,
mph
Avarage
 
Posts: 16
Joined: Tue Sep 23, 2008 4:19 pm

Re: How do i use Cisco Pix Regex to insert into mysql

Postby speedfox » Mon Oct 06, 2008 8:14 am

thanks that did work
however i need 1 more field from it. i need the message id
%PIX-5-106100: access-list acl-inside permitted udp inside/100.1.1.1(100) -> outside/<200.1.1.1(137) hit-cnt 5 (first hit)
in the above example it would be 106100

i can get it by using substring, but i would prefer a more reliable method.any ideas?
speedfox
Frequent Poster
 
Posts: 70
Joined: Wed Oct 01, 2008 2:07 pm

Re: How do i use Cisco Pix Regex to insert into mysql

Postby mph » Mon Oct 06, 2008 6:52 pm

I haven't had time to test this but it should work.

Code: Select all
'%msg:R,ERE,1,BLANK:PIX-5-(.*):--end%'
mph
Avarage
 
Posts: 16
Joined: Tue Sep 23, 2008 4:19 pm

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron