Hello Bernardo,
I would recommend you to extend the agent by AgentX subagents. You can write
them as independent programs and then integrate them by registration with the
main snmpd agent.
Regards,
David
De: Bernardo Rodrigues [mailto:bernardo.rodrig...@datatraffic.com.br]
Enviado el: martes, 11 de julio de 2017 18:45
Para: net-snmp-coders@lists.sourceforge.net; Bruno de Oliveira Alves
Asunto: Extending Net-SNMP Agent for reading physical variables in Embedded
Linux
Hello everyone from Net-SNMP.
First of all, amazing project! Thanks for this awesome tool.
I'm working on a project in which I have to develop a custom SNMP Agent, which
will monitor some physical variables in my equipment.
It will be implemented in an Embedded Linux OS. I'm using the SAMA5D2 Xplained
kit<http://www.atmel.com/tools/atsama5d2-xult.aspx> for prototyping, and
Yocto<https://www.yoctoproject.org/> for crafting the distro.
I've already been able to build a distro with Net-SNMP
v5.7.3<https://layers.openembedded.org/layerindex/recipe/4653/> snmpd embedded
into it.
Perhaps too much info about Yocto could be misleading about my real questions,
so I'll not get too deep into it. All we need to know is I'm using Net-SNMP
v5.7.3, and I can modify its source code at will to generate the appropriate
packages.
Now I have to extend this Agent to create proper integration with hardware, so
it can talk to sensors, relays, etc.
I've been extensively reading Net-SNMP's wiki for the past couple of days.
Especially the Agent
Architecture<http://www.net-snmp.org/wiki/index.php/Agent_Architecture> and
Agent Helpers<http://www.net-snmp.org/wiki/index.php/Agent_Helpers>. Here are
some questions I couldn't figure out by myself:
* I'm trying to follow TUT:Writing a MIB
Module<http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module> with
the scalar_int example. I can't figure out where to place scalar_int.c. Also,
doesn't it have any header file? Do I need to change anything in the config
files before building it?
* I feel MIB for
Dummies<http://www.net-snmp.org/wiki/index.php/MIB_for_Dummies> starts with the
assumption I already have some pre-configured MIB. Is that true or am I missing
something? If so, how do I generate one so it contains OIDs for all my sensors
and actuators?
* Which strategy would you guys suggest I invest more of my time? Writing a
MIB Module from scratch, or using mib2c? I feel writing it from scratch could
be more appropriate since I'll need low-level hardware integration. But I
really need some expert's opinion on this. Also, in which case using AgentX
would be more appropriate? Could that be the case of my project?
* Finally, is there any book you guys would suggest? I've been reading
O'Reilly's Essential SNMP<http://shop.oreilly.com/product/9780596008406.do>,
but I feel it's more targeted at Network Admins, not so much at Developers per
se.
Any help is much appreciated.
Regards,
Bernardo.
[1485168441010_logotipo.png]
bernardo rodrigues
Desenvolvedor de Hardware - Hardware Developer
Tel: +55 (62) 39468060
Cel: +55 (62) 991829140
e-mail:
bernardo.rodrig...@datatraffic.com.br<mailto:bernardo.rodrig...@datatraffic.com.br>
________________________________
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo,
contiene información de carácter confidencial exclusivamente dirigida a su
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda
notificado que la lectura, utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente. En el caso de haber
recibido este correo electrónico por error, se ruega notificar inmediatamente
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.
This email and any file attached to it (when applicable) contain(s)
confidential information that is exclusively addressed to its recipient(s). If
you are not the indicated recipient, you are informed that reading, using,
disseminating and/or copying it without authorisation is forbidden in
accordance with the legislation in effect. If you have received this email by
mistake, please immediately notify the sender of the situation by resending it
to their email address.
Avoid printing this message if it is not absolutely necessary.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders