[Nut-upsuser] using nut to monitor SNMP UPS unit

Peter Selinger selinger at mathstat.dal.ca
Wed Nov 29 03:16:14 CET 2006


Hi Tim,

if you are using NUT 2.0.4, then you should look at the instructions
in the file INSTALL. Step 2 is the following:

> 2. Build the programs.
>
>        make
>
>    Optionaly, you can also build the USB drivers (requires libusb) using:
>
>        make usb
>
>    The same goes for the SNMP driver (snmp-ups, requires Net SNMP) using:
>
>        make snmp

I think the last sentence answers your question.

In case you want to compile the development version from SVN, the
procedure is slightly different, but it too is explained in INSTALL. 

-- Peter

Tim Chipman wrote:
> 
> Hi all,
> 
> I've been trying to build NUT (latest release source) on a pretty "standard"
> CentOS (RHEL style) linux box, to monitor an APC Symmetra UPS Unit which
> powers our server room and broadcasts information via SNMP to appropriate
> clients.
> 
> I am having some trouble even encouraging NUT to build with snmp support,
> which doesn't seem to happen by default.
> 
> I am curious if anyone has pointers, or if there is info summarized anywhere
> on this topic.
> 
> All help is greatly appreciated.  Relevant text is pasted below.
> 
> Many thanks,
> 
> Tim Chipman
> 
> 
> 
> --------PASTE---------------
> 
> ./configure --with-drivers=snmp-ups
> 
> runs, but I note in output:
> 
> checking for Net-SNMP cflags... not found
> checking for Net-SNMP libs... not found
> 
> note that this system has net-snmpd installed and snmp libs are visible
> under /usr/lib
> 
> When I try to "make" I get errors:
> 
> [root at hydra nut-2.0.4]# make
> common/
> make[1]: Entering directory `/opt/src/nut/nut-2.0.4/common'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/opt/src/nut/nut-2.0.4/common'
> drivers/
> make[1]: Entering directory `/opt/src/nut/nut-2.0.4/drivers'
> gcc -I../include -O -Wall -Wsign-compare  -c snmp-ups.c
> In file included from snmp-ups.c:31:
> snmp-ups.h:46:38: net-snmp/net-snmp-config.h: No such file or directory
> snmp-ups.h:54:40: net-snmp/net-snmp-includes.h: No such file or directory
> ...
> 
> note that I can build nut just fine if I don't ask it to build the snmp
> support. (yay)
> 
> 
> as per hints I've found elsewhere, I have got a config file thus, although
> I'm not yet at a point of actually testing it:
> 
> [root at hydra etc]# more ups.conf
> [apc]
> driver = snmp-ups
> port = 192.168.23.50
> community = s3cr3t
> desc="APC Symmeyra ups"
> snmp_version = v1
> mibs = apcc
> 
> ------=_Part_41737_17154609.1164657175299
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> Hi all,<br><br>I've been trying to build NUT (latest release source) on a pretty &quot;standard&quot; CentOS (RHEL style) linux box, to monitor an APC Symmetra UPS Unit which powers our server room and broadcasts information via SNMP to appropriate clients.
> <br><br>I am having some trouble even encouraging NUT to build with snmp support, which doesn't seem to happen by default.<br><br>I am curious if anyone has pointers, or if there is info summarized anywhere on this topic.
> <br><br>All help is greatly appreciated.&nbsp; Relevant text is pasted below.<br><br>Many thanks,<br><br>Tim Chipman<br><br><br><br>--------PASTE---------------<br><br> ./configure --with-drivers=snmp-ups<br><br>runs, but I note in output:
> <br><br>checking for Net-SNMP cflags... not found<br>checking for Net-SNMP libs... not found<br><br>note that this system has net-snmpd installed and snmp libs are visible under /usr/lib<br><br>When I try to &quot;make&quot; I get errors:
> <br><br>[root at hydra nut-2.0.4]# make<br>common/<br>make[1]: Entering directory `/opt/src/nut/nut-2.0.4/common'<br>make[1]: Nothing to be done for `all'.<br>make[1]: Leaving directory `/opt/src/nut/nut-2.0.4/common'<br>drivers/
> <br>make[1]: Entering directory `/opt/src/nut/nut-2.0.4/drivers'<br>gcc -I../include -O -Wall -Wsign-compare&nbsp; -c snmp-ups.c<br>In file included from snmp-ups.c:31:<br>snmp-ups.h:46:38: net-snmp/net-snmp-config.h: No such file or directory
> <br>snmp-ups.h:54:40: net-snmp/net-snmp-includes.h: No such file or directory<br>...<br><br>note that I can build nut just fine if I don't ask it to build the snmp support. (yay)<br><br><br>as per hints I've found elsewhere, I have got a config file thus, although I'm not yet at a point of actually testing it:
> <br><br>[root at hydra etc]# more ups.conf<br>[apc]<br>driver = snmp-ups<br>port = <a href="http://192.168.23.50">192.168.23.50</a><br>community = s3cr3t<br>desc=&quot;APC Symmeyra ups&quot;<br>snmp_version = v1<br>mibs = apcc
> <br><br><br>
> 
> ------=_Part_41737_17154609.1164657175299--
> 
> 
> --===============6345973309093041206==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> --===============6345973309093041206==--
> 




More information about the Nut-upsuser mailing list