Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c73c400
Merge pull request #1 from Juniper/master
Oct 3, 2014
5fd6145
Initial commit of IPFIX, with some limitations. Only UDP Server is su…
anishmehta Oct 3, 2014
fd62c60
Merge pull request #2 from rajreddy/anishm_ipfix00
Oct 3, 2014
c1b8ec0
snmp support
tedghose Oct 4, 2014
02f881f
missing file
tedghose Oct 4, 2014
405c1b9
vns.sandesh file
tedghose Oct 4, 2014
e7fd38a
Merge pull request #3 from rajreddy/ted-snmp
anishmehta Oct 5, 2014
6d9e730
name change bug
tedghose Oct 6, 2014
bb319d9
Merge pull request #4 from rajreddy/ted-snmp
tedghose Oct 6, 2014
9eda30a
Parsing of Ethernet header in SFlowParser
Oct 6, 2014
d0b62eb
Merge pull request #5 from rajreddy/sflow_ethernet
anishmehta Oct 6, 2014
9b141a8
check for optional field
tedghose Oct 6, 2014
15554f1
Merge pull request #6 from rajreddy/ted-snmp
anishmehta Oct 6, 2014
a7a9d1e
Fixed libipfix build. Added sip and dip as indexed for UFlow
anishmehta Oct 8, 2014
d338082
Merge pull request #7 from rajreddy/anishm_bfix
anishmehta Oct 8, 2014
4c8373b
topology backend
tedghose Oct 9, 2014
fc3f3b1
Merge pull request #8 from rajreddy/ted-snmp
anishmehta Oct 9, 2014
2d44be8
mem-leak isolated + FlowExportSourceIp support
tedghose Oct 9, 2014
6f8a137
Merge pull request #9 from rajreddy/ted-snmp
Oct 10, 2014
15b7202
Interface stats support
tedghose Oct 10, 2014
7bfa1b1
Merge pull request #10 from rajreddy/ted-snmp
Oct 11, 2014
e63a839
Merge commit 'e25bcb2645e2f5529a2b2ed4ffd5e246d041f27f' into HEAD
Oct 11, 2014
7219d01
Merge pull request #11 from rajreddy/rajreddy_2375
Oct 11, 2014
78e1147
add supervisord files for contrail-snmp-collector and contrail-topology
Oct 11, 2014
31d4362
Merge pull request #12 from rajreddy/rajreddy_sup_files
Oct 11, 2014
4f8a153
Overlay to Underlay map functionality. TODO: 1) Query validity 2) Err…
Oct 11, 2014
7289b12
Merge pull request #13 from rajreddy/overylay_to_underlay
Oct 12, 2014
0f76c1a
Update contrail-snmp-collector.ini
tedghose Oct 13, 2014
1daae15
Add support to do traceroute for a flow via Introspect from A…
haripk Oct 14, 2014
6b566af
Fix the following in diagnostic trace route:
haripk Oct 15, 2014
e189528
Enabling sflow, ipfix and syslog by default in contrail-collector
anishmehta Oct 15, 2014
5dde66f
stats and ifXTable support
tedghose Oct 15, 2014
d7c0621
Merge pull request #15 from rajreddy/ted-snmp
anishmehta Oct 15, 2014
41bd220
Merge pull request #14 from rajreddy/anishm_enableipfix
tedghose Oct 15, 2014
a3a37bd
defense against failures
tedghose Oct 16, 2014
ecdd319
Merge pull request #16 from rajreddy/ted-snmp
anishmehta Oct 16, 2014
d88a101
ip-mib support
tedghose Oct 17, 2014
75edfb4
Merge pull request #17 from rajreddy/ted-snmp
anishmehta Oct 17, 2014
92d1c53
snmp bug fix, syslog defaults to off
tedghose Oct 17, 2014
4d09771
Merge pull request #18 from rajreddy/ted-snmp
Oct 17, 2014
08a0702
Export underlay source port as 0 when encapsulation type is MPLSoGRE.
ashoksr Oct 17, 2014
e4c9e47
Merge pull request #19 from rajreddy/ashok_encap
Oct 20, 2014
5207398
comments update to reflect the daemons names...
Oct 20, 2014
28c1875
Merge pull request #20 from rajreddy/rajreddy_sup_files
Oct 20, 2014
f56299b
topology crash fix
tedghose Oct 20, 2014
0d8bbfc
Merge pull request #21 from rajreddy/ted-snmp
anishmehta Oct 21, 2014
2522f54
We need the ability to map overlay to underlay flow even when the ini…
anishmehta Oct 23, 2014
ae057bb
Merge pull request #22 from rajreddy/anishm_exported
Oct 23, 2014
e2a7dc5
Merge commit '1743e271be419255fec814bd4c600a19f36b0965' into rajreddy…
Nov 4, 2014
910eb32
Merge pull request #23 from rajreddy/rajreddy_2436
Nov 5, 2014
cb0d1f8
cherry-pick to get compilation working
tedghose Nov 8, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ subdirs = [
'gunit',
'hiredis',
'http_parser',
'libipfix',
'pugixml',
'rapidjson',
'thrift',
Expand Down
14 changes: 14 additions & 0 deletions lib/libipfix/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- mode: python; -*-

vpath = '#/third_party/libipfix_releases-arrabiata_100224'

env = DefaultEnvironment()

cmd = ('(cd ' + str(Dir(vpath)) + '; ./configure --prefix=' + Dir('#build').abspath + '; make; make install)')

products = [ str(File('#build/lib/libipfix.a')),
str(File('#build/include/ipfix.h')) ]

libipfix = env.Command('Makefile', str(Dir(vpath)), cmd)

env.SideEffect(products, libipfix)
16 changes: 15 additions & 1 deletion src/analytics/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ AnalyticsEnv.Prepend(LIBS=['cpuinfo',
'process_info',
'base',
'io',
'ipfix',
'misc',
'sandeshvns',
'pugixml',
'hiredis',
Expand Down Expand Up @@ -126,7 +128,7 @@ vizd_sources = ['viz_collector.cc', 'ruleeng.cc', 'collector.cc',
'redis_connection.cc', 'redis_processor_vizd.cc',
'options.cc', 'stat_walker.cc', 'protobuf_collector.cc',
'protobuf_server.cc', 'sflow_generator.cc', 'sflow_collector.cc',
'sflow_parser.cc']
'sflow_parser.cc', 'ipfix_collector.cc']

RedisLuaBuild(AnalyticsEnv, 'seqnum')
RedisLuaBuild(AnalyticsEnv, 'delrequest')
Expand Down Expand Up @@ -164,6 +166,7 @@ AnalyticsEnv.Default(vizd)

AnalyticsEnv.Requires(OpServerProxy_obj, '#/build/include/rapidjson')
AnalyticsEnv.Requires(vizd, '#/build/include/boost')
AnalyticsEnv.Requires(vizd, '#/build/include/ipfix.h')
AnalyticsEnv.Requires(vizd, '#/build/include/thrift/Thrift.h')

AnalyticsEnv.SConscript('ruleparser/SConscript', exports='AnalyticsEnv', duplicate = 0)
Expand Down Expand Up @@ -211,6 +214,7 @@ AnalyticsEnv.Alias('install', AnalyticsEnv.InstallAs(
AnalyticsEnv['INSTALL_BIN'] + '/contrail-collector', vizd))
AnalyticsEnv.Alias('install', AnalyticsEnv.Install(
AnalyticsEnv['INSTALL_CONF'], 'contrail-collector.conf'))

AnalyticsEnv.Alias('install', AnalyticsEnv.InstallAs(
AnalyticsEnv['INSTALL_INITD'] + '/contrail-collector',
'contrail-collector.initd.supervisord'))
Expand All @@ -222,3 +226,13 @@ AnalyticsEnv.Alias('install', AnalyticsEnv.Install(
AnalyticsEnv.Alias('install', AnalyticsEnv.Install(
AnalyticsEnv['INSTALL_CONF'] +
'/supervisord_analytics_files', 'contrail-collector.ini'))

AnalyticsEnv.SConscript(dirs=['contrail-snmp-collector'],
exports='AnalyticsEnv',
variant_dir=BuildEnv['TOP'] + '/contrail-snmp-collector',
duplicate=1)

AnalyticsEnv.SConscript(dirs=['contrail-topology'],
exports='AnalyticsEnv',
variant_dir=BuildEnv['TOP'] + '/contrail-topology',
duplicate=1)
3 changes: 3 additions & 0 deletions src/analytics/contrail-collector.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ log_local=1
# UDP port to listen on for receiving sFlow messages. -1 to disable.
# sflow_port=6343

# UDP port to listen on for receiving ipfix messages. -1 to disable.
# ipfix_port=4739

[COLLECTOR]
# Everything in this section is optional

Expand Down
1 change: 1 addition & 0 deletions src/analytics/contrail-snmp-collector/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0, Thu Aug 27 2014 -- Initial release
175 changes: 175 additions & 0 deletions src/analytics/contrail-snmp-collector/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

2 changes: 2 additions & 0 deletions src/analytics/contrail-snmp-collector/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.txt
recursive-include docs *.txt
71 changes: 71 additions & 0 deletions src/analytics/contrail-snmp-collector/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
=====================
Contrail SNMP collector
=====================

Contrail SNMP collector uses netsnmp library to
collect MIB data from the underlay switches &
routers. It pubishes these data in UVE, to be
consumed by analytics application and GUI

Typically it is installed in the cron job with desired
frequency of update::

contrail-snmp-collector -c /etc/contrail/contrail-snmp-collector.conf \
--file /etc/contrail/snmp-devices.ini

Command Line
============

contrail-snmp-collector -h
usage: contrail-snmp-collector [-h] [-c FILE]
[--collectors COLLECTORS [COLLECTORS ...]]
[--log_file LOG_FILE] [--log_local]
[--log_category LOG_CATEGORY]
[--log_level LOG_LEVEL] [--use_syslog]
[--syslog_facility SYSLOG_FACILITY]
[--scan_frequency SCAN_FREQUENCY]
[--http_server_port HTTP_SERVER_PORT]
(--file FILE | --api_serever API_SEREVER | --discovery_serever DISCOVERY_SEREVER)

optional arguments:
-h, --help show this help message and exit
-c FILE, --conf_file FILE
Specify config file
--collectors COLLECTORS [COLLECTORS ...]
List of Collector IP addresses in ip:port format
--log_file LOG_FILE Filename for the logs to be written to
--log_local Enable local logging of sandesh messages
--log_category LOG_CATEGORY
Category filter for local logging of sandesh messages
--log_level LOG_LEVEL
Severity level for local logging of sandesh messages
--use_syslog Use syslog for logging
--syslog_facility SYSLOG_FACILITY
Syslog facility to receive log lines
--scan_frequency SCAN_FREQUENCY
Time between snmp poll
--http_server_port HTTP_SERVER_PORT
introspect server port
--file FILE where to look for snmp credentials
--api_serever API_SEREVER
ip:port of api-server for snmp credentials
--discovery_serever DISCOVERY_SEREVER
ip:port of dicovery to get api-sever snmp credentials


Device File
===========

The device file is in ini format.

* It provides the list of
switches and their credentials to scan.
ommunity = public
Version = 2
Mibs = LldpTable, ArpTable

[10.84.6.191]
Community = public
Version = 2


Loading