Added Bluecoat ProxySG Support #5165

Merged
merged 5 commits into from Dec 15, 2016

Projects

None yet

5 participants

@NerdBlender
Contributor
NerdBlender commented Dec 13, 2016 edited

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

@NerdBlender NerdBlender Added Bluecoat ProxySG Support
2f10e21
@laf
Member
laf commented Dec 14, 2016

You've not signed the contributors agreement. http://docs.librenms.org/General/Contributing/

@NerdBlender
Contributor

Please see #5169

@laf laf removed the Blocker label Dec 14, 2016
@laf

Thanks for contributing, all really good - just some small changes needed.

Can you also move the mibs into mibs/bluecoat/ (create the dir) and then add the following to definitions.inc.php:

$config['os'][$os]['mib_dir'][] = 'bluecoat';

includes/definitions.inc.php
+$config['os'][$os]['text'] = 'BlueCoat ProxySG';
+$config['os'][$os]['type'] = 'network';
+$config['os'][$os]['ifname'] = 1;
+$config['os'][$os]['icon'] = 'sgos';
@laf
laf Dec 14, 2016 Member

Icon should be called bluecoat.

@laf
laf Dec 14, 2016 Member

And rename the icon itself to bluecoat.png

includes/definitions.inc.php
@@ -3364,6 +3379,11 @@
$config['device_types'][$i]['type'] = 'appliance';
$config['device_types'][$i]['icon'] = 'appliance.png';
+$i++;
+$config['device_types'][$i]['text'] = 'Proxy';
@laf
laf Dec 14, 2016 Member

@librenms/reviewers Are we happy to add this additional device_type in?

@murrant
murrant Dec 14, 2016 Contributor

I agree that we don't want the list to get too long. Why would we use "Proxy" over "Network" here?

includes/discovery/os/sgos.inc.php
@@ -0,0 +1,7 @@
+<?php
+
+if (!$os) {
@laf
laf Dec 14, 2016 Member

This isn't needed, you can remove the if (!$os) { check.

+<?php
+// BlueCoat ProxySG Fanspeeds
+if ($device['os'] == 'sgos') {
+ echo 'ProxySG ';
@laf
laf Dec 14, 2016 Member

Too much white space, 4 spaces should be used for indentation

+ echo 'ProxySG ';
+ $fan_index = 0;
+ for ($index = 21; $index < 39; $index++) { //Proxy SG Fan OID end in 21-38
+ $fanstatus_oid = ".1.3.6.1.4.1.3417.2.1.1.1.1.1.6.$index";
@laf
laf Dec 14, 2016 Member

Too much white space, 4 spaces should be used for indentation

NerdBlender added some commits Dec 15, 2016
@NerdBlender NerdBlender Changes as per #5165 bcefcd5
@NerdBlender NerdBlender Changes as per #5165
56fafa7
@NerdBlender NerdBlender Changes as per #5165 - Fixed whitespace
b4484a9
@NerdBlender NerdBlender Changes as per #5165 - Fixed whitespace
d0e6372
@scrutinizer-notifier

The inspection completed: 7 new issues, 2 updated code elements

@laf laf merged commit 969b963 into librenms:master Dec 15, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@NerdBlender NerdBlender deleted the NerdBlender:New-Device-ProxySG branch Dec 19, 2016
@VimCommando VimCommando added a commit to VimCommando/librenms that referenced this pull request Jan 4, 2017
@NerdBlender @VimCommando NerdBlender + VimCommando newdevice: Added Bluecoat ProxySG Support (#5165) c7d8179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment