<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">hi Arnaud,</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Can you do a snmpwalk directly <VAR id=yui-ie-cursor></VAR>on the equipment and give us the resukt so we can see what</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">we can do. Our implementation for snmp perhaps be used for theses informations.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">François</SPAN></div>
<div style="RIGHT: auto"><BR style="RIGHT: auto"></div>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Arial size=2>
<DIV class=hr style="BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 0px; FONT-SIZE: 0px; PADDING-BOTTOM: 0px; MARGIN: 5px 0px; BORDER-LEFT: #ccc 1px solid; LINE-HEIGHT: 0; PADDING-TOP: 0px; BORDER-BOTTOM: #ccc 1px solid; HEIGHT: 0px" readonly="true" contenteditable="false"></DIV><B><SPAN style="FONT-WEIGHT: bold">De :</SPAN></B> Arnaud Quette <aquette.dev@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">À :</SPAN></B> developers.en@ocsinventory-ng.org <BR><B><SPAN style="FONT-WEIGHT: bold">Cc :</SPAN></B> NUT Developers <nut-upsdev@lists.alioth.debian.org> <BR><B><SPAN style="FONT-WEIGHT: bold">Envoyé le :</SPAN></B> Jeudi 17 Novembre 2011 17h18<BR><B><SPAN style="FONT-WEIGHT: bold">Objet :</SPAN></B> [team] Re: Adding power devices support to OCS Inventory NG<BR></FONT><BR>
<DIV id=yiv919050007 style="RIGHT: auto">Hi Guillaume and the list,<BR><BR>
<DIV class=yiv919050007gmail_quote style="RIGHT: auto">2011/11/15 Guillaume PROTET <SPAN dir=ltr><<A href="mailto:guillaume@ocsinventory-ng.org" target=_blank rel=nofollow ymailto="mailto:guillaume@ocsinventory-ng.org">guillaume@ocsinventory-ng.org</A>></SPAN><BR>
<BLOCKQUOTE class=yiv919050007gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<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=yiv919050007gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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 style="RIGHT: auto"><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=yiv919050007gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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/~ocsinventory-dev/ocsinventory-unix-agent/trunk" target=_blank rel=nofollow>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 rel=nofollow>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
 rel=nofollow>166.99.250.118</A>",desc="EATON",mibs="ietf",community="public"<BR>SNMP:driver="snmp-ups",port="<A rel=nofollow>166.99.250.118</A>",desc="Eaton 5PX 1500",mibs="pw",community="public"<BR>SNMP:driver="snmp-ups",port="<A rel=nofollow>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 rel=nofollow>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 rel=nofollow>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
 rel=nofollow>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 rel=nofollow>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 rel=nofollow>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 style="RIGHT: auto" href="http://anonscm.debian.org/viewvc/nut/trunk/data/evolution500.seq?view=co" target=_blank rel=nofollow>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 rel=nofollow>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></DIV><BR><BR></DIV></DIV></div></body></html>