cacti installed - how to graph traffic?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

cacti installed - how to graph traffic?

Post by mr_scary »

I have installed the latest cacti on OpenBSD 3.7. I am mostly interested in graphing network traffic. Can someone provide basic steps to achieve this? I have installed net-snmp but do not have any experience using SNMP protocol. I feel that there are SNMP issues that the cacti docs do not cover.
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

I want to add:

I see "SNMP not in use" on my cacti page.

Also:

# snmpwalk -c public -v 1 localhost
Timeout: No Response from localhost
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

If you want to graph local interface traffic, you need to be running an snmp agent on the box. Then you can set a community and get the interface statistics.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

I thought net-snmp was my agent? I installed this by OpenBSD package. Here are the SNMP commands available on my system:

snmpbulkget
snmpcheck
snmpdelta
snmpget
snmpinform
snmpset
snmptable
snmptranslate
snmpusm
snmpwalk
snmpbulkwalk
snmpconf
snmpdf
snmpgetnext
snmpnetstat
snmpstatus
snmptest
snmptrap
snmpvacm

Any advice on how to get this thing off the ground?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

You are looking for snmpd.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

Allright. I found snmpd. I started it and I see that my system is listening on port 199. I see that cacti still shows "SNMP not in use".
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Should be port 161...

Also, you need to set the Snmp Community in the device in cacti. It's probably public.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

It is definitely port 199. My files show this as description:

smux 199/tcp # SNMP Unix Multiplexer

I started the daemon like this:

# snmpd -a -Lf /var/log/snmpd.log

No errors reported in above logfile:

Reconfiguring daemon
NET-SNMP version 5.1.2 restarted
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

smux is not snmp.....

snmp typically response on udp port 161.

I would check your /etc/snmpd.conf and then attempt to start the service.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

Allright. My box <i>is</i> listening on UDP 161. Now cacti reports "SNMP error". I changed community string in snmpd.conf:

com2sec local localhost test1
com2sec mynetwork 192.168.2.0/24 test2

and use either test1 or test2 in cacti community field with no success.
jgtm
Posts: 12
Joined: Tue Aug 23, 2005 9:16 am

Post by jgtm »

You dont need all that com2sec bollox. You do need the following line though.

rocommunity public


Change "public" to whatever to want your community name to be. Then kill -HUP `head -1 /var/run/snmpd.pid` (or wherever OpenBSD has its pid files).

Then try the following command from the same box:

snmpwalk -Of -c public -v 1 localhost .1.3.6.1.4.1

(replacing public with your community name).

snmpwalk -On -c m3and3r -v 1 localhost .1.3.6.1.2.1

will give you the OID numbers instead of the string names.

Use: man snmpcmd

to get the other -O output options. (snmpwalk and the other snmp commands use snmpcmd).

Use...

snmpwalk -Of -c public -v 1 localhost .1.3.6.1.2.1

for the MIB2 snmp database.
Regards

James

[size=75]Cacti 0.8.6f Server:-
* HP Proliant DL740 with Red Hat Linux Advanced Server 3.0
* net-snmp-cmaX-libs-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-devel-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-utils-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-perl-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-5.1.2-220 (Red Hat RPM)
* RRDTool 1.2.11 (compiled from source)
* Apache 2.0.54 (compiled from source)
* PHP 4.4.0 (compiled from source)
* MySQL Standard 4.0.25 (Binary linux dist)
[/size]
mr_scary
Posts: 11
Joined: Thu Aug 25, 2005 3:06 pm

Post by mr_scary »

Thanks for your reply jgtm.

My config file does not mention 'rocommunity' parameter.

The only place where it mentions the term "community" is where I have already quoted earlier.

What it <i>does</i> say about "public" though is that the daemon (?) will respond to a community name of "public" if there is no config file present.

If I remove (rename) the config file and restart the daemon I get this in my log file:

====================
It's unlikely this agent can serve any useful purpose in this state.
Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent.
NET-SNMP version 5.1.2
====================

Continuing nonetheless with your command,

# snmpwalk -Of -c public -v 1 localhost .1.3.6.1.4.1
Timeout: No Response from localhost

Although this causes text to be appended to my log file:

====================
Connection from 127.0.0.1
Received SNMP packet(s) from 127.0.0.1
Connection from 127.0.0.1
Connection from 127.0.0.1
Connection from 127.0.0.1
Connection from 127.0.0.1
Connection from 127.0.0.1
====================
jgtm
Posts: 12
Joined: Tue Aug 23, 2005 9:16 am

Post by jgtm »

I think you should indeed run "snmpconf -g basic_setup" as thats what i did.

Anyway, if it will help. I have attached my snmpd.conf for you.

The version of net-snmp that I use is in my signature.
Attachments
snmpd.conf.txt
(4.51 KiB) Downloaded 608 times
Regards

James

[size=75]Cacti 0.8.6f Server:-
* HP Proliant DL740 with Red Hat Linux Advanced Server 3.0
* net-snmp-cmaX-libs-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-devel-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-utils-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-perl-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-5.1.2-220 (Red Hat RPM)
* RRDTool 1.2.11 (compiled from source)
* Apache 2.0.54 (compiled from source)
* PHP 4.4.0 (compiled from source)
* MySQL Standard 4.0.25 (Binary linux dist)
[/size]
jgtm
Posts: 12
Joined: Tue Aug 23, 2005 9:16 am

Post by jgtm »

You might also want to check out the net-snmp documentation and tutorials at

http://net-snmp.sourceforge.net/

and also download the MIB browser (x86 version) called Getif 2.3.1 from

http://www.wtcs.org/snmp4tpc/getif.htm

so you can then see what info snmpd will be able to give you.
Regards

James

[size=75]Cacti 0.8.6f Server:-
* HP Proliant DL740 with Red Hat Linux Advanced Server 3.0
* net-snmp-cmaX-libs-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-devel-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-utils-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-perl-5.1.2-220 (Red Hat RPM)
* net-snmp-cmaX-5.1.2-220 (Red Hat RPM)
* RRDTool 1.2.11 (compiled from source)
* Apache 2.0.54 (compiled from source)
* PHP 4.4.0 (compiled from source)
* MySQL Standard 4.0.25 (Binary linux dist)
[/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests