Do you know where your variables are? | |
PerlMonks |
Perl and SNMP (or how to create a custom SNMP agent.)by PyrexKidd (Monk) |
on May 24, 2011 at 17:16 UTC ( [id://906535]=perlquestion: print w/replies, xml ) | Need Help?? |
PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question: Hello Monks, I beleive my question is more of an SNMPd question than a perl question, though I have been unable to find the answer on my own, or on more general linux forums; I am asking here in a desparate hope someone has done before what I am atempting to do now. My goal: Create a custom SMTP monitor that returns the results of `exim -bpc` to my SNMP monitor. I would like to create an agent that responds to request to a cusom OID. That being said, another solution has been proposed to set a cron job to dump the return value of `exim -bpc` to a log file then have an snmp agent watch the log file. The second solution though less preferred seems like it would be 'easier'... what do you think? here's what I've got so far:
This is essentially the example in the documentation on CPAN. this is highly confusing as running this command does not provide the ability to configure a agent.conf file, nor am I able to find any documentation on agent.conf files. Perhaps I am not googling for this correctly (SNMP agent.conf file, directives, configuration), I would greatly appreciate any hints on where to find this documentation. additionally when run from a perl do /foo/test_agent.pl directive it causes snmpd to hang (become unresponsive). (either when started via init/services or from the commandline via snmpd -f) Then I've tried registering the agent itself via my_agent_name .1.3.6.1.4.1.8072.9999.9999.9999 /root/snmp/test_agent.pl which appears to have no affect on functionality. (this directive I pulled out of the SNMP::Server::Logtail docs. (realizing this is a hail mary, I figured it couldn't hurt my dev box to wave a dead chicken...) I really feel like I am just missing a simple piece of this puzzle... no matter how simple it seems to be the obsticle that is blocking my progress... If any one can even poing me in the general direction I'm sure it would help me get the wheels moving again.
Back to
Seekers of Perl Wisdom
|
|