Show locked Machines, Shares and Files from a Samba Server

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

jacky
Posts: 4
Joined: Wed Jan 07, 2009 9:34 pm

Post by jacky »

nightwisher wrote:I try on gentoo 2008.0 to install !

But no graph ...

i use second modified template and folow instruction !

Need help
me too,any idea?
User avatar
xtremebassist
Posts: 7
Joined: Sat Feb 17, 2007 2:42 pm
Contact:

Updated with SNMP extend

Post by xtremebassist »

The problem might be the original script is utilizing exec which is deprecated and will not run on a lot of new installations of SNMP. Attached is a version that uses extend instead. See this How To on detailed installation instructions.

You should test the results of the smbstatus commands to ensure the script is providing the correct results.
Attachments
samba.zip
(4.65 KiB) Downloaded 602 times
Last edited by xtremebassist on Fri Jun 26, 2009 9:24 am, edited 1 time in total.
m0ps
Posts: 1
Joined: Tue Apr 07, 2009 1:00 am
Contact:

Post by m0ps »

samba.pl is blank :(
User avatar
xtremebassist
Posts: 7
Joined: Sat Feb 17, 2007 2:42 pm
Contact:

New Archive

Post by xtremebassist »

Sorry about that. I uploaded a new zip archive with a non-blank samba.pl. :lol: Great catch by the way.
ivan-impuls
Posts: 23
Joined: Mon Jun 15, 2009 1:09 am

Post by ivan-impuls »

Good day!
xtremebassist thank you for your help page, but i have error.
Script is working fine.
In file snmpd.conf i added :

extend SambaProcesses /usr/share/cacti/scripts/samba.pl Processes
extend SambaShares /usr/share/cacti/scripts/samba.pl Shares
extend SambaFiles /usr/share/cacti/scripts/samba.pl Files

But when I do
snmpwalk -v 2c -c public 192.168.123.70 'NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."SambaFiles"'
I receive error:
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."SambaFiles" = STRING: /usr/share/cacti/scripts/samba.pl: Permission denied

Same for SambaShares and SambaProcesses.

Rights on file samba.pl -
-rwxrwxrwx 1 root root 893 Июл 17 23:26 samba.pl

What can I do?
Last edited by ivan-impuls on Sat Jul 18, 2009 11:41 am, edited 1 time in total.
ivan-impuls
Posts: 23
Joined: Mon Jun 15, 2009 1:09 am

Post by ivan-impuls »

O, sorry
my system - Debian Lenny
version NET-SNMP - 5.4.1
ivan-impuls
Posts: 23
Joined: Mon Jun 15, 2009 1:09 am

Post by ivan-impuls »

I did it!!!
Key is in rights on folder...
ribber
Posts: 2
Joined: Wed Mar 10, 2010 4:44 am

Post by ribber »

Hi everybody!

Great script!!!

But I have a problem. I used the updated script and get results using snmpwalk but no graph is displayed in cacti.

Any idea?

Thanks!!!


cacti 0.8.7e
samba 3.2.4-5.2
suse 11.1
ribber
Posts: 2
Joined: Wed Mar 10, 2010 4:44 am

Post by ribber »

Oh sorry, some more information:

net-snmp 5.4.2.1

result snmpwalk:

NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."SambaFiles" = STRING: 9

error message cacti log:

03/10/2010 01:49:06 PM - CMDPHP: Poller[0] Host[1] DS[50] WARNING: Result from SNMP not valid. Partial Result: U
03/10/2010 01:49:06 PM - CMDPHP: Poller[0] Host[1] DS[49] SNMP: v2: 127.0.0.1, dsname: samba_files, oid: NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.SambaFiles, output: U
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests