Show locked Machines, Shares and Files from a Samba Server

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

Moderators: Moderators, Developers

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

#16 Post by jacky » Thu Jan 08, 2009 8:59 pm

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

#17 Post by xtremebassist » Wed Mar 11, 2009 9:42 pm

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 555 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:

#18 Post by m0ps » Fri Jun 26, 2009 7:44 am

samba.pl is blank :(

User avatar
xtremebassist
Posts: 7
Joined: Sat Feb 17, 2007 2:42 pm
Contact:

New Archive

#19 Post by xtremebassist » Fri Jun 26, 2009 9:25 am

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

#20 Post by ivan-impuls » Sat Jul 18, 2009 11:09 am

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

#21 Post by ivan-impuls » Sat Jul 18, 2009 11:39 am

O, sorry
my system - Debian Lenny
version NET-SNMP - 5.4.1

ivan-impuls
Posts: 23
Joined: Mon Jun 15, 2009 1:09 am

#22 Post by ivan-impuls » Mon Jul 20, 2009 5:07 am

I did it!!!
Key is in rights on folder...

ribber
Posts: 2
Joined: Wed Mar 10, 2010 4:44 am

#23 Post by ribber » Wed Mar 10, 2010 4:52 am

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

#24 Post by ribber » Wed Mar 10, 2010 7:56 am

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