Yet another ucd/net snmp memory usage graph template

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

Moderators: Developers, Moderators

Post Reply
TomekN
Posts: 13
Joined: Thu Mar 02, 2006 7:15 am
Location: Warsaw, Poland

Yet another ucd/net snmp memory usage graph template

Post by TomekN »

Ok, here's my contribution.

This is a pure UC Davis SNMP memory graph.

- Needs current Cacti version (0.8.6h)
- Tested on Linux but probably works on other memories also.
- Works on standard net-snmp "out of the box".
- Draws all values that I consider relevant.
- The small horizontal line over the green field is limit of your phisical memory.
- The red field over phisical memory is the amout of swap thas is used.

IMO a bit more usefull than the default Cacti ucd/net Memory Usage Graph :)
Attachments
memory_graph.png
memory_graph.png (27.92 KiB) Viewed 8969 times
cacti_graph_template_ucdnet_memory_usage_netventure.xml
(44.21 KiB) Downloaded 1260 times
Last edited by TomekN on Thu Mar 09, 2006 10:00 am, edited 1 time in total.
vgiambal
Posts: 1
Joined: Thu Dec 09, 2004 3:05 pm

how do I this template to cacti?

Post by vgiambal »

very nice graph,
how do I add this template to cacti?
vanc
Posts: 30
Joined: Thu Mar 02, 2006 2:54 pm
Location: Boston MA USA
Contact:

Post by vanc »

I like these graphs and they do more for what I need as well, and very well done.

Thanks!
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Thanks for this template !

The only thing I had to change was the maximum value for mem_total and swap_total data sources (it's set to 10 GB, and I have servers with 64 GB memory).
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
izi_
Posts: 1
Joined: Sun Mar 12, 2006 3:55 am

Post by izi_ »

Hi,

Have somebody tested this @ FreeBSD? :)
WCSkid
Posts: 4
Joined: Thu Mar 30, 2006 1:09 pm

Post by WCSkid »

Nice graph, I wish I could get it to work on my system (HP-UX), I can get it to work command line via php and it return values but poller errors out with:

04/10/2006 01:30:30 PM - CACTID: Poller[0] Host[19] DS[836] WARNING: Result from SCRIPT not valid. Partial Result: ...
04/10/2006 01:30:30 PM - CACTID: Poller[0] Host[19] ERROR: Empty result [10.x.x.x]: 'php C:/Cacti/cacti-0.8.6h/scripts/netsnmp_memory_usage.php 10.x.x.x, public, 1, , , 6161, 1500'

Could it be there is a bug in cacti? I do most of my polling on 161, but installed net-snmp on 6161 on this test box.

Any suggestions?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

IMO some of the values (memory buffers & cache) work only with Linux.

You can check this by running this command :

Code: Select all

$ snmpwalk -v 1 -c public localhost memory
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 506036
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 364696
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 191240
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 25228
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 389924
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000
UCD-SNMP-MIB::memShared.0 = INTEGER: 0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 5996
UCD-SNMP-MIB::memCached.0 = INTEGER: 31416
UCD-SNMP-MIB::memSwapError.0 = INTEGER: 0
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING:
This is on a Linux system, and here's on a HP-UX 11.00 :

Code: Select all

snmpwalk -v 1 -c public localhost memory
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 8388608
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 8388608
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 6291456
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 2063084
UCD-SNMP-MIB::memTotalSwapTXT.0 = INTEGER: 0
UCD-SNMP-MIB::memAvailSwapTXT.0 = INTEGER: 0
UCD-SNMP-MIB::memTotalRealTXT.0 = INTEGER: 0
UCD-SNMP-MIB::memAvailRealTXT.0 = INTEGER: 0
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 10451692
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000
UCD-SNMP-MIB::memSwapError.0 = INTEGER: 0
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING:
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
anuraganuj
Cacti User
Posts: 70
Joined: Tue Feb 21, 2006 9:50 am

problem with template

Post by anuraganuj »

the posted template had some discrepancy in memory used and free

i have done some changes now its fine.i created a new data template also
for used memory
Attachments
cacti_graph_template_linux_memory_usage.xml
(44.43 KiB) Downloaded 627 times
cacti_data_template_ucdnet_memory_used.xml
(5.54 KiB) Downloaded 670 times
WCSkid
Posts: 4
Joined: Thu Mar 30, 2006 1:09 pm

Post by WCSkid »

Yes, I understand the differences from Linux to HPUX. I was going to modify this to fit my needs. Basically using this template to learn a little bit more about cacti (being a newbie)

Right now I have modified the script for membuffer and memcache "fixed to return x value. so the script returns all need values via command line, just won't graph because of the snmp timeout errors. I think there is a bug. with checking SNMP on a different port than the poller.
davibou
Posts: 6
Joined: Mon Feb 05, 2007 11:48 am

Post by davibou »

work fine thanks :)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests