Commit Graph

53 Commits

Author SHA1 Message Date
Tony Murray
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 Murray
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
SLMitch
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 Lathwood
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 Lathwood
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 Murray
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 Lathwood
06b0906aae fix: Fixed SQL query for bgpPeers check to remove stale sessions (#4697) 2016-10-02 07:25:48 +00:00
Tony Murray
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 Murray
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
Sawachier
5e540ff6cd Update bgp-peers.inc.php 2016-05-03 16:11:16 +02:00
Sawachier
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
Tom Laermans
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
Adam Amstrong
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
Tom Laermans
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
Tom Laermans
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
Tom Laermans
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
Tom Laermans
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
Tom Laermans
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
Tom Laermans
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
Tom Laermans
dc1f46ac2e parsing of ipv6 afi on junos bgp poll/discovery
git-svn-id: http://www.observium.org/svn/observer/trunk@1743 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-26 17:56:13 +00:00
Tom Laermans
d887e82052 fix unsetting of cache in the wrong place on discovery of bgp peers on junos, whoops
git-svn-id: http://www.observium.org/svn/observer/trunk@1738 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-24 12:07:09 +00:00
Tom Laermans
79e62a0983 Add JunOS prefix count graphing to BGP sessions
git-svn-id: http://www.observium.org/svn/observer/trunk@1735 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-23 14:33:02 +00:00
Tom Laermans
30bdd952ee Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"
git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-20 14:04:07 +00:00
Adam Amstrong
ec74c22e3b fixes to things, use *only* junos and junose mibdir for those things
git-svn-id: http://www.observium.org/svn/observer/trunk@1586 61d68cd4-352d-0410-923a-c4978735b2b8
2010-07-31 19:12:40 +00:00
Tom Laermans
e733ca1558 respect enable_bgp more on website and on discovery, also detect more huawei vrp
git-svn-id: http://www.observium.org/svn/observer/trunk@1498 61d68cd4-352d-0410-923a-c4978735b2b8
2010-07-27 20:49:31 +00:00
Adam Amstrong
c22e8493f7 migrate all SNMP calls to use $config['mibdir']. automatically generated from install_dir if not present
git-svn-id: http://www.observium.org/svn/observer/trunk@1284 61d68cd4-352d-0410-923a-c4978735b2b8
2010-07-02 19:58:13 +00:00