Samsung printer v2 #2680

Merged
merged 5 commits into from Jan 1, 2016

Projects

None yet

4 participants

@flatterlight
Contributor
  1. try
@f0o f0o commented on an outdated diff Dec 29, 2015
@@ -76,4 +76,6 @@ Contributors to LibreNMS:
- Jonathan Bailey <jcbailey@code0.net> (jcbailey2)
- Ruairi Carroll <ruairi.carroll@gmail.com> (rucarrol)
- Maxim Tsyplakov <maxim.tsyplakov@gmail.com> (tsypa)
+- D. Britz <github@wrind.de> (flatterlight)
+>>>>>>> librenms/master
@f0o
f0o Dec 29, 2015 Member

Remove please

@f0o f0o commented on the diff Dec 29, 2015
includes/discovery/os/samsungprinter.inc.php
@@ -0,0 +1,6 @@
+<?php
+if (!$os) {
+ if (strstr($sysDescr, 'Samsung CLX')) {
+ $os = 'samsungprinter';
+ }
+}
@f0o
f0o Dec 29, 2015 Member

Newline

@f0o f0o commented on the diff Dec 29, 2015
includes/polling/os/samsungprinter.inc.php
@@ -0,0 +1,12 @@
+<?php
+// private::enterprises.236.11.5.11.53.31.1.4.0 = STRING: "CLX-3170 Series"
+$hardware = trim(snmp_get($device, '1.3.6.1.4.1.236.11.5.11.53.31.1.4.0', '-OQv', '', ''), '" ');
+// mgnt::mib-2.43.5.1.1.17.1 = STRING: "QUV960066FJ124"
+$serial = trim(snmp_get($device, '1.3.6.1.2.1.43.5.1.1.17.1', '-OQv', '', ''), '" ');
+// mgnt::mib-2.1.1 = STRING: "Samsung CLX-3170 Series;V1.00.01.64 Sep-27-2010;Engine 1.77.81;NIC V4.01.20(CLX-3170) 02-05-2010;S/N JFJIUTM748HJGK983"
+$osin = trim(snmp_get($device, '1.3.6.1.2.1.1.1', '-OQv', '', ''), '" ');
+//$osin = "Samsung CLX-3170 Series;V1.00.01.64 Sep-27-2010;Engine 1.77.81;NIC V4.01.20(CLX-3170) 02-05-2010;S/N JFJIUTM748HJGK983";
+$osar = preg_split('/;S\/N [A-Z0-9]+/',$osin,-1);
+$os = array_shift($osar);
+//print_r($osar);
+//echo $os;
@f0o
f0o Dec 29, 2015 Member

Last newline :)

@f0o
Member
f0o commented Dec 29, 2015

We're getting close to merge!

Can you run a rebase against upstream to remove those two merges please?

flatterlight added some commits Dec 13, 2015
@flatterlight flatterlight added suport for samsung printer 80c8b70
@flatterlight flatterlight signed Contributor Agreement
I agree to the conditions of the Contributor Agreement
contained in doc/General/Contributing.md.
936b17d
@flatterlight flatterlight fixed OS variable 9844915
@flatterlight flatterlight Update samsungprinter.inc.php
newline
eab707d
@flatterlight flatterlight Update samsungprinter.inc.php
last new line ;)
41a0b40
@f0o
Member
f0o commented Dec 30, 2015

👍 for merge

@paulgear paulgear merged commit 072c04f into librenms:master Jan 1, 2016

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment