Welcome, Guest. Please login or register.

Author Topic: aficio printer defenition quiestion  (Read 1793 times)

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
aficio printer defenition quiestion
« on: December 13, 2015, 03:12:55 PM »
hi.
i found the OID i need, i just don't know how i can use them.
those give me the names:
SNMPv2-SMI::mib-2.43.12.1.1.4.1.1 = STRING: "black"
SNMPv2-SMI::mib-2.43.12.1.1.4.1.2 = STRING: "other"
SNMPv2-SMI::mib-2.43.12.1.1.4.1.3 = STRING: "cyan"
SNMPv2-SMI::mib-2.43.12.1.1.4.1.4 = STRING: "magenta"
SNMPv2-SMI::mib-2.43.12.1.1.4.1.5 = STRING: "yellow"
those give me the status:
SNMPv2-SMI::mib-2.43.13.4.1.4.1.1 = INTEGER: 2100
SNMPv2-SMI::mib-2.43.13.4.1.4.1.2 = INTEGER: 2100
SNMPv2-SMI::mib-2.43.13.4.1.5.1.1 = INTEGER: 1260000
SNMPv2-SMI::mib-2.43.13.4.1.5.1.2 = INTEGER: 355600
SNMPv2-SMI::mib-2.43.13.4.1.6.1.1 = INTEGER: 216000
SNMPv2-SMI::mib-2.43.13.4.1.6.1.2 = INTEGER: 215900
SNMPv2-SMI::mib-2.43.13.4.1.7.1.1 = INTEGER: 127000
SNMPv2-SMI::mib-2.43.13.4.1.7.1.2 = INTEGER: 148000
SNMPv2-SMI::mib-2.43.13.4.1.8.1.1 = INTEGER: 70000
SNMPv2-SMI::mib-2.43.13.4.1.8.1.2 = INTEGER: 105000

as you can see each color has a seperate OID.
how can i define a range in the def file, like 1.3.6.1.2.1.43.13.4.1.4-8.1.1 and 1.3.6.1.2.1.43.13.4.1.4-8.1.2?

thank you.



adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: aficio printer defenition quiestion
« Reply #1 on: December 14, 2015, 07:22:34 AM »
i believe i found a better ones:

.1.3.6.1.4.1.367.3.2.1.2.24.1.1.2.1 = STRING: "Black Toner"
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.2.2 = STRING: "Cyan Toner"
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.2.3 = STRING: "Magenta Toner"
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.2.4 = STRING: "Yellow Toner"

.1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1 = INTEGER: 80
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.2 = INTEGER: 90
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.3 = INTEGER: 50
.1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.4 = INTEGER: 40

now my issue is how to set the supply(hardware) field to 100 as i do not have anything that returns 4 times 100.
is it possible to set a constant in this field?

thank you.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: aficio printer defenition quiestion
« Reply #2 on: December 14, 2015, 10:05:28 AM »
I'd stick to the standard OIDs you got first. Compare to the Jetdirect definition. Also in Defgen you got a template for in the modules section. Just click the printer icon...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: aficio printer defenition quiestion
« Reply #3 on: December 14, 2015, 10:16:04 AM »
the results from the template are
: -3 : -3 : -3 : -3 : -3
: INTEGER: -2 : INTEGER: -2 : INTEGER: -2 : INTEGER: -2 : INTEGER: -2

so no help there.

and i can't understand how to use the standard OIDs as nedi expect the results to come a certain way...

the second results are more accurate, however, nedi expects the 100 to get the percentage and i cannot figure out how to give it to it...

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: aficio printer defenition quiestion
« Reply #4 on: December 14, 2015, 12:35:38 PM »
Do you have values in 1.3.6.1.2.1.43.11.1.1.9.1? This in HW and 1.3.6.1.2.1.43.11.1.1.8.1 in FW yield remaining supplies (in %)...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: aficio printer defenition quiestion
« Reply #5 on: December 14, 2015, 01:05:01 PM »
yes i do.

MOD :Index Slot Model Description SN/Status
SUP :Capacity (-2) or supply (-3) is not numeric
EVNT:MOD=M/1 L=200 CL=nedu TGT=Aficio SP C430DN MSG=Supply Yellow Toner with 0% is below threshold of 5%
SUP :Capacity (-2) or supply (-3) is not numeric
EVNT:MOD=M/1 L=200 CL=nedu TGT=Aficio SP C430DN MSG=Supply Magenta Toner with 0% is below threshold of 5%
SUP :Capacity (-2) or supply (-3) is not numeric
EVNT:MOD=M/1 L=200 CL=nedu TGT=Aficio SP C430DN MSG=Supply Black Toner with 0% is below threshold of 5%
SUP :Capacity (-2) or supply (-3) is not numeric
EVNT:MOD=M/1 L=200 CL=nedu TGT=Aficio SP C430DN MSG=Supply Cyan Toner with 0% is below threshold of 5%

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: aficio printer defenition quiestion
« Reply #6 on: December 14, 2015, 01:41:07 PM »
I'm afraid I don't know what to do with negative values...neither does NeDi ;-)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: aficio printer defenition quiestion
« Reply #7 on: December 14, 2015, 02:06:11 PM »
that is ok.
the original question is how to i set a constant instead of OID?

i need the FW to be 100 without pulling from snmp.

adispi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: aficio printer defenition quiestion
« Reply #8 on: December 15, 2015, 01:45:28 PM »
i solved it by changing the libsnmp a little.
hopefully it will not damage the tests for other printers, however, it did solve the issue on all my aficio printers:

 if($main::dev{$na}{os} eq "Printer"){
                                $main::mod{$na}{$nx}{mo} = "Printsupply";
                                if ( $mfw{"$misc::sysobj{$so}{mf}.$i"} < 0 ) { $mfw{"$misc::sysobj{$so}{mf}.$i"} = 100}; #line added by adi
                                if ( $mhw{"$misc::sysobj{$so}{mh}.$i"} < 0 ) { $mhw{"$misc::sysobj{$so}{mh}.$i"} = 100}; #line added by adi
                                if( $mfw{"$misc::sysobj{$so}{mf}.$i"} =~ /^[0-9]+$/ and $mhw{"$misc::sysobj{$so}{mh}.$i"} =~ /^[0-9]+$/ ){
                                        $main::mod{$na}{$nx}{st} = int(100*$mhw{"$misc::sysobj{$so}{mh}.$i"} / $mfw{"$misc::sysobj{$so}{mf}.$i"}) if $mfw{"$misc::sysobj{$so}{mf}.$i"};
                                        &misc::Prt("SUP+:$i-$slot $main::mod{$na}{$nx}{mo} $main::mod{$na}{$nx}{de} is at\t$main::mod{$na}{$nx}{st}%\n");

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2509
    • View Profile
    • NeDi
Re: aficio printer defenition quiestion
« Reply #9 on: December 30, 2015, 06:40:55 PM »
Good stuff, don't think it'll interfere so I'll add it to 1.6, tx
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo