SNMP Informant Win32 memory usage -- update June 21, 2009

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

Moderators: Developers, Moderators

Post Reply
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

SNMP Informant Win32 memory usage -- update June 21, 2009

Post by ehall »

I got my improved ucd/net-snmp memory usage ported over to Win32, using SNMP Informant Advanced (not the Std freeware edition).

Image

That graph shows the total real memory installed, used by processes, used by cache, and altogether unused. It also shows allocated swap space (from c:\pagefile.dat only) as a pink strip on the top, above the real memory.

This uses a script to gather various bits of information from the Host MIB as well as SNMP Informant, and then performs some mathematics and string normalization.

--> see this page for the tarball and instructions <--
Last edited by ehall on Tue Jun 23, 2009 11:18 am, edited 8 times in total.
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

has to be informat adv version ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yea, standard doesn't have that info.
User avatar
ajohnson
Posts: 36
Joined: Tue Dec 27, 2005 5:36 pm

Which version?

Post by ajohnson »

I'm using Cacti 0.8.6g and I'm getting invalid hash errors when trying to import the template. What version did you export this from?

BTW - Nice clean coding & comments on the script.
User avatar
AndyStewart
Cacti User
Posts: 102
Joined: Thu Sep 29, 2005 5:21 am
Location: Edinburgh, Scotland

Post by AndyStewart »

0.8.6g here as well, getting "hash version does not exist" when trying to import...
I don't care if the glass is half full or half empty, i want to know, who's been drinking my pint!!!

[size=75][Windows 2003 & IIS6] [Cacti 0.8.7b] [ActivePerl 5.8.8.817] [MySql 5.0.19] [NetSNMP 5.2.1.2-1] [PHP 5.1.2] [RRDTool 1.2.11]
[Plugins: PluginArchitecture, Monitor, Discovery, Threshold, Update, Reports, Manage, RealTime][/size]
ezoltan
Posts: 9
Joined: Thu Feb 09, 2006 11:09 pm

No values on graph

Post by ezoltan »

Hi,

This template is really nice and saves a lot of time. Thanks for it.

The import went like a charm: no errors at all, right at the first attempt.
The problem is that I don't get any readings: all values on the graph are still "nan" after I configured it 2-3 weeks ago.

If running the script from the console, I get these readings:
availReal: 546332672
memCached: 137285632
totalSwap: 0
usedSwap: 0
usedReal: 1462779904
availSwap:0

The server has 2Gb RAM with a 2Gb total page file size.
Too much for the SNMP counters?
Uses 32-bit or 64 bit counters?
If one counter would be over the maximum limit set in the datasource definition, would it prevent all reading from being written to the RRD database?

I am running Cacti 0.8.6h with RRDtool 1.2 on Redhat 9.
The maximum value for all conters in the template is set manually to 10000000000.

What am I doing wrong?

Thanks,
Zoltan
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

The posted update contains a fix that converts the SNMP timeout value from Cacti's millisecond format to PHP/Net-SNMP microsecond format. The lack of conversion in the earlier script would sometimes result in excessive retries or complete failure.
DataScrub
Posts: 7
Joined: Wed Apr 20, 2005 3:47 pm

Missing MIBS

Post by DataScrub »

I just bought the Informant Advanced agent to use with this script, and am having a problem... The following OID's (referenced in the script) don't seem to exist anymore. Did they use to? Browsing through the advanced (and standard) MIBs through GetIF didn't show that they had moved anywhere else, just that .1.3.6.1.4.1.9600.1.22 is not valid. Since ...9600.1.1 seems to be Standard and ...9600.1.2 seems to be Advanced, what does that imply about ...9600.1.22?

array ("totalSwap", ".1.3.6.1.4.1.9600.1.22.5.3.1.2.1"),
array ("usedSwap", ".1.3.6.1.4.1.9600.1.22.5.3.1.4.1");

For now I'm just commenting out anything about Swap, but I'd like to have that too. Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

When you snmpwalk 1.3.6.1.4.1.9600.1, you don't see anything in 1.3.6.1.4.1.9600.1.22 ?
DataScrub
Posts: 7
Joined: Wed Apr 20, 2005 3:47 pm

Post by DataScrub »

Nope.

monitor2:/usr/local/cacti/scripts# snmpwalk -c xxx -v1 10.200.2.174 .1.3.6.1.4.1.9600.1.22
End of MIB

Walking .1.3.6.1.4.1.9600.1.2 returns data just fine however.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

I uploaded a new version of the script that works with 0.8.6 and 0.8.7 and which should not have as many NAN problems. It does not work with 0.8.7 SNMPv3 due to limits in the command line length, but I hope to fix that in a subsequent release.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

I posted a new version of the script with many significant enhancements. The biggest change is a switch from the expensive and slow script query interface to the persistent and fast script server interface. I also dropped the comma-separated parameters and switched to a colon-separated "bundle" for SNMP arguments, tightened up the array and variable management, added a lot more error checking, and otherwise did a complete rewrite of the script.

Due to the changes, the script and resource xml files need to be reinstalled and any data queries need to be reimported. However the existing graphs and data sources should continue to operate afterwards.

I've also moved the files to this page on my web server so that I can more easily maintain them
Last edited by ehall on Tue Jun 23, 2009 11:17 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I see it's massive script update day, nice.

Please consider posting all templates in the repository. http://docs.cacti.net/templates
Mika2008
Posts: 26
Joined: Tue Dec 01, 2009 4:24 pm

Post by Mika2008 »

Hello, i have installed this scripts, and on my host i have installed
snmp informant 1.6 (current production release)


but when i lunch the script i have this error? :

Code: Select all

mika2008 [/var/www/cacti/scripts] > php ss_informant_memory.php 192.168.0.33:1:public::::::::
FATAL: Unable to read memory data from SNMP
what do u think the problem com from please?

and this :

Code: Select all

mika2008 [/var/www/cacti/scripts] > snmpwalk -c public  -v1 192.168.0.33 .1.3.6.1.4.1.9600.1.22 
End of MIB
Mika2008
Posts: 26
Joined: Tue Dec 01, 2009 4:24 pm

Post by Mika2008 »

up
please

I think is a problem of snmp informant, on windows, i have installed it, but what i need to do now ?

because he don't work
;'(


edit:
i used this version :
SNMP-INFORMANT - STD v1.6 current production released
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest