Koozali.org: home of the SME Server

cacti question

Offline edb

  • *
  • 548
  • +0/-0
cacti question
« on: April 01, 2008, 04:38:33 AM »
I have Cacti installed and working fine on my SME 7.3 server and I'm also monitoring many other devices but I cannot seem to get cacti working to monitor the interfaces on my SME server?
I do have the the sme7admin contrib installed and it seems to work fine.

Does anyone know what I'm missing to be able to get cacti to monitor the SME server interface traffic?
Here is what I get or don't get ... it seems to be "success" but no items show up ...
1) SNMP - Interface Statistics  (Verbose Query)  None  Success [0 Items, 0 Rows] 

edb
......

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: cacti question
« Reply #1 on: April 01, 2008, 08:43:46 AM »
I have Cacti installed and working fine on my SME 7.3 server and I'm also monitoring many other devices but I cannot seem to get cacti working to monitor the interfaces on my SME server?
I do have the the sme7admin contrib installed and it seems to work fine.

Does anyone know what I'm missing to be able to get cacti to monitor the SME server interface traffic?
Here is what I get or don't get ... it seems to be "success" but no items show up ...
1) SNMP - Interface Statistics  (Verbose Query)  None  Success [0 Items, 0 Rows] 

edb
SME Server does not support SNMP AFAIK...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: cacti question
« Reply #2 on: April 01, 2008, 12:55:45 PM »
Could you try to install: http://www.netadmintools.com/art483.html

Just be sure to test on a non production server first.

AND PLEASE report anything your discover.

BTW: I´m thinking (again) to use Zabbix to monitor servers from my clients (just one install on my own server and a client on servers). Do you think about this option ?

Jáder
...

Offline Curly

  • ****
  • 114
  • +0/-0
Re: cacti question
« Reply #3 on: April 01, 2008, 01:05:07 PM »
I've used this http://sme.swerts-knudsen.dk/index.html?frame=http%3A//sme.swerts-knudsen.dk/howtos/howto_6.htm to get snmp working, and Cacti creates the graphs for my network-interfaces and more on SME 7.3 .
.......................................

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #4 on: April 01, 2008, 03:40:31 PM »
SME Server does not support SNMP AFAIK...

Thanks cactus

How is it that sme7admin collects interface details if not through snmp?
I guess snmp likely just needs to be configured in the snmp.conf file before cacti will work but I would have thought that it would have already been setup since the install of sme7admin ... but I guess not.

Thanks for the link Curly
Quote
I've used this http://sme.swerts-knudsen.dk/index.html?frame=http%3A//sme.swerts-knudsen.dk/howtos/howto_6.htm to get snmp working, and Cacti creates the graphs for my network-interfaces and more on SME 7.3 .

I used to use knudi's mrtg so I'll set up my snmp.conf file as indicated in the link and this will likely fix my issue. Thanks

edb
......

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #5 on: April 01, 2008, 05:50:53 PM »
Got it working now ... snmp just needed to be enabled and configured.
Knudi's mrtg instructions were a big help. Thanks  :)

edb
......

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: cacti question
« Reply #6 on: April 01, 2008, 06:32:04 PM »
Could you put here or in Wiki steps to enable/configure SNMP on SME7x ??

Thanks

Jáder
...

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #7 on: April 01, 2008, 07:58:04 PM »
Could you put here or in Wiki steps to enable/configure SNMP on SME7x ??

This is all taken from this link http://sme.swerts-knudsen.dk/index.html?frame=http%3A//sme.swerts-knudsen.dk/howtos/howto_6.htm but here you go:

First you need to modify your /etc/snmp/snmpd.conf file to look like this:
Code: [Select]
# First, map the community name "public" into a "security name"

#             sec.name    source         community

com2sec      local       localhost       public

####
# Second, map the security name into a group name:

#           groupName                    securityModel                           securityName

group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local

####
# Third, create a view for us to let the group have rights to:

# Make at least  snmpwalk -v 1 localhost -c public system fast again.
#          name           incl/excl     subtree         mask(optional)
view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1
view        all             included   .1                   80

####
# Finally, grant the group read-only access to the systemview view.

#             group                context sec.model  sec.level   prefix    read    write     notif

access  MyROGroup    ""    any       noauth    exact      all     none     none


# -----------------------------------------------------------------------------

Then

Configure SNMP to auto start after a reboot
Code: [Select]
cd /etc/rc.d/rc7.d
ln -s /etc/rc.d/init.d/snmpd S95snmpd
/sbin/e-smith/config set snmpd service InitscriptOrder 95 status enabled

Allow access to snmp to the localhost and from a single management workstation
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow
echo "snmpd: 127.0.0.1, management_workstation_IP/255.255.255.255" > /etc/e-smith/templates-custom/etc/hosts.allow/snmpd
/sbin/e-smith/expand-template /etc/hosts.allow

Restart the snmp service
Code: [Select]
/etc/init.d/snmpd restart
Test to see if snmp is working from the server command line
Code: [Select]
snmpwalk -v 1 localhost -c publicYou should get back a ton of mib info on the screen ...

You are now ready to use cacti or mrtg to monitor your server using snmp.

edb
« Last Edit: April 01, 2008, 08:53:42 PM by edb »
......

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #8 on: April 03, 2008, 11:15:24 PM »
Anyone have a perl-net-snmp rpm for SME 7.3?
......

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: cacti question
« Reply #9 on: April 04, 2008, 02:10:20 PM »
Anyone have a perl-net-snmp rpm for SME 7.3?
The dag repository has it, configuration instructions for the repository are in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #10 on: April 04, 2008, 05:38:07 PM »
Got it thanks ... I just did a

yum search net-snmp-perl (which displayed the available version)
yum install net-snmp-perl.i386

The problem I was having was trying to get a Sonicwall perl script for Cacti working so I have determined it is a problem with the script itself because I can run other pl scripts from the command line.

BTW if anyone has a recent Cacti script for a Sonicwall 2040 that works I'd be very greatfull.  :-)

Thanks

edb
......

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #11 on: April 04, 2008, 10:38:08 PM »
Cacti is a pretty nice tool!

For anyone who has a Sonicwall device with VPNs that they want to graph with Cacti please go to this link and download the monitoring script template http://forums.cacti.net/viewtopic.php?t=2893&postdays=0&postorder=asc&start=75

I then had to to the following on my SME 7.3 server running Cacti

Code: [Select]
wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm

wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm

rpm -ivh perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm

Now I'm able to get the data and create the graphs for all my VPN connections. Thank goodness!

BTW they also have a good script template for the Barracuda device as well which is located here ....
http://forums.cacti.net/viewtopic.php?t=14951&start=15&sid=8760ab366ef7c8e2e6b3c5e49a2b15cc

edb
......

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: cacti question
« Reply #12 on: April 05, 2008, 12:47:09 AM »
Code: [Select]
wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm

wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.2.el4.rf.i386.rpm

rpm -ivh 4.rperl-Crypt-DES-2.05-3.2.elf.i386.rpm perl-Net-SNMP-5.2.0-1.2.el4.rf.noarch.rpm
You should not have done that in the way you describe. The proper way is to add the dag repository as described in the wiki, regenerate your configuration file
Code: [Select]
expand-template /etc/yum.conf and install using yum, not RPM:
Code: [Select]
yum install perl-Net-SNMP --enablerepo=dag
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline edb

  • *
  • 548
  • +0/-0
Re: cacti question
« Reply #13 on: April 05, 2008, 02:33:54 AM »
Thanks for that tip cactus ... I didn't realize that it should only be done through the repo but I do now.
I guess I'll remove them and reinstall them through the method you indicated.

Thanks

edb

Repo Worked great!
« Last Edit: April 05, 2008, 02:53:18 AM by edb »
......

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: cacti question
« Reply #14 on: April 07, 2008, 10:01:24 AM »
edb, I found increasing the amount of memory available to PHP fixed a problem I was having with a couple of perl/cacti scripts.
It also improved the perfomance of server-manager as a by product.