# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. citrix_netscaler = { plugin_version = "1.3.3" info.1.manufacturer = "Citrix" info.1.device = "NetScaler" info.1.version.1 = "8.0" info.1.version.2 = "9.0" # build 67.7 # 2007-10-22 - 1.0 - KBB - Initial creation # 2008-04-07 - 1.1 - KBB - Added support for new line format (Context lines) # 2008-09-19 - 1.2 - GMF - Added support for variant with an integer before the : # 2009-06-12 - 1.2.1 - GMF - Added support for extracting CMD_EXECUTED lines # 2009-06-18 - 1.2.2 - KBB - Added support for variant with an integer before the second : # 2009-07-16 - 1.2.3 - GMF - Fixed bug with tracking of "command" field # 2009-07-29 - 1.2.4 - GMF - Added support for Device...State lines # 2009-08-24 - 1.3 - KBB - Added support for Citrix 9.0. Also fixed duration calculation for # Context lines, added support for more Context lines, and added support for commands with # quotes in them. Grouped reports since there are so many fields now. Grouping could be better. # 2009-08-26 - 1.3.1 - KBB - Removed logging of end and delink times. Added duration calculation # for start_time and end_time. (end_time and delink_time seem always the same as date_time.) # 2009-08-27 - 1.3.2 - KBB - Added support for Monitor...State lines # 2010-12-20 - 1.3.3 - gas - added new variant (session id field) # The name of the log format log.format.format_label = "Citrix NetScaler Log Format" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression #Oct 10 22:39:13 66.36.236.66 10/10/2007:14:39:13 GMT ns : APPFW APPFW_STARTURL : 220.133.110.194 fetpoc Disallow Illegal URL: http://61.31.230.67/board/ #2007-11-09 11:25:35 Local0.Info 10.2.66.226 11/09/2007:03:25:05 GMT agee : SSLVPN TCPCONNSTAT : Context user01@10.2.66.226 - User user01 - Client_ip 10.2.66.226 - Nat_ip 10.2.66.226 - Vserver 10.2.66.236:443 - Source 10.2.66.226:1404 - Destination 127.0.0.1:80 - Start_time "11/09/2007:03:25:04 GMT" - End_time "11/09/2007:03:25:05 GMT" - Duration 00:00:01 - Total_bytes_send 463 - Total_bytes_recv 2379 - Total_compressedbytes_send 0 - Total_compressedbytes_recv 0 - Compression_ratio_send 0.00% - Compression_ratio_recv 0.00% - Access Allowed - Group(s) "accounting" #2009-06-17 17:08:41 Local0.Info 172.16.55.55 06/18/2009:01:07:20 GMT access : UI CMD_EXECUTED 8454 : User poweruser - Remote_ip 172.16.54.54 - Command "login" - Status "Success" #Aug 17 15:00:00 155.155.155.55 08/17/2009:19:00:00 GMT : TCP CONN_DELINK 170566 : Source 10.5.55.55:2567 - Vserver 155.155.155.54:443 - NatIP 155.155.155.56:49734 - Destination 155.155.155.57:9212 - Delink Time 08/17/2009:19:00:00 GMT - Total_bytes_send 0 - Total_bytes_recv 12918 log.format.autodetect_regular_expression = "[0-9]{2}/[0-9]{2}/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} [^ ]+ ([^ ]+)? ([A-Z0-9-]+ )?: [A-Z_]+ [A-Z_]+ ([0-9]+ )?: " log.format.autodetect_lines = 20000 # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" log.fields = { host_name = "" application_type = "" validation_type = "" client_ip = "" application = "" url.type = "page" message = "" result = "" context = "" user = "" nat_ip = "" vserver = "" source_ip = "" source_port = "" destination_ip = "" destination_port = "" groups = "" remote_ip = "" command = "" status = "" device = "" monitor = "" state = "" browser_type.type = "agent" sslvpn_client_type = "" start_time = "" # end_time = "" # delink_time = "" duration = "" total_bytes_send = "" total_bytes_recv = "" http_resources_accessed = "" nonhttp_resources_accessed = "" total_tcp_connections = "" total_udp_flows = "" total_policies_allowed = "" total_policies_denied = "" } # log.fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'events = 1;' } # mark_entry } # log.filters log.parsing_filters.parse = ` #Aug 29 11:54:32 66.66.236.66 08/29/2007:03:54:32 GMT ns : APPFW APPFW_FIELDFORMAT : 216.66.216.66 znet_hello http://hello.znet.goodbye.tw/book.jsp?id=2G024132&status=1&searchFunction=&searchContent=&searchStatus=-1&searchSO=&searchUserID=&searchStage=0&year=2007&month=08&day=29&year2=2007&month2=08&day2=29&setupyear=null&setupmonth=n Field format check failed for field searchfunction="" if (matches_regular_expression(v.syslog_message, '^ *([0-9]{2}/[0-9]{2}/[0-9]{4}):([0-9]{2}:[0-9]{2}:[0-9]{2}) [^ ]+ ([^ ]+)? ([A-Z0-9-]+ )?: ([^ ]+) ([^ ]+) ([0-9]+ )?: (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'host_name', $3); set_collected_field('', 'application_type', $5); set_collected_field('', 'validation_type', $6); v.message = $8; # e.g. #Oct 11 02:28:30 66.36.236.66 10/10/2007:18:28:30 GMT ns : APPFW APPFW_XSS : 226.166.116.166 falcon http://falcon.hawk.com/prey/?search= Cross-site script check failed for search="