Hi Guillaume and the list,<br><br><div class="gmail_quote">2011/11/15 Guillaume PROTET <span dir="ltr"><<a href="mailto:guillaume@ocsinventory-ng.org" target="_blank">guillaume@ocsinventory-ng.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>Hi Arnaud,<br>
<br>
Thanks a lot for your email. Of course, we are interested to work with you on this. It could be really interesting to get this kind of informations in OCS Inventory.<br></div></div></blockquote><div><br>I'm glad to see you're interested in ;)<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
If the "nut-scanner" command can use SNMP, an idea could be to integrate it directly in OCS SNMP scans steps.</div></div></blockquote><div><br>well, nut-scanner is very NUT centric: it will show the basic info for detected devices, in order to configure the right NUT driver(s) for data acquisition (for protection or management purpose).<br>
<br>As an example for nut-scanner with SNMP, you would only get the IP address and the name of the detected MIB (which can only be resolved by the snmp-ups NUT driver)!<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div> A special perl module could be create to make OCS agent able to scan NUT devices during its SNMP scans. I think it could be easily integrated. If you want, you can take a look at OCS Unix agent trunk branch on launchpad (<a href="https://code.launchpad.net/%7Eocsinventory-dev/ocsinventory-unix-agent/trunk" target="_blank">https://code.launchpad.net/~ocsinventory-dev/ocsinventory-unix-agent/trunk</a>) and take a look to lib/Ocsinventory/Agent/Modules/Snmp* files to give you an idea on how SNMP scans work.<br>
<br>
Of course, it is a first idea and there is surely an other way to do this :) :).<br></div></div></blockquote><br>First note that NUT currently supports 12 MIBs, with ~8 more stagging.<br>And not all offers the same level of details and capabilities.<br>
Some PDUs are very basic, for example.<br><br>I see a 2 steps way:<br><br>1) use the nut-scanner for a quick integration.<br>Refer to [1].<br><br>A Perl wrapper is planned (as for the existing "jNutScanner" [2]), that would help this effort.<br>
Any Perl contrib is welcome BTW ;-)<br><br>This requires the nut-scanner binary to installed on the local system, that is:<br>- the server, for SNMP scans<br>- the agents for USB and still for IPMI (remote support planned) scans<br>
<br>Here is an example SNMP scan, in quiet mode with parsable output:<br><br>$ /path/to/nut-scanner -SPq --mask_cidr <a href="http://166.99.250.58/24" target="_blank">166.99.250.58/24</a><br><br>SNMP:driver="snmp-ups",port="166.99.250.64",desc="Eaton 5PX",mibs="mge",community="public"<br>
SNMP:driver="snmp-ups",port="166.99.250.26",desc="Evolution",mibs="mge",community="public"<br>SNMP:driver="snmp-ups",port="166.99.250.67",desc="DELL",mibs="ietf",community="public"<br>
SNMP:driver="snmp-ups",port="166.99.250.7",desc="DBQ10634/5",mibs="aphel_revelation",community="public"<br>SNMP:driver="snmp-ups",port="<a href="tel:166.99.250.118" value="+16699250118" target="_blank">166.99.250.118</a>",desc="EATON",mibs="ietf",community="public"<br>
SNMP:driver="snmp-ups",port="<a href="tel:166.99.250.118" value="+16699250118" target="_blank">166.99.250.118</a>",desc="Eaton 5PX 1500",mibs="pw",community="public"<br>SNMP:driver="snmp-ups",port="<a href="tel:166.99.250.118" value="+16699250118" target="_blank">166.99.250.118</a>",desc="Eaton 5PX",mibs="mge",community="public"<br>
<br>Note: the same device may be exposed several times, if it supports several MIBs (as for <a href="tel:166.99.250.118" value="+16699250118" target="_blank">166.99.250.118</a> above)!<br>
<br>
<br>2) configure and launch snmp-ups + upsd to get more (all) details<br><br>As told previously, the results of a NUT scan is very basic.<br><br>But many details can then be gathered using NUT [3] and its client interface (Perl binding available [4]).<br>
See [5] for examples of UPS and PDU data reported by NUT, so that you can match with GLPI requirements or needs.<br><br>That method requires to setup NUT to talk to the SNMP device, but that is not a big deal.<br>The nut-scanner output can be used (either the parsable, or the direct nut ups.conf format)<br>
<br><br>So, does the above 2 steps suits you?<br>How can we collaborate on this topic?<br><br>Finally, NUT supports most (if not all) USB UPSs, and now IPMI power supply (most servers).<br>
Can OCS handle this?<br>For the former, NUT can also provide a "Perl adapted header" (C header also attached).<br>For IPMI, there are generic ways that can be used to do this (I recommend a wrapper around FreeIPMI).<br>
<br>cheers,<br>Arnaud<br>--<br>[1] nut-scanner manpage(doc to be published with the next release)<br>
<a href="http://www.networkupstools.org/docs/man/nut-scanner.html" target="_blank">http://www.networkupstools.org/docs/man/nut-scanner.html</a><br>
[2] <a href="http://anonscm.debian.org/viewvc/nut/trunk/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java?view=co" target="_blank">http://anonscm.debian.org/viewvc/nut/trunk/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java?view=co</a><br>
[3] NUT architecture<br><a href="http://www.networkupstools.org/docs/developer-guide.chunked/ar01s02.html" target="_blank">http://www.networkupstools.org/docs/developer-guide.chunked/ar01s02.html</a><br>[4] UPS::Nut client Perl module: <a href="http://www.networkupstools.org/projects.html#_a_href_http_search_cpan_org_search_dist_ups_nut_ups_nut_a" target="_blank">http://www.networkupstools.org/projects.html#_a_href_http_search_cpan_org_search_dist_ups_nut_ups_nut_a</a><br>
[5] examples of NUT data output:<br>UPS: <a href="http://anonscm.debian.org/viewvc/nut/trunk/data/evolution500.seq?view=co" target="_blank">http://anonscm.debian.org/viewvc/nut/trunk/data/evolution500.seq?view=co</a><br>
PDU: <a href="http://anonscm.debian.org/viewvc/nut/trunk/data/epdu-managed.dev?view=co" target="_blank">http://anonscm.debian.org/viewvc/nut/trunk/data/epdu-managed.dev?view=co</a><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>