[R4.1-41]: session logging format in syslog is not correct and different from logging in agent log

Bug #1731212 reported by alok kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.1
Fix Committed
High
Arvind
Trunk
Fix Committed
High
Arvind

Bug Description

when syslog session logging is enabled, session logging format is not correct.
It's missing aggregate and session map.
In case of agent, it's SessionEndpointObject but for syslog it's printing SessionData.

with this it's difficult to identify which is local ip/port and which one is remote.

And for consistency also we may need to follow the same format as in agent log.

session logged in syslog:

Nov 9 16:05:06 nodec62 contrail-vrouter-agent[25754]: 2017-11-09 Thu 16:05:06:078.622 IST nodec62 [Thread 139761092937472, Pid 25754]: [SYS_INFO]: SessionData: [ vmi = default-domain:admin:bf8f6cc0-ee17-46b2-80d4-76f7e62e9c4e vn = default-domain:admin:vn1 ] security_policy_rule = 00000000-0000-0000-0000-000000000001 remote_vn = default-domain:admin:vn2 is_client_session = 1 is_si = 0 vrouter_ip = 10.204.217.102 ip = 1.1.1.3 port = 0 protocol = 1 sampled_forward_bytes = 98 sampled_forward_pkts = 1 sampled_reverse_bytes = 0 sampled_reverse_pkts = 0 ip = 2.2.2.3 port = 2121 forward_flow_info= [ sampled_bytes = 98 sampled_pkts = 1 flow_uuid = 4633707c-ac14-4e3f-bd6f-f21089593278 tcp_flags = 0 setup_time = 1510223705458015 action = pass sg_rule_uuid = 4e260eee-c526-11e7-992b-0242ac110002 nw_ace_uuid = 6e2ae15c-dde7-412b-ada3-d0a75a28e3ef underlay_source_port = 57441 ] reverse_flow_info= [ flow_uuid = 2ee8864e-173c-428a-b682-c38042b8d2d7 setup_time = 1510223705458015 action = pass sg_rule_uuid = 4e260eee-c526-11e7-992b-0242ac110002 nw_ace_uuid = 6e2ae15c-dde7-412b-ada3-d0a75a28e3ef ] vm = 7cde62dc-5aa3-4ca4-bb86-110c588a9381 other_vrouter_ip = 10.204.216.69 underlay_proto = 2 ]

session logged in agent log file:

2017-11-09 Thu 16:17:23:448.904 IST nodec62 [Thread 139916723578624, Pid 26970]: [SYS_INFO]: SessionEndpointObject: session_data= [ [ [ vmi = default-domain:admin:bf8f6cc0-ee17-46b2-80d4-76f7e62e9c4e vn = default-domain:admin:vn1 security_policy_rule = 00000000-0000-0000-0000-000000000001 remote_vn = default-domain:admin:vn2 is_client_session = 1 is_si = 0 vrouter_ip = 10.204.217.102 sess_agg_info= [ [ [ ip = 1.1.1.3 port = 0 protocol = 1 ] [ sampled_forward_bytes = 98 sampled_forward_pkts = 1 sampled_reverse_bytes = 0 sampled_reverse_pkts = 0 sessionMap= [ [ [ ip = 2.2.2.3 port = 3661 ] [ forward_flow_info= [ sampled_bytes = 98 sampled_pkts = 1 flow_uuid = 554e4d82-7270-4631-967c-eaa6dffaa2bf tcp_flags = 0 setup_time = 1510224442784313 action = pass sg_rule_uuid = 4e260eee-c526-11e7-992b-0242ac110002 nw_ace_uuid = 6e2ae15c-dde7-412b-ada3-d0a75a28e3ef underlay_source_port = 59952 ] reverse_flow_info= [ flow_uuid = 1df26364-e452-4fd4-bea4-2ae6f26ef0a2 setup_time = 1510224442784313 action = pass sg_rule_uuid = 4e260eee-c526-11e7-992b-0242ac110002 nw_ace_uuid = 6e2ae15c-dde7-412b-ada3-d0a75a28e3ef ] vm = 7cde62dc-5aa3-4ca4-bb86-110c588a9381 other_vrouter_ip = 10.204.216.69 underlay_proto = 2 ], ] ] ], ] ] ], ] ]

Tags: analytics
Revision history for this message
Anish Mehta (amehta00) wrote :

We need to differentiate between local-ip and remote-ip, and between service-port and client-port.
But, we will not have any concept of aggregates or maps in the syslog

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/37415
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/37415
Committed: http://github.com/Juniper/contrail-controller/commit/b1f1fad0315993ce274011296b1a18d1dda43690
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit b1f1fad0315993ce274011296b1a18d1dda43690
Author: arvindvis <email address hidden>
Date: Fri Nov 10 15:06:16 2017 -0800

The syslog message containing the session has 2 ip and 2 port fields
Modifying the field names so that the ip and port in the key of the
outer map(SessionIpPortProtocol) as local_ip and service_port
Closes-Bug: 1731212

Change-Id: I292fb08b46ab826424b74d3ed0f4151bf67cb38b

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/37489
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/37542
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/37489
Committed: http://github.com/Juniper/contrail-controller/commit/e4d74998efa2145daa45bf843d0a5c50dc1b21dd
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit e4d74998efa2145daa45bf843d0a5c50dc1b21dd
Author: arvindvis <email address hidden>
Date: Mon Nov 13 18:46:08 2017 -0800

The syslog message containing the session has 2 ip and 2 port fields
Modifying the field names so that the ip and port in the key of the
outer map(SessionIpPortProtocol) as local_ip and service_port
Closes-Bug: 1731212

Change-Id: I37a20f70282d8f708b5c88884d26be01a4e65b6e

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/37542
Committed: http://github.com/Juniper/contrail-controller/commit/2adaf9e13fd2aa036386e421851a83b0943359a8
Submitter: Zuul (<email address hidden>)
Branch: master

commit 2adaf9e13fd2aa036386e421851a83b0943359a8
Author: arvindvis <email address hidden>
Date: Mon Nov 13 18:46:08 2017 -0800

The syslog message containing the session has 2 ip and 2 port fields
Modifying the field names so that the ip and port in the key of the
outer map(SessionIpPortProtocol) as local_ip and service_port
Closes-Bug: 1731212

Change-Id: I37a20f70282d8f708b5c88884d26be01a4e65b6e

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.