This is a discussion on Re: Implementing tables with "pass" directive within the SNMP Users forums, part of the Networking and Network Related category; >>>>> "Roman" == Roman Medina-Heigl Hernandez <roman@rs-labs.com> writes: Roman&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
>>>>> "Roman" == Roman Medina-Heigl Hernandez <roman@rs-labs.com> writes:
Roman> Hello, I've had a look to "passtest" script, which Roman> implements GET/GETNEXT/SET over custom objects. I need to Roman> implement something similar in a way that snmpd returns a Roman> table which is stored on a Database. Have someone already Roman> implemented something similar and could send me an example Roman> script? Bash/Perl is preferred. I've made my Bind9 SNMP Statistics script in perl. Full with a working MIB at http://www.bayour.com/bind9-snmp/. I'm currently in the process of finishing my Bacula SNMP Statistics script (also in perl), but with TWO 'linked' tables instead of one, 'flat' table as the Bind9 stats script. This isn't fully finished, but it ALMOST works (just some fine tuning left). Can be found at http://www.bayour.com/bacula-snmp/. Roman> Isn't there a library which deals with such a task? It's Roman> not easy to manually code response to GETNEXT statements. I CAN tell you that it was/is a nightmare! The problem isn't the actual retrieval and outputting of data, but trying to (dynamically!) trying to figure out what OID comes next! I thing I'm quite happy/proud of the Bacula stats script. It's a little of spaghetti code still, but I'm hopping to clean that up over the next few days... Note that I'm using the 'pass_persist' instead of 'pass' in both my scripts. That's because I got so poor performance - the script needs to dump the Bind9 statistics (or load all information from the SQL server in the Bacula statistics script) EVERY SINGLE TIME it was invoked! When doing a 'walk', you can imagine the extra overhead. The script is called ONCE FOR EVERY OID!! Jikes! Using 'pass_persist', I load the information ONCE, and then reuse that for every call. I found out that the snmpd kills the script if it haven't been used 'for a while'. Don't know how long, but a couple of minutes from the looks of it... I haven't looked at the SET stuff yet, don't need it (yet). Maybe that could be on the TODO for the Bacula statistics script? Use a SET to indicate what job Bacula should start running? In a 'not to distant' future, I'll implement traps to the Bacula MIB as well. Could be nice to have a trap generated if/when a job isn't completed correctly/at all... -- kibo subway PLO Serbian Cocaine president toluene Panama South Africa genetic smuggle colonel Ft. Bragg iodine Ortega [See http://www.aclu.org/echelonwatch/index.html for more about this] [Or http://www.europarl.eu.int/tempcom/e...chelon_en.pdf] If neither of these works, try http://www.aclu.org and search for echelon. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |