Commit Graph
68 Commits
Author SHA1 Message Date
PipoCanajaandGitHub e4fdac18e7 Split BGP-Peer for Timos in its own file (#11410)
* timos in its dedicated file

* timos in its dedicated file
2020-04-11 13:56:15 -05:00
PipoCanajaandGitHub ad1c7d0e19 IPv6 support for BGP peers in VRP devices (#11243)
* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* fixed corner case
2020-04-10 13:22:26 +02:00
Tony MurrayandGitHub 217969e140 Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
PipoCanajaandGitHub 95820bf5d4 Improve Huawei VRP bgp discovery (#11054)
* vrp bgp rewrite

VRP BGP code isolated and VRF aware

Ipv6 peer and afi typo

* mib-update

* avoid malformed OIDs in discovery

* Restore BGP4 MIB calls for some Campus devices

* CodeClimate
2020-02-11 20:54:12 +01:00
07f3c91e6c Revert ironware BGP-peers changes from PR #10941 (#11096)
* Revert ironware BGP-peers changes from PR #10941.

* Regenerate test data without BGP4V2-MIB support.

* Initialise $local_ip

Co-authored-by: PipoCanaja <[email protected]>
2020-02-03 14:32:45 +01:00
Martijn SchmidtandGitHub a64bd45dbc Update IronWare sensors & bgp-peers discovery, allow skip_values to target a specific index appended to the OID (#10941)
* Migrate ironware sensor discovery from php to yaml.

* More sensors, add grouping.

* dynamic_discovery_get_value() becomes getValueFromData()

* Target a specific index with skip_values.

* Improve Brocade BGP session discovery/polling

This commit allows for the correct discovery of BGP sessions
with 32-bit ASNs, IPv6 neighbors using the BGP4V2-MIB which is
based on draft-ietf-idr-bgp4-mibv2-11 and also polls for IPv4
unicast received routes through the FOUNDRY-SN-BGP4-GROUP-MIB.

Copied most of the code from PR#8877 by @Mikeburke14, cleaned
up the code a little bit to match the normal LibreNMS style,
and fixed bgpPeers_cbgp discovery as well as polling for the
ipv4.unicast neighbors.

Note that older Brocade IronWare firmware versions are known
to have multiple defects relating to the BGP4V2-MIB which
might result in certain missing non-established neighbors.

Related vendor defect numbers:

- DEFECT000633962
-- Symptom: The OID bgp4V2PeerAdminStatus does not return the
            correct value
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00g

- DEFECT000583319
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display all the BGP entries
-- Reported: NI 05.6.00
-- Resolved: NI 05.8.00e

- DEFECT000550309
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display the full information
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00c

* Add ironware CER & ICX platform test data.

* Re-add ironware.json compatible with current master branch.
2020-02-01 23:28:03 +01:00
PipoCanajaandNeil Lathwood e285a9268e Improve Huawei BGP polling + BGP webui & graphs patches (#10010)
* basic adress family for VRP

* Improve BGP prefixes display

* Improve BGP prefixes display

* Improve BGP prefixes display

* climate
2019-04-09 13:44:48 +01:00
Vitali KariandTony Murray b55938f031 Nokia vrf bgp (#9622)
* first commit

* clean code

* add snmpsim data for bgp

* renumber sql patch

* clear public ip

* update  misc/db_schema.yaml

* add test data and renumber sql-schema

* sql-schema

* sql-schema

* Update module_tables.yaml

* Update module_tables.yaml

* Update timos.json

* Update timos.snmprec

* Rename 281.sql to 282.sql

* update test data

* db migration

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* update db schema

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* Update db_schema.yaml

* update schema
2019-01-19 11:44:32 -06:00
Tony MurrayandGitHub 1c5b9d3524 Fix bgp peers discovery cleanup (#8263)
Take context into account, update index for that
2018-02-19 09:08:27 -06:00
Tony MurrayandNeil Lathwood f706d0ab41 fix: Fixed cbgp peers data on some devices (#8208)
* IOSXR snmprec data (unsorted)

* iosxr sorted

* Fix cbgp peers data on some devices

* fix formatting
2018-02-06 21:06:44 +00:00
Misha KomarovskiyandTony Murray 36fe6c83dc fix: Bgp-peers junos empty afi-safi names (#8083)
* fix: Bgp-peers junos empty afi-safi names

* fix discovery of all names
* fix polling rrd names assignment

Signed-off-by: Misha Komarovskiy <[email protected]>

* Update tests data for junos bgp-peers safi update

Signed-off-by: Misha Komarovskiy <[email protected]>
2018-01-20 21:21:39 -06:00
Tony MurrayandNeil Lathwood 88b4e31912 refactor: Refactored bgp-peers (#7972)
* bgp-peers update
Use IP parsing library more effectively.
Fix update issue
Include comware bgp-peers test data
deeper refactoring
Allow JunOS fallback to BGP4-MIB, some models only use that.
Add junos bgp4 data
Actually update all bpg data in the poller

* fix arista data. refactor some to prevent missing data from mucking things up

* refactor to use $oid_map for BGP4-MIB too

* A few comments to break up teh file a bit

* Junos bgp data an a quick revert for now.

* small cleanup

* fix ios bgp polling, add test data

* check the correct variable
2018-01-18 20:54:38 +00:00
Misha KomarovskiyandNeil Lathwood 91cd338c35 fix: Bgp-peers add missing os junos safi values (#8018)
* fix: Bgp-peers add missing os junos safi values

Signed-off-by: Misha Komarovskiy <[email protected]>

* fix: Mirror cisco safi names

* Except safi 4 which is not supported by cisco
bgp mib

Signed-off-by: Misha Komarovskiy <[email protected]>

* fix typo

Signed-off-by: Misha Komarovskiy <[email protected]>
2018-01-04 22:41:06 +00:00
Tony MurrayandGitHub d10047c32e fix: bgp-peers fails when ip parsing fails (#7773)
Don't try to call ->getFamily() if we didn't parse an IP
2017-11-20 18:46:15 -06:00
Neil LathwoodandGitHub 47a36b1ce6 fix: Fixed bgpPeers_cbgp discovery for junos (#7743) 2017-11-15 23:29:46 +00:00
Tony MurrayandNeil Lathwood b18c41b1a9 refactor: Use the Config class includes/discovery (#7299)
* refactor: use the Config class includes/discovery

* fix issue with $config variable not accessible in include-dir.inc.php

* improved whitespace

* Tidy up discovery_by_ip
2017-09-11 21:26:41 +01:00
Tony MurrayandGitHub 1d777693e1 feature: New IP parsing classes. Removes usage of Pear Net_IPv4 and Net_IPv6. (#7106)
* Refactor remove use of pear Net_IPv4 and Net_IPv6

Caution, I added tests to test the functionality of the new functions, but I'm not 100% certain the replaced usages match 100%.  Please test.

Left usage in generate-iplist.php because I'm not sure the use of that script, so I didn't want to implement additional functionality to support it.

Add support for ipv6 fo ipInNetwork() function

Add phpdocs to functions
Remove accidental inclusion

Use binary operations instead of string for networKFromIp()
Tidy up binary operations in ipInNetwork()

tidy parsing cidr network

Change to a class based implementation.

Update phpdocs.
Fully catch exceptions for hex parsing.

Fix mistake.

support older phpunit versions

Fix php shifting to negative with php 5

* Fix graph authorization. Uncaught exception and checking an ipv4 against an ipv6 network == fail.

* Also remove colons from hex strings.

* Fix typo in bgp polling
Two passes of removing invalid characters from hex strings. (That way we don't mangle valid IPs)
2017-08-08 14:14:58 -05:00
SLMitchandNeil Lathwood 7bd23946ad remove 'Wrong Type' string when we ask LocalAS to switch (#6745)
* remove 'Wrong Type' string when we ask LocalAS to switch (bug with at least Dell ON Switch)

* Only remove the MIB
2017-06-08 08:01:17 +01:00
Neil LathwoodandGitHub 38cebc5fd7 feature: Added better BGP support for Arista (#6046)
* feature: Added better BGP support for Arista
2017-03-11 23:16:49 +00:00
Neil LathwoodandGitHub 53df1d0b2c fix: Fixed JunOS bgpPeers_cbgp mistakenly removed + better support for mysql strict mode #5531 (#5536) 2017-01-22 08:25:53 +00:00
Tony MurrayandNeil Lathwood 370e368ffe fix: msyql errors bgp-peers, daily, callback (#5425)
* fix: msyql errors bgp-peers, daily, callback

* select cell instead of an row
2017-01-13 22:21:29 +00:00
Neil LathwoodandDaniel Preussker 06b0906aae fix: Fixed SQL query for bgpPeers check to remove stale sessions (#4697) 2016-10-02 07:25:48 +00:00
Tony MurrayandNeil Lathwood edbb6ae0e3 refactor: Centralize MIB include directory specification (#4603)
* refactor: Centralize MIB include directory specification
The default is now:
```
$config['mib_dir'].'/mibdirname:'.$config['mib_dir']
```
This means we exclude OS mibs and only use ours  (we could prepend `+` if we want to include os mibs.
All snmp calls should only include the name of the subdirectory under the mibs directory.

* Remove d_echo from Proc
Fix snmpsim tests.
2016-09-28 14:19:28 +01:00
Tony MurrayandNeil Lathwood 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
laf d56ff8b87f More updates for junos bgp polling 2016-08-03 16:49:41 +01:00
laf e54881df14 Improved junos BGP code + WebUI 2016-08-02 22:28:57 +01:00
laf 431b0f085f Fixed bad SQL query for bgp-peer disco 2016-06-29 00:32:33 +01:00
laf 558dfb2344 Pretty up the discovery process output 2016-06-21 00:59:43 +01:00
SawachierandSawachier 5e540ff6cd Update bgp-peers.inc.php 2016-05-03 16:11:16 +02:00
SawachierandSawachier 886fcaf04c Update bgp-peers.inc.php 2016-05-03 16:11:16 +02:00
laf 4d5da1181e BGP discovery fix. reverted back pre-vrf code 2016-02-20 17:41:56 +00:00
HenocKA 8a3d14f9e2 Correct data duplication on discovering cisco vrf lite 2016-02-02 12:21:45 +01:00
HenocKA 21d2b45742 Syntax update 2016-01-26 15:27:50 +01:00
HenocKA 0ac8f584b2 discoverying and polling VRF 2016-01-26 15:22:49 +01:00
Mark Schouten dadbcb454a Fix two typos 2015-08-21 23:42:18 +02:00
Mark Schouten 677a4f3f5f Remove all unneeded if($debug)-statements and replace them with d_echo . discovery dir.. 2015-08-21 16:10:01 +02:00
laf 08ae68bc58 fixed a couple of issues 2015-07-15 20:20:53 +01:00
Job Snijders d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf 1bbe1b7ccf Updated to log discovery info via discover_new_device() 2015-07-12 19:57:25 +01:00
laf 2ff989474c Updated BGP discovery code to perform autodiscovery if enabled 2015-07-08 01:03:12 +01:00
laf cc40aaeca6 Mainly for a scrut run 2015-06-09 23:39:05 +01:00
laf 3c77c920c5 Updated bgpPeers_cbgp 2015-06-09 14:30:25 +01:00
laf 77b9adabc2 More updates to bgp polling/disco and webui 2015-06-09 14:30:19 +01:00
laf 702b75c0b7 Updates 2015-06-03 15:41:10 +01:00
laf b9dabae7d8 Updated BGP polling for Cisco to support CISCO-BGP4-MIB better 2015-06-02 16:32:39 +01:00
Alexander Sosna 5a7988e2e4 chmod 0644 to php files not directly executed 2015-04-28 22:58:03 +02:00
laf 02792176fa Updated most files to use dbFacile 2014-03-12 22:21:33 +00:00
Adam Amstrong b273e04241 /// -> //
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 12:24:34 +00:00
Adam Amstrong cacf913a55 # -> / for phpdoc
git-svn-id: http://www.observium.org/svn/observer/trunk@3239 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 11:29:53 +00:00
Tom Laermans 6a1cce6090 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3147 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-07 16:23:43 +00:00