[hobbit] Monitoring SMB shares

dOCtoR MADneSs doctor at makelofine.org
Fri Jul 31 19:35:55 CEST 2009


dOCtoR MADneSs a écrit :
> Harold J. Ballinger a écrit :
>   
>> I have this in hobbitlaunch.cfg:
>> ----------COPIED WITH NO EDITS-------------
>> [shares]
>>          ENVFILE /etc/hobbit/hobbitserver.cfg
>>          NEEDS hobbitd
>>          CMD /usr/lib/hobbit/server/ext/shares.sh
>>          LOGFILE $BBSERVERLOGS/shares.log
>>          INTERVAL 5m
>> -------------------------------------------
>>
>> It appears to be running since I get this in shares.log:
>> ----------COPIED WITH NO EDITS-------------
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date 
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status .shares date
>> ---------------------------------------------
>>
>> Should the line in the log above actually look like this instead:
>>
>> /usr/lib/hobbit/server/bin/bb 127.0.0.1 status HHCGVL-FILE01.shares green 'date'
>>
>> I don't see it sending across the hostname or status?
>>
>> -----Original Message-----
>>   
>>     
>>> Hi,
>>>
>>> This code checks if the BBHOME variable is set. When xymon runs a 
>>> script, it sets some values, including BBHOME. For hobbit/xymon 
>>> compatibility, you could replace :
>>> . $BBHOME/etc/bbdef.sh
>>> with
>>> . $BBHOME/etc/hobbitclient.cfg          # INCLUDE STANDARD DEFINITIONS
>>>
>>> In your case, I suppose you declare the plugin with the following :
>>> [shares]
>>>         ENVFILE /usr/local/xymon/client/etc/hobbitclient.cfg
>>>         CMD $PATH_TO_SERVER_EXT_DIR/shares.sh
>>>         LOGFILE $/PATH_TO_SERVER_LOG_DIR/hobbitclient.log
>>>         INTERVAL 5m
>>> Please confirm this point or tell us the way you declared it.
>>>
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe at hswn.dk
>>>     
>>>       
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
>>
>>
>>   
>>     
>
> it seems your script does not send the machine variable. Output must be
> in this format :
> bb $BBDISP STATUS $MACHINE.$TEST $COLOR $DATE
>
> So, we must correct some code :
> at the end, replace :
>             $BB $BBDISP "status ${FULLNAME}.shares $BGCOLOR  `date` $LINE"
>
> with
>             $BB $BBDISP "status $MACHINE.shares $BGCOLOR  $(date) $LINE"
> and give me the new outputs in shares.log
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>   
I made a little mistake, you should use the provided correction, remove
the last line (echo "$BB $BBDISP "status ${FULLNAME}.shares $BGCOLOR 
`date` $LINE"")
and add this line :
echo "$BB $BBDISP "status $MACHINE.shares $BGCOLOR  $(date)  $LINE""
just under :
$BB $BBDISP "status $MACHINE.shares $BGCOLOR  $(date)  $LINE"




More information about the Xymon mailing list