ucd/net - Available Disk Space How To?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

ucd/net - Available Disk Space How To?

Post by jdovidio »

Hello everyone:

I know this is kind of a silly question, but I've been trying use this (ucd/net - Available Disk Space) graph template and I can't make it work, so I wondering if someone can point me in the right direction...

so, What are the steps I'm doing?:
1 - Go to Console > Devices
2 - Select the Device I want to monitor
(Here I already have an Associated Data query "SNMP - Get Mounted Partitions")
3 - Select "Create Graph for this host"
4 - From the "Create:" drop down I select "ucd/net - Available Disk Space"
5 - click "Create"

When I do this, Im asked to enter the following 3 values:

Output Type ID
Index Value
Index Type


I've tried different options here based on what I saw on similar posts but still can't make it works :-(
the graphs are not even being created and I can't see anything related to Disk Space on the debug of the poller... what am I doing wrong? what should I enter into those 3 fields?

The Data Query Debug information is as follow:

Code: Select all

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_host_disk.php vmlab1 29 2:161:500:1:10:edrans:::MD5::DES: index'
+ Executing script query '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_host_disk.php vmlab1 29 2:161:500:1:10:edrans:::MD5::DES: query index'
+ Found item [hrStorageIndex='1'] index: 1
+ Found item [hrStorageIndex='3'] index: 3
+ Found item [hrStorageIndex='6'] index: 6
+ Found item [hrStorageIndex='7'] index: 7
+ Found item [hrStorageIndex='8'] index: 8
+ Found item [hrStorageIndex='10'] index: 10
+ Found item [hrStorageIndex='31'] index: 31
+ Executing script query '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_host_disk.php vmlab1 29 2:161:500:1:10:edrans:::MD5::DES: query description'
+ Found item [hrStorageDescr='Physical memory'] index: 1
+ Found item [hrStorageDescr='Virtual memory'] index: 3
+ Found item [hrStorageDescr='Memory buffers'] index: 6
+ Found item [hrStorageDescr='Cached memory'] index: 7
+ Found item [hrStorageDescr='Shared memory'] index: 8
+ Found item [hrStorageDescr='Swap space'] index: 10
+ Found item [hrStorageDescr='/'] index: 31
+ Executing script query '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_host_disk.php vmlab1 29 2:161:500:1:10:edrans:::MD5::DES: query sau'
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 1
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 3
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 6
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 7
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 8
+ Found item [hrStorageAllocationUnits='1024 Bytes'] index: 10
+ Found item [hrStorageAllocationUnits='4096 Bytes'] index: 31
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/host_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/host_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/host_disk.xml'

Can anyone give me a tip?

thanks a lot.
Javier.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

:o Something has gone wrong there... I get a list of partitions to choose from!

I have: "ucd/net - Get Monitored Partitions" in the Data Queries section, and when I click Create Graphs, I get a table of disk partitions.

If you click the Verbose Query link by the side of the Data Query, do you get sensible results?

It seems that perhaps the query has become 'detached' from the graph template somehow... I don't fully understand how that stuff works though, so perhaps some template expert can comment.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

Post by jdovidio »

Well, first, the "ucd/net - Get Monitored Partitions" wasn't associated to my device (probably that's one of the problems which I just fixed on the host template)
and the second point which I think is another problem is the debug of the ucd/net - Get Monitored Partitions:

Code: Select all

+ Running data query [2].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.9.1.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
specifically the "No SNMP data returned", not sure if that's correct.
Do you or anyone know if there is any place where I can get the graph template and import it again? that should fix anything I could have broken (dependencies and that kind of things)
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

Post by jdovidio »

I think now I'm up to something... :)

the bad news first:

vmlab1:~# snmpwalk -v 2c -c MYCOMUNITY vmlab1 .1.3.6.1.4.1.2021.9.1.1
UCD-SNMP-MIB::dskIndex = No Such Instance currently exists at this OID
vmlab1:~# snmpwalk -v 2c -c MYCOMUNITY vmlab1 dsktable
UCD-SNMP-MIB::dskTable = No Such Object available on this agent at this OID
vmlab1:~#

Found something related to this on:
http://forums.cacti.net/post-84501.html

Will try the recommendations from that post and post here the results.

Jav.
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

Post by jdovidio »

Ok, after fixing the snmpd configuration following the steps on http://forums.cacti.net/viewtopic.php?t=15353
(basically I added the includeAllDisks to my snmpd.conf)

I can query the partitions now.

Code: Select all

vmlab1:~# snmpwalk -v 2c -c MYCOMMUNITY vmlab1 dsktable
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/hda1
UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 100000
UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 3794904
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 1441828
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 2160300
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 60
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 21
UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: noError(0)
UCD-SNMP-MIB::dskErrorMsg.1 = STRING: 
vmlab1:~# 
the bad news is that I still get the same behaviour when trying to create the graph for the device. :-/

This is now the output of the " 2) ucd/net - Get Monitored Partitions " data query:

Code: Select all

+ Running data query [2].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.9.1.1'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.1' value: '1'
+ Located input field 'dskIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.9.1.1'
+ Found item [dskIndex='1'] index: 1 [from value]
+ Located input field 'dskPath' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.9.1.2'
+ Found item [dskPath='/'] index: 1 [from value]
+ Located input field 'dskDevice' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.9.1.3'
+ Found item [dskDevice='/dev/hda1'] index: 1 [from value]
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/net-snmp_disk.xml'
/me keeps debugging


jav.
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

Post by jdovidio »

Ok, something very strange happened with the template and I can't figure it out.

I did a fresh installation of cacti in another server and I'm able to graph with "ucd/net - Available Disk Space" template without problems, so definitely i screw something up, will try to figure out what was it later, but definitely something related to the graph template dissociated with the data query.

The only weird behavior (at least for my eyes) is that I can't add the ucd/net - Available Disk Space template doing:

1 - Console > Devices
2 - Select the Device > Create Graph for this host

On the list of graphs templates, "ucd/net - Available Disk Space" simply doesn't show.
But if I go to:

1 - Console > Graph Management
2 - Add

It's there and I can add it without problems.
Is this a normal behavior?


Thanks a lot for your comments, they did point me out on the right direction :-)


Javier.

P.S.: For those reading this post, if you are not seeing your partitions with the data query, remember to add includeAllDisks to your snmpd.conf as per http://forums.cacti.net/viewtopic.php?t=15353
User avatar
jdovidio
Posts: 14
Joined: Wed Jul 29, 2009 11:53 am
Location: Argentina

Post by jdovidio »

Right, so I found the problem... it was actually me not fully understanding how Cacti works and being misleading by an snmp configuration problem.


Ok, let me just summarize here so this post can be useful for someone else...

Initially the problem I have was that I couldn't see the partitions of the device I wanted to monitor. I fixed this by adding includeAllDisks into my snmpd.conf (and restarting snmpd) if this doesn't work just try adding disk / (as per http://forums.cacti.net/post-84501.html )

After doing that, the data query was able to query for the partitions on the device.

Now to add the "ucd/net - Available Disk Space":

1 - Go to Console > Device > Select the Device you want to monitor.
2 - make sure that in "Associated Data Queries" you have "ucd/net - Get Monitored Partitions" and that the "Verbose Query" gives you the list of partitions. If you don't get the list of partitions here it's more likely there is something wrong with your snmp configuration (check http://forums.cacti.net/post-84501.html)
3 - On the top click on "Create Graph for this host"
4 - You should see two sections "Graph Templates" and "Data Query [ucd/net - Get Monitored Partitions]". on the Data Query you should see a list of all your partitions, just select the ones you want to monitor and click "create"

that's it, enjoy your graphs.
cronejp
Posts: 3
Joined: Wed Oct 21, 2009 2:49 pm
Location: Ottawa, ON. Canada

Thanks for taking the time to put the answer, saved me time!

Post by cronejp »

just a quick thanks for taking the time to put your results of figuring it out: saved me a lot of time... Not nearly enough of us on here remember after figuring something out, to come back and put in the final answer (i'm guilty of it :-( )

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest