installing snmpd on the MyBook World II
Forum » Forum / Installing & Configuring Programs » installing snmpd on the MyBook World II
Started by: SebulbaSebulba
On: 1194543022|%e %b %Y, %H:%M %Z|agohover
Number of posts: 16
rss icon RSS: New posts
Summary:
Here is a little HOWTO about (net-)SNMPD
installing snmpd
SebulbaSebulba 1194543022|%e %b %Y, %H:%M %Z|agohover

This is (now) a very basic howto about SNMP monitoring of a MyBook.

This has been done on my World Book II 1Tb, 01.01.18, configured as a RAID1.

Pre requisites
- SSH access on your MyBook
- somekind of SNMP monitoring software on your network (zenoss, rrdtool, cacti, etc)

I disabled Mionet on my MyBook (simply shutting it down manually after boot with "mionet.sh stop" ) to have some more memory. I don't think this is mandatory.

last edited on 1194692890|%e %b %Y, %H:%M %Z|agohover by Sebulba + show more
unfold installing snmpd by SebulbaSebulba, 1194543022|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
WorldBookWorldBook 1194904895|%e %b %Y, %H:%M %Z|agohover

Hi, How did you get ssh access on your world edition? I have a 1tb world edition as well,
but none of the ssh methods (upgrade script)
have worked for me so far?

unfold Re: installing snmpd by WorldBookWorldBook, 1194904895|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
vasilvasil 1196266663|%e %b %Y, %H:%M %Z|agohover

I had the same problem for a longer time with the same model. Finaly I downloaded the sources for the ssh hack on my local http server and it worked. After that I realized the problem lied all along in the dns settings of the mybook. I suggest you enter your ISP's dns server address in the web interface of the mybook, the networking part.

unfold Re: installing snmpd by vasilvasil, 1196266663|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
WinkelWinkel 1200673389|%e %b %Y, %H:%M %Z|agohover

Anybody got a template for cacti laying around? Specially something monitoring network speed and activity would be apreciated.

(i know im lazy… sry)

unfold Re: installing snmpd by WinkelWinkel, 1200673389|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
kevkukevku 1200678448|%e %b %Y, %H:%M %Z|agohover

well just use the ones supplied with cacti ucd/net templates are fine..

pilt1376.png
pilt2877.png
pilt3480.png

30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

unfold Re: installing snmpd by kevkukevku, 1200678448|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
kevkukevku 1200678670|%e %b %Y, %H:%M %Z|agohover

the memory one is a bit off i guess


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

unfold Re: installing snmpd by kevkukevku, 1200678670|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
BarrykeBarryke 1206899519|%e %b %Y, %H:%M %Z|agohover

He means a snmp.conf and fitting cacti configuration, not the graph template.
I beleive one can create a template in Cacti using Host templates > Add ?

Should be possible to make a template from your existing host setup (or data/graph sources) , but i don't know how exactly.

When layz plz dump the working full setup in any form (e.g. screenshot or file snippet) i'll convert it to a Cacti template. Thx!

last edited on 1207007040|%e %b %Y, %H:%M %Z|agohover by Barryke + show more
unfold Re: installing snmpd by BarrykeBarryke, 1206899519|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
SebulbaSebulba 1194563391|%e %b %Y, %H:%M %Z|agohover

Here we go !

So you want to monitor your BOok's CPU, load, and disk space with a professional solution ?
Me too.

COMPILE SNMPD

As a root user,

Get the latest net-snmp source from
http://net-snmp.sourceforge.net/download.html

extract it somewhere, eg in /root

configure
make
make install

you now have a compiled SNMPD.
BEWARE :it took FOREVER to compile "net snmp" on my Book, at least two hours (it would have been faster to compile on my mobile phone !!!) but it works. You'll have to be patient. This also makes the CPU skyrocket at 100% for hours. Not the right time to start a backup.

SNMPD.CONF

Now create an snmpd.conf file to your likings
( the config file should be in /usr/local/share/snmp/snmpd.conf )

I'm sorry but creating a nice snmpd.conf is a tough job. If you use SNMPD daily you probably have configs of your own (your other servers, etc) so I will not enter into too much details here.
- You should allow READ access to your MyBook box from your monitoring station's IP.
- You should have a community name ( or leave it to public but securing it with IP filter )
- You should had "disk" lines in the config fil to ease autodetection of your drives

Here is a working example, a very minimal snmpd.conf file.
This uses the "public" community name, only allowed from a specific IP and from localhost.
This config could be improved by adding disk IOs, temperature monitoring, etc…

com2sec local localhost public
com2sec localnet your-monitoring-ip public

group MyROSystem v1 local
group MyROSystem v2c local
group MyROSystem usm local
group MyROGroup v1 localnet
group MyROGroup v2c localnet
group MyROGroup usm localnet
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local

view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system

access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

syslocation MyHouseInTheTrees
syscontact your-email.here

disk /var 10000
disk /shares/internal 10000
disk / 10000

STARTING SNMPD

The MyBook does not look into /usr/local/lib for libraries, so SNMPD does not start if you do not edit the default library paths.

export LD_LIBRARY_PATH=.:/lib:/usr/lib:/usr/local/lib

Launch it manually.
/usr/local/sbin/snmpd
check that port 161 UDP is listening by doing
netstat -an
you should see
udp 0 0 0.0.0.0:161 0.0.0.0:*

You'll have to create a start/stop script to launch it at boot time once you're happy with your config.

WHAT YOU WILL GET

Add the MyBook's IP in your favorite network monitoring software, using the correct SNMP community name (from snmpd.conf )

http://pix.nofrag.com/5/5/7/1dacd6e97aad62e4ebf25f33d98cf.jpg

1dacd6e97aad62e4ebf25f33d98cf.jpg

Interestingly, this also confirms that
- CPU usage is "thru the roof" when doing transfers
- 35-36Mbps is the maximum upload rate this box can handle. (this is no news but it is now documented :) )

last edited on 1194692650|%e %b %Y, %H:%M %Z|agohover by Sebulba + show more
unfold Re: installing snmpd by SebulbaSebulba, 1194563391|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
kevkukevku 1195656140|%e %b %Y, %H:%M %Z|agohover

can someone post a start/stop script? mine ain't working


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

unfold Re: installing snmpd by kevkukevku, 1195656140|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
andycasaandycasa 1204100851|%e %b %Y, %H:%M %Z|agohover

Here is my start up script.

2 steps creating snmpd.sh and modifying post_network_start.sh

1. Place in /etc/init.d named snmpd.sh

#!/bin/sh
#
# Start snmpd
#

start() {
        export LD_LIBRARY_PATH=.:/lib:/usr/lib:/usr/local/lib
        echo "Starting SNMPD"
        /usr/local/sbin/snmpd
}

stop() {
        echo "Stopping SNMPD"
        killall snmpd > /dev/null 2>&1
        killall snmpd > /dev/null 2>&1
}
restart() {
        stop
        start
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                restart
                ;;
        cleanup)
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart}"
                exit 1
esac

exit $?

2. Modify the post_network_start.sh script as below to include the start stop reference to snmpd

(only part of the file is shown)

start() {
        if [ ! -e "$POST_NETWORK_STARTED_FILE" ]
        then
                $SCRIPTS_PATH/crond.sh start
                $SCRIPTS_PATH/mionet.sh start
                $SCRIPTS_PATH/snmpd.sh start
                touch $POST_NETWORK_STARTED_FILE
        fi
}

stop() {
        if [ -e "$POST_NETWORK_STARTED_FILE" ]
        then
                $SCRIPTS_PATH/mionet.sh stop
                $SCRIPTS_PATH/crond.sh stop
                $SCRIPTS_PATH/snmpd.sh stop
                rm $POST_NETWORK_STARTED_FILE
        fi
}
unfold Re: installing snmpd by andycasaandycasa, 1204100851|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
BarrykeBarryke 1206896546|%e %b %Y, %H:%M %Z|agohover

Could you contribute this to the net-snmp page?

unfold Re: installing snmpd by BarrykeBarryke, 1206896546|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
bzhoubzhou 1200677951|%e %b %Y, %H:%M %Z|agohover

To save some compilation time, you can also use the optware/gumstix1151 package.

unfold Re: installing snmpd by bzhoubzhou, 1200677951|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
starkstark 1206100969|%e %b %Y, %H:%M %Z|agohover

hey. where did you install your SNMP monitor? on your cumputah og the MBWE?


2 X MBWE 500gb
LED Display

unfold Re: installing snmpd by starkstark, 1206100969|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
BarrykeBarryke 1206897255|%e %b %Y, %H:%M %Z|agohover

Thanks! Helped me a lot.
Could you contribute this to the net-snmp page?

unfold Re: installing snmpd by BarrykeBarryke, 1206897255|%e %b %Y, %H:%M %Z|agohover
Re: installing snmpd
marcusflymarcusfly 1234159478|%e %b %Y, %H:%M %Z|agohover

i try to configure SNMP and get this

[root@nas net-snmp]# ./configure
checking what to build and install...  agent apps man local mibs
using default persistent mask 077
using default temporary file pattern /tmp/snmpdXXXXXX
using default AgentX socket /var/agentx/master
using default "enterprise.net-snmp"
using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs..."
using default notifications "NET-SNMP-MIB::netSnmpNotifications"
using OS default send buffer size for server sockets
using OS default recv buffer size for server sockets
using OS default send buffer size for client sockets
using OS default recv buffer size for client sockets
checking if I need to feed myself to ksh... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
[root@nas net-snmp]#
unfold Re: installing snmpd by marcusflymarcusfly, 1234159478|%e %b %Y, %H:%M %Z|agohover
My LOG
BarrykeBarryke 1206882554|%e %b %Y, %H:%M %Z|agohover

A structured how-to building on the shoulders of this thread can be found on the net-snmp page.

If you know more about configuring different SNMP value's to monitor please contribute!
MIB / anything.

last edited on 1206897386|%e %b %Y, %H:%M %Z|agohover by Barryke + show more
unfold My LOG by BarrykeBarryke, 1206882554|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License