60 Commits

Author SHA1 Message Date
1c5b9d3524 Fix bgp peers discovery cleanup (#8263)
Take context into account, update index for that
2018-02-19 09:08:27 -06:00
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
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 <zombah@gmail.com>

* Update tests data for junos bgp-peers safi update

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
2018-01-20 21:21:39 -06:00
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
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 <zombah@gmail.com>

* fix: Mirror cisco safi names

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

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* fix typo

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
2018-01-04 22:41:06 +00:00
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
47a36b1ce6 fix: Fixed bgpPeers_cbgp discovery for junos (#7743) 2017-11-15 23:29:46 +00:00
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
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
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
38cebc5fd7 feature: Added better BGP support for Arista (#6046)
* feature: Added better BGP support for Arista
2017-03-11 23:16:49 +00:00
53df1d0b2c fix: Fixed JunOS bgpPeers_cbgp mistakenly removed + better support for mysql strict mode #5531 (#5536) 2017-01-22 08:25:53 +00:00
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
06b0906aae fix: Fixed SQL query for bgpPeers check to remove stale sessions (#4697) 2016-10-02 07:25:48 +00:00
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
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
5e540ff6cd Update bgp-peers.inc.php 2016-05-03 16:11:16 +02:00
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
8a3d14f9e2 Correct data duplication on discovering cisco vrf lite 2016-02-02 12:21:45 +01:00
21d2b45742 Syntax update 2016-01-26 15:27:50 +01:00
0ac8f584b2 discoverying and polling VRF 2016-01-26 15:22:49 +01:00
dadbcb454a Fix two typos 2015-08-21 23:42:18 +02:00
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
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
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
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
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
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
8df2b9b3f5 remove legacy variables, hopefully i didn't mess anything up
git-svn-id: http://www.observium.org/svn/observer/trunk@3134 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-06 18:38:11 +00:00
bf09e5844f os_group ios -> cisco
git-svn-id: http://www.observium.org/svn/observer/trunk@2815 61d68cd4-352d-0410-923a-c4978735b2b8
2012-01-12 11:16:38 +00:00
4bc15529d4 eradicate split() in favour of explode()
git-svn-id: http://www.observium.org/svn/observer/trunk@2054 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-11 09:22:12 +00:00
f55a30f744 some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice
git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-06 13:54:50 +00:00
31b2092041 more trailing spaces hunted down and shot, then shot again
git-svn-id: http://www.observium.org/svn/observer/trunk@1880 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-16 17:53:20 +00:00
12fbf7430c more cleanup/reindent, yay
git-svn-id: http://www.observium.org/svn/observer/trunk@1839 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-15 11:24:35 +00:00
2fd11cf9d0 apply last bgp patch, thanks to yeled for testing
git-svn-id: http://www.observium.org/svn/observer/trunk@1807 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-08 17:34:17 +00:00
f66e5379cc discovery/bgp: use snmp_get(), bugfixed patch by Corentin Chary
git-svn-id: http://www.observium.org/svn/observer/trunk@1806 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-08 17:28:24 +00:00