fusioninventory / fusioninventory-agent

FusionInventory Agent
http://fusioninventory.org/
GNU General Public License v2.0
254 stars 126 forks source link

kyocera printer 2500ci - snmp net inventory retrieve odds data #638

Closed geeksmooth closed 5 years ago

geeksmooth commented 5 years ago

with command:

fusioninventory-netinventory --debug --host 192.168.52.223 --community something

[debug] creating 1 worker threads
[debug] [thread 1] creation
[debug] [thread 1] scanning 0: 192.168.52.223
[debug] full match for sysobjectID .1.3.6.1.4.1.1347.41 in database
[debug] [thread 1] termination
<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <CONTENT>
    <DEVICE>
      <CARTRIDGES>
        <TONERBLACK>75</TONERBLACK>
        <TONERCYAN>5</TONERCYAN>
        <TONERMAGENTA>71</TONERMAGENTA>
        <TONERYELLOW>60</TONERYELLOW>
        <WASTETONER>OK</WASTETONER>
      </CARTRIDGES>
      <INFO>
        <COMMENTS>UTAX_TA Printing System</COMMENTS>
        <ID>0</ID>
        <IPS>
          <IP>192.168.52.223</IP>
        </IPS>
        <LOCATION>somewhere</LOCATION>
        <MAC>00:17:c8:23:89:62</MAC>
        <MANUFACTURER>Kyocera</MANUFACTURER>
        <MODEL>2500ci</MODEL>
        <SERIAL>LU35615271</SERIAL>
        <TYPE>PRINTER</TYPE>
        <UPTIME>16 days, 06:18:57.57</UPTIME>
      </INFO>
      <PAGECOUNTERS>
        <BLACK>24174</BLACK>
        <COLOR>3492</COLOR>
        <COPYBLACK>49120</COPYBLACK>
        <COPYTOTAL>50452</COPYTOTAL>
        <FAXTOTAL>0</FAXTOTAL>
        <PRINTBLACK>229262</PRINTBLACK>
        <PRINTCOLOR>0</PRINTCOLOR>
        <PRINTTOTAL>50452</PRINTTOTAL>
        <SCANNED>86225</SCANNED>
        <TOTAL>27666</TOTAL>
      </PAGECOUNTERS>
      <PORTS>
        <PORT>
          <IFDESCR>eth0</IFDESCR>
          <IFINERRORS>0</IFINERRORS>
          <IFINOCTETS>2767391268</IFINOCTETS>
          <IFINTERNALSTATUS>1</IFINTERNALSTATUS>
          <IFLASTCHANGE>0.00 seconds</IFLASTCHANGE>
          <IFMTU>1500</IFMTU>
          <IFNAME>eth0</IFNAME>
          <IFNUMBER>1</IFNUMBER>
          <IFOUTERRORS>0</IFOUTERRORS>
          <IFOUTOCTETS>235737141</IFOUTOCTETS>
          <IFSPEED>1000000000</IFSPEED>
          <IFSTATUS>1</IFSTATUS>
          <IFTYPE>6</IFTYPE>
          <IP>192.168.52.223</IP>
          <IPS>
            <IP>192.168.52.223</IP>
          </IPS>
          <MAC>00:17:c8:23:89:62</MAC>
        </PORT>
      </PORTS>
    </DEVICE>
    <MODULEVERSION>3.0</MODULEVERSION>
    <PROCESSNUMBER>1</PROCESSNUMBER>
  </CONTENT>
  <DEVICEID>foo</DEVICEID>
  <QUERY>SNMPQUERY</QUERY>
</REQUEST>

But from printer's web console we got :

counter

as we see counter ar bit odds (look at total) ... (PS. maybe some counters are sligth moving)

I tried with : $snmpwalk -On -c something -v 2c 192.168.52.223 .1.3.6.1.4.1.1347.42

...
.1.3.6.1.4.1.1347.42.2.5.1.1.4.1 = INTEGER: 1332                                                
.1.3.6.1.4.1.1347.42.2.5.1.1.5.1 = INTEGER: 15                        
.1.3.6.1.4.1.1347.42.3.1.1.1.1.1 = INTEGER: 264824                                               
.1.3.6.1.4.1.1347.42.3.1.1.1.1.2 = INTEGER: 50452                                               
.1.3.6.1.4.1.1347.42.3.1.1.1.1.3 = INTEGER: 0                                                    
.1.3.6.1.4.1.1347.42.3.1.1.1.1.4 = INTEGER: 0                                                   
.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.1 = INTEGER: 229263                                             
.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.2 = INTEGER: 0                                                 
.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.3 = INTEGER: 35561                            
.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.1 = INTEGER: 49120
.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.2 = INTEGER: 0
.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.3 = INTEGER: 1332
...

I recognize correct value... let me say that ".1.3.6.1.4.1.1347.42" I used, I found it trying because looking up it shown as oid ".1.3.6.1.4.1.1347.41"

What do I miss ? or what I can do to correct this lecture... ?!

My guess... it's not correctly matching the printer, but I'm not so expert with snmp mib and oid...

thx in advance

Stoatwblr commented 5 years ago

Looking in the source code, it is correctly using 42, but you are right about the numbers being wrong.

I have just realised they are wrong on ALL my Kyocera devices too..... :/

in the source

    TOTAL      => {
        oid   => [
            '.1.3.6.1.4.1.1347.42.2.1.1.1.6.1.1', #Kyocera specific counter
            '.1.3.6.1.2.1.43.10.2.1.4.1.1'        #Default Value

My Taskalfa 7100i gives 21866 and 1044003 respectively (the second figure is the correct total equivalent A4 page count - the first figure is the number of A3 pages it's printed.)

The figures for black and colour are equally silly

1.3.6.1.4.1.1347.42.2 is listed as the Kyocera media MIB, but clearly the entries have been misinterpreted - particularly on MFPs, but they're wrong even on simple Kyocera colour printers

Stoatwblr commented 5 years ago

And here is why - the last digit indicates paper size.

SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.1 = STRING: "A3"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.2 = STRING: "B4"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.3 = STRING: "A4"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.4 = STRING: "B5"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.5 = STRING: "A5"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.6 = STRING: "Folio"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.7 = STRING: "Ledger"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.8 = STRING: "Legal"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.9 = STRING: "Letter"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.10 = STRING: "Statement"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.11 = STRING: "Other1"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.12 = STRING: "Other2"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.13 = STRING: "Banner1"
SNMPv2-SMI::enterprises.1347.42.2.1.1.1.2.1.14 = STRING: "Banner2"

it's a little more complicated than just "colour" and "mono" too - printing in only one color is charged differently

SNMPv2-SMI::enterprises.1347.42.2.2.1.1.2.1.1 = STRING: "Monochrome"
SNMPv2-SMI::enterprises.1347.42.2.2.1.1.2.1.2 = STRING: "Mono Color"
SNMPv2-SMI::enterprises.1347.42.2.2.1.1.2.1.3 = STRING: "Full Color"

As the Great Sage Mr Frederick Flintstone once said: "Hoooo Boy...."

  BLACK      => {
        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.7.1.1' #Kyocera specific counter
    },
    COLOR      => {
        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.8.1.1' #Kyocera specific counter

So what that means is these are counts of A3 colour and mono pages printed (Doh!)

  SCANNED    => {
        oid   => [
            '.1.3.6.1.4.1.1347.46.10.1.1.5.3',    #Kyocera specific counter ( total scan counter)
            '.1.3.6.1.4.1.1602.1.11.1.3.1.4.501'  #Canon specific counter
        ]

This does seem to be correct

  PRINTTOTAL => {
        oid   => [
            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
            '.1.3.6.1.4.1.1602.1.11.1.3.1.4.301'  #Canon specific counter
        ]
    },

Comparing the walk with my printers, The OID above is the total (Mono+Colour) number of A4-equivalent single page COPIES made (no comment on Canon, not looked there)

SNMPv2-SMI::enterprises.1347.42.3.1.1.1.1.1 = INTEGER: 952990

THAT is the A4-equivalent single page prints made (ie, double sided = 2 pages, A3 = 2 pages per side)

 PRINTBLACK => {
        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.1' #Kyocera specific counter
    },

That one is correct

    PRINTCOLOR => {
        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.2' #Kyocera specific counter
    },

Nope, that's monocolour prints. The CORRECT OID for full colour prints is .1.3.6.1.4.1.1347.42.3.1.2.1.1.1.3 - Note the last digit.

  COPYTOTAL  => {
        oid   => [
            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
            '.1.3.6.1.4.1.1602.1.11.1.3.1.4.101'  #Canon specific counter
        ]

Well it's right this time, but only because it's a duplicate OID from the PRINTTOTAL line.

    COPYCOLOR  => {
        oid   => [
            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.2', #Kyocera specific counter
            '.1.3.6.1.4.1.1602.1.11.1.3.1.4.123'  #Canon specific counter
        ]

Nope, copy MONOCOLOUR - FULLCOLOUR ends in .3

    },
    COPYCOLOR_A3  => {
        oid   => '.1.3.6.1.4.1.1602.1.11.1.3.1.4.122' #Canon specific counter

I can get this out for the Kyo, but I'm not going to bother here.

    },
    FAXTOTAL   => {
        oid   => '.1.3.6.1.4.1.1347.42.3.1.1.1.1.4'  #Kyocera specific counter
    }
);

This is probably right but I can't confirm - while the device has a fax, it's never been plugged into a phone line, let alone tested.

Stoatwblr commented 5 years ago

Interestingly there aren't Kyocera-specific OID for grand total, total Black, total colourmono or total FullColour (only for totals by category)

Stoatwblr commented 5 years ago

And even more interestingly, the generic OID total differs from the reported (and added up via the Kyocera MIB stats) by about 35,000 over that million pages. I suspect the Generic counter is counting misfeeds and the KMprinter MIB is not.

Stoatwblr commented 5 years ago

This SHOULD give usable results.

YMMV. I am NOT responsible if your printer turns into Bella Lugosi and eats your cat.

(EDITED TO FIX ERROR)

-- lib/FusionInventory/Agent/Tools/Hardware.pm.ORIG2   2019-03-12 20:34:14.188446420 +0000
+++ lib/FusionInventory/Agent/Tools/Hardware.pm.WIP     2019-03-12 21:31:46.149115289 +0000
@@ -189,16 +189,25 @@
 my %printer_pagecounters_variables = (
     TOTAL      => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.2.1.1.1.6.1.1', #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.43.10.1.1.12.1.1'  #Kyocera specific counter
+                                                  # If you were really keen you could calculate misfeed rates
+                                                  # based on the difference betwwen this and the default OID
+                                                  # value and use it to flag a call out of service techs.
+                                                  # Hint: Increasing rate = bald paper pickup roller tyres.
             '.1.3.6.1.2.1.43.10.2.1.4.1.1'        #Default Value
-            ]
-    },
-    BLACK      => {
-        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.7.1.1' #Kyocera specific counter
-    },
-    COLOR      => {
-        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.8.1.1' #Kyocera specific counter
     },
+## You'll need to do some math for Kyocera
+#    BLACK      => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].1' #Kyocera specific counter
+#    },
+# Unless you print this mode, don't bother.
+#    COLORMONO => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].2' #Kyocera specific counter
+#    },
+## You'll need to do some math for Kyocera
+#    COLOR => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].3' #Kyocera specific counter
+#    },
     RECTOVERSO => { },
     SCANNED    => {
         oid   => [
@@ -208,7 +217,7 @@
     },
     PRINTTOTAL => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.1',   #Kyocera specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.301'  #Canon specific counter
         ]
     },
@@ -216,7 +225,7 @@
         oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.1' #Kyocera specific counter
     },
     PRINTCOLOR => {
-        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.2' #Kyocera specific counter
+        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.3' #Kyocera specific counter
     },
     COPYTOTAL  => {
         oid   => [
@@ -235,7 +244,7 @@
     },
     COPYCOLOR  => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.2', #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.1', #Kyocera specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.123'  #Canon specific counter
         ]
     },
Stoatwblr commented 5 years ago

This works for MFPs, but not for normal printers. I'll have to look a little more closely.

It APPEARS that Kyocera are using multiple MIBs on their printers.

Stoatwblr commented 5 years ago

New, improved! Now with colour/mono Kyo printers as well as MFPs (and fewer cats, Sorry Mr Schumway)

EDIT (fixed COPYCOLOR - it ended .1, should have been .3) (.1.3.6.1.4.1.1347.43.10.1.1.12.1.1 was found and verified as print total with SNMPwalk on several devices. i didn't find it on the first pass as it's not in ...1347.42 - still no totals for the items I left commented out - and to be honest I don't think they're needed as they can be inferred from the other numbers)

--- lib/FusionInventory/Agent/Tools/Hardware.pm.ORIG2   2019-03-12 20:34:14.188446420 +0000
+++ lib/FusionInventory/Agent/Tools/Hardware.pm 2019-03-12 22:03:57.021841780 +0000
@@ -189,44 +189,60 @@
 my %printer_pagecounters_variables = (
     TOTAL      => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.2.1.1.1.6.1.1', #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.43.10.1.1.12.1.1',  #Kyocera specific counter
+                                                  # If you were really keen you could calculate misfeed rates
+                                                  # based on the difference betwwen this and the default OID
+                                                  # value and use it to flag a call out of service techs.
+                                                  # Hint: Increasing rate = bald paper pickup roller tyres.
             '.1.3.6.1.2.1.43.10.2.1.4.1.1'        #Default Value
-            ]
+       ]
     },
     BLACK      => {
-        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.7.1.1' #Kyocera specific counter
+        oid   => '.1.3.6.1.4.1.1347.42.2.2.1.1.3.1.1' #Kyocera non-MFP specific counter
     },
-    COLOR      => {
-        oid   => '.1.3.6.1.4.1.1347.42.2.1.1.1.8.1.1' #Kyocera specific counter
+    COLOR => {
+        oid   => '.1.3.6.1.4.1.1347.42.2.2.1.1.3.1.2' #Kyocera non-MFP specific counter
     },
+## You'll need to do some math for Kyocera MFPS
+#    BLACK      => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].1' #Kyocera specific counter
+#    },
+# Unless you print this mode, don't bother.
+#    COLORMONO => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].2' #Kyocera specific counter
+#    },
+## You'll need to do some math for Kyocera MFPS
+#    COLOR => {
+#        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.[1+2+3+4].3' #Kyocera specific counter
+#    },
     RECTOVERSO => { },
     SCANNED    => {
         oid   => [
-            '.1.3.6.1.4.1.1347.46.10.1.1.5.3',    #Kyocera specific counter ( total scan counter)
+            '.1.3.6.1.4.1.1347.46.10.1.1.5.3',    #Kyocera MFP specific counter ( total scan counter)
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.501'  #Canon specific counter
         ]
     },
     PRINTTOTAL => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.1',   #Kyocera MFP specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.301'  #Canon specific counter
         ]
     },
     PRINTTOTAL => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.1',   #Kyocera MFP specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.301'  #Canon specific counter
         ]
     },
     PRINTBLACK => {
-        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.1' #Kyocera specific counter
+        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.1' #Kyocera MFP specific counter
     },
     PRINTCOLOR => {
-        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.2' #Kyocera specific counter
+        oid   => '.1.3.6.1.4.1.1347.42.3.1.2.1.1.1.3' #Kyocera MFP specific counter
     },
     COPYTOTAL  => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.1.1.1.2',   #Kyocera MFP specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.101'  #Canon specific counter
         ]
     },
     COPYBLACK  => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.1', #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.1', #Kyocera MFP specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.113'  #Canon specific counter
         ]
     },
@@ -235,7 +251,7 @@
     },
     COPYCOLOR  => {
         oid   => [
-            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.2', #Kyocera specific counter
+            '.1.3.6.1.4.1.1347.42.3.1.2.1.1.2.3', #Kyocera MFP specific counter
             '.1.3.6.1.4.1.1602.1.11.1.3.1.4.123'  #Canon specific counter
         ]
     },
@@ -243,7 +259,7 @@
         oid   => '.1.3.6.1.4.1.1602.1.11.1.3.1.4.122' #Canon specific counter
     },
     FAXTOTAL   => {
-        oid   => '.1.3.6.1.4.1.1347.42.3.1.1.1.1.4'  #Kyocera specific counter
+        oid   => '.1.3.6.1.4.1.1347.42.3.1.1.1.1.4'  #Kyocera MFP specific counter
     }
 );
geeksmooth commented 5 years ago

@Stoatwblr what say... thx ! to have spent you in this issue...

I wish I would be able to going in deep debugging in this way as you done, I wasn't... so I'm available to learn your way if you could explain me your approach, feel free to contact me.

Anyway, thx again ! I'll try to test your patch... Alessio

geeksmooth commented 5 years ago

Here I'm again...

I tested right now and seems works !

$ sudo fusioninventory-netinventory --debug --host 192.168.52.223 --community something
[debug] creating 1 worker threads
[debug] [thread 1] creation
[debug] [thread 1] scanning 0: 192.168.52.223
[debug] full match for sysobjectID .1.3.6.1.4.1.1347.41 in database
[debug] [thread 1] termination
<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <CONTENT>
    <DEVICE>
      <CARTRIDGES>
        <TONERBLACK>41</TONERBLACK>
        <TONERCYAN>98</TONERCYAN>
        <TONERMAGENTA>67</TONERMAGENTA>
        <TONERYELLOW>54</TONERYELLOW>
        <WASTETONER>OK</WASTETONER>
      </CARTRIDGES>
      <INFO>
        <COMMENTS>UTAX_TA Printing System</COMMENTS>
        <ID>0</ID>
        <IPS>
          <IP>192.168.52.223</IP>
        </IPS>
        <LOCATION>somewhere</LOCATION>
        <MAC>00:17:c8:23:89:62</MAC>
        <MANUFACTURER>Kyocera</MANUFACTURER>
        <MODEL>2500ci</MODEL>
        <SERIAL>LU35615271</SERIAL>
        <TYPE>PRINTER</TYPE>
        <UPTIME>1 day, 16:59:29.54</UPTIME>
      </INFO>
      <PAGECOUNTERS>
        <COPYBLACK>49781</COPYBLACK>
        <COPYCOLOR>49781</COPYCOLOR>
        <COPYTOTAL>51127</COPYTOTAL>
        <FAXTOTAL>0</FAXTOTAL>
        <PRINTBLACK>232832</PRINTBLACK>
        <PRINTCOLOR>36050</PRINTCOLOR>
        <PRINTTOTAL>268882</PRINTTOTAL>
        <SCANNED>87384</SCANNED>
        <TOTAL>320009</TOTAL>
      </PAGECOUNTERS>
      <PORTS>
        <PORT>
          <IFDESCR>eth0</IFDESCR>
          <IFINERRORS>0</IFINERRORS>
          <IFINOCTETS>260663650</IFINOCTETS>
          <IFINTERNALSTATUS>1</IFINTERNALSTATUS>
          <IFLASTCHANGE>0.00 seconds</IFLASTCHANGE>
          <IFMTU>1500</IFMTU>
          <IFNAME>eth0</IFNAME>
          <IFNUMBER>1</IFNUMBER>
          <IFOUTERRORS>0</IFOUTERRORS>
          <IFOUTOCTETS>20843902</IFOUTOCTETS>
          <IFSPEED>1000000000</IFSPEED>
          <IFSTATUS>1</IFSTATUS>
          <IFTYPE>6</IFTYPE>
          <IP>192.168.52.223</IP>
          <IPS>
            <IP>192.168.52.223</IP>
          </IPS>
          <MAC>00:17:c8:23:89:62</MAC>
        </PORT>
      </PORTS>
    </DEVICE>
    <MODULEVERSION>3.2</MODULEVERSION>
    <PROCESSNUMBER>1</PROCESSNUMBER>
  </CONTENT>
  <DEVICEID>foo</DEVICEID>
  <QUERY>SNMPQUERY</QUERY>
</REQUEST>
[debug] cleaning 1 worker threads

counter-223

ps. counters are slight moving right now...

It seems only counter :

<COPYCOLOR>49781</COPYCOLOR>

is not read correctly should be : 1346

I think it's almost done...

thx again for your efforts

geeksmooth commented 5 years ago

@Stoatwblr sorry... missed you fixed COPYCOLOR above...

I corrected oid and test again... and it's all right !

thx a lot again ! Alessio

Stoatwblr commented 5 years ago

The method was to print out counters pages from my printers and then use "snmpwalk" and look at the results, grepping for the totals already printed to see where the matches were/

I also looked at the kyocera OIDs at http://www.oidview.com/mibs/1347/KMCOMMON.html

That's when I realised that 1.3.6.1.4.1.1347.42.2.1 - kmmedia is for printers and different to 1.3.6.1.4.1.1347.42.3 - kmMFP

Finding the entry at .1.3.6.1.4.1.1347.43.10.1.1.12.1.1 was pure luck from walking the entire 1347 block, but it does work for both printers and MFPs

I don't think the commented out sections are necessary, because if you're viewing the printed pages in stacked mode the segments will add up correctly anyway.

geeksmooth commented 5 years ago

@g-bougard the patch produced by @Stoatwblr has worked to me (kyocera mfp)... is it possible add to source ?!

guillomovitch commented 5 years ago

As for any other change affecting SNMP inventory or discovery, please provide an snmpwalk output, allowing developpers to access impact of the changes.

Stoatwblr commented 5 years ago

You've already got them for these printers (my ones, which I wrote the patch for after inspecting walk outputs and the published OIBviews/MIBviews)

More importantly you need the MIBs and OIDviews AND a copy of the counters output and supplies status from the printer so you can crosscheck what you're looking at with SNMP matches what the printer is telling you on the front panel/printout/web interface

A bare snmpwalk without the OIDviews results in having to make (wrong) guesses - see the links above and how there are different OID/MIB sets for Kyocera printers or MFPs - and I still had to refer back to printouts of counters from the devices to ensure that I actually was looking at the correct item.

Just to make things even HARDER, several printers give differing results for the same OID depending if queried vis SNMPv1, v2 or v3

Making the job harder, some makers (Canon!) refuse to release this information without NDAs and licensing fees, so anything available is reverse engineered or pirated (in which case Canon can shut it down, despite EU "right to repair" and interfacing laws)

geeksmooth commented 5 years ago

I close this issue due the initial problem has been solved thx to @Stoatwblr