Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Dec 14, 2017 12:11 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Fri Apr 20, 2007 6:34 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Hi

can you try that :
Code:
$ snmpwalk -v 1 -c yourcommunity xx.xx.xx.xx mem

I suspect Net-SNMP does not return the correct values.

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 10:26 pm 
Offline

Joined: Tue Apr 10, 2007 12:57 am
Posts: 9
Thanks for the suggestion, I verified that NET-SNMP doesn't work correctly. What would you recommend to fix this.

UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 30169
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 0
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 63798
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 0
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 0
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000
UCD-SNMP-MIB::memShared.0 = INTEGER: 0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 0
UCD-SNMP-MIB::memCached.0 = INTEGER: 0
UCD-SNMP-MIB::memSwapError.0 = INTEGER: 1
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: Running out of swap space (0)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 3:02 am 
Offline

Joined: Tue Apr 10, 2007 12:57 am
Posts: 9
Hello,

I managed to get NET-SNMP installed onto my Suse Server from source code. Now snmpwalk -v 1 -c public xx.xx.xx.xx mem works for me.

However, the graph shows all the number in "nan". I also tried to play around with sql forum post

mysql> select count(*) from poller_output;
mysql> truncate table poller_output;

These above commands are supposed to be taking care of the no graph or "nan" value issue.

Thankx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 2:56 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Could you delete the associated .rrd files ?

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 9:57 pm 
Offline

Joined: Tue Apr 10, 2007 12:57 am
Posts: 9
It turned out pre-installed SNMP on SuSE 9 is not working properly.
I have to install net-snmp 5.4 source packages in order to graph properly.
The default SNMP 5.4 build doesn't include MIB modules, i need to enable-ucd-snmp-compatibility option.
snmpwalk -v 1 -c public xx.xx.xx.xx .1.3.6.1.2.1.25.2.2.0
Returned value
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 65329680 Kbytes

Then I execute
/usr/local/php/bin/php -q netsnmp_memory_usage.php xx.xx.xx.xx, public, 1, , , 161, 500

Now everything works well.

Thanks for the suggestion


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 9:22 am 
Offline

Joined: Tue Apr 17, 2007 8:25 am
Posts: 39
Good stuff !

No problem with OpenBSD devices.

But have you an idea about traffic templates :
If I want use Data Query [SNMP - Interface Statistics] for create graph, I have like message error : "WARNING: Result from SNMP not valid. Partial Result:" only with an OpenBSD device.

Post : http://forums.cacti.net/viewtopic.php?t=20761


Top
 Profile  
 
 Post subject: Problem with running the scriupt
PostPosted: Wed Sep 26, 2007 12:37 pm 
Offline

Joined: Wed Feb 21, 2007 10:26 am
Posts: 17
php -q ./netsnmp_memory_usage.php hostname, public, 1, , , 161, 500
is returning "failed: malformed output"

Can someone tell me what his means?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 5:55 pm 
Offline

Joined: Wed Sep 22, 2004 12:05 pm
Posts: 16
Location: Cleveland, OH
I am getting the same "malformed output" when I run the script manually. I checked all the OIDs on my Solaris 8 box and all returned values except for the last two.

[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048576 KBytes
[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 209272
[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.4.1.2021.4.3.0
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 2099184
[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.4.1.2021.4.4.0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 2099184
[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.4.1.2021.4.14.0
[ ~]$ snmpwalk -v1 -c public 10.2.2.70 .1.3.6.1.4.1.2021.4.15.0

From reading the code it looks like it is a defense measure to stop processing if any value does not return a real value. The membuffer and memcache are probably not supported on Solaris. Is there a way to get the script to process the data anyway?

Thanks!

Matthew

_________________
It is always easy when you know how to do it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 10:29 am 
Offline
Cacti User

Joined: Thu Apr 05, 2007 9:28 am
Posts: 129
Maybe I missed it and this has already been addressed, but my mem is showing k/M instead of M/G in regards to the numbers being shown.

IE: 401k of buffers used when it should be 401M and 8M freemem when it should be 8G

Any clues?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 10:47 am 
Offline
Cacti User

Joined: Thu Apr 05, 2007 9:28 am
Posts: 129
Nevermind. Changed CDEF function on all graphs to use Multiply by 1024


Top
 Profile  
 
 Post subject: Problem memory graphs
PostPosted: Wed Oct 03, 2007 4:45 am 
Offline

Joined: Tue Sep 11, 2007 6:33 am
Posts: 27
I have just put control yourself of the memory(report) but now I have a problem...
When it(he,she) paints the graphs to me in the values "Nan" goes out for me always and the graph remains in white(target).
I have put the script inside path_cacti/scrtips/
Some help


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 25, 2007 3:05 am 
Offline
Cacti User

Joined: Sun May 27, 2007 5:42 pm
Posts: 175
To all

This script need to be modified in order to run on cacti 0.8.7

Prior to 0.8.7, the configuration information is stored in config.php. In 0.8.7, most of the information previously in config.php are moved to global.php.

In this 0.8.7, in order to use php snmp call, it require more information.
Thus here is the modification on "netsnmp_memory_usage.php:
# -------------------------------------------------------------------------------

#
# cacti script to read ucd/net-snmp memory usage data with SNMP
#
# uses the basic HOST MIB for phys memory due to swap weirdness in FreeBSD handling
#
include(dirname(__FILE__) . "/../include/config.php");
include(dirname(__FILE__) . "/../include/global.php");
include(dirname(__FILE__) . "/../lib/snmp.php");

#
# global declarations
#
...
...
...
...
$cmdoutputcount = 0;

#
# run the program
#

while ($cmdoutputcount < count($oid)) {

$cmdoutput[$cmdoutputcount] = cacti_snmp_get($snmp_hostname,
$snmp_community,
$oid[$cmdoutputcount][1],
$snmp_version,
$snmp_username,
$snmp_password,
"",
"",
"",
"",
$snmp_port,
$snmp_timeout);

#
# make sure the data is not null
#
if (trim($cmdoutput[$cmdoutputcount]) == "") {

echo ("failed: malformed output \n");

exit(1);
}
..
..
..
# ---------------------------------------------------------------------------------


I also attached to complete modification file.

SH


Attachments:
netsnmp_memory_usage.php.gz [1.66 KiB]
Downloaded 773 times
Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 26, 2007 4:42 pm 
Offline

Joined: Mon Sep 10, 2007 2:47 pm
Posts: 40
super-hornet, i change to the new php script, and via shell i got receive the infos, but this not send to graph

http://sysmon.forbrazil.com.br/cacti/graph.php?action=zoom&local_graph_id=43&rra_id=0

Can you help-me? I use the original template.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 29, 2007 6:03 am 
Offline

Joined: Mon Oct 29, 2007 5:39 am
Posts: 1
Hi super-hornet,

I firgured out the exact same modifications myself, but they do not work with SNMPv3, or do they at your server?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 29, 2007 7:29 am 
Offline

Joined: Tue Sep 11, 2007 6:33 am
Posts: 27
super-hornet!!!
I continue with the same problem of before, when I throw the script it works perfectly but then it does not paint anything in the graphs.
I have put the .php that you have left in the web page.
I need help please


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group