GithubHelp home page GithubHelp logo

How used other MIBs about snmp HOT 4 OPEN

freedsx avatar freedsx commented on June 3, 2024
How used other MIBs

from snmp.

Comments (4)

ChadSikorra avatar ChadSikorra commented on June 3, 2024 2

Hi @nfast. Unfortunately this library doesn't really have a concept of MIBs. The main reason is that there is no PHP library capable of parsing the SMI-v2 format (which is the format a MIB is in). The SMI format is basically a subset of the X.681 spec, which is essentially a very complex syntax for describing data structures. It doesn't surprise me that such a parser doesn't exist in PHP because it's use is very limited outside of a few protocols / niche cases nowadays, and implementing the spec correctly is a huge undertaking. (Spec can be found here: https://www.itu.int/ITU-T/studygroups/com17/languages/X.681-0207.pdf).

That said, I did attempt to implement a pure PHP based MIB parser and made it quite far. But I just haven't had the time to finish it. I'd like to pick up my work again. I'm just not sure when I'll be able to.

from snmp.

JeroenSteen avatar JeroenSteen commented on June 3, 2024

I'm trying to get Xerox printer health values, like amount of toner-percentage of a certain color. And I'm also looking for those MIB files.

Snmp is new for me, but reading a MIB can be done with: snmp_read_mib and snmprealwalk right?

from snmp.

ChadSikorra avatar ChadSikorra commented on June 3, 2024

I'm trying to get Xerox printer health values, like amount of toner-percentage of a certain color. And I'm also looking for those MIB files.

Snmp is new for me, but reading a MIB can be done with: snmp_read_mib and snmprealwalk right?

Yes, you could use the SNMP extension instead if you have it available. This library just implements the raw SNMP protocol, without any dependencies / the need for an extension. As such, I don't want to introduce a requirement for it.

I mostly started this as a fun project in my free time. But there are advantages to this library. Such as, there's no way to receive traps and parse them using the PHP SNMP extension, like you can with this library.

Regarding the Xerox printer health status, it looks like you'd want to read / interpret this OID for it:

OID: 1.3.6.1.2.1.25.3.5.1.2
Reference: https://oidref.com/1.3.6.1.2.1.25.3.5.1.2

It looks like the value uses a series on / off bits to represent different statuses for various printer parts.

from snmp.

JeroenSteen avatar JeroenSteen commented on June 3, 2024

With your SNMP-library I found these OID's indeed, but those don't give percentages or such. That's why I think I need a MIB file.

1.3.6.1.2.1.43.11.1.1.6.1.5 = Waste Toner Container
1.3.6.1.2.1.43.11.1.1.6.1.6 = Black Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.7 = Yellow Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.8 = Magenta Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.9 = Cyan Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.12 = Fuser Assembly

Do you think it's possible without a MIB, to check for example if a printer door is open, with doorOpen?
Does it work something like this 1.3.6.1.2.1.25.3.5.1.2 adding the .4, to make 1.3.6.1.2.1.25.3.5.1.2.4?

from snmp.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.