SNMP - Get Mounted Partitions

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

Moderators: Developers, Moderators

Post Reply
ntanalysis
Posts: 13
Joined: Sun Jan 27, 2008 4:10 pm

SNMP - Get Mounted Partitions

Post by ntanalysis »

how can I find and add a templeta for SNMP - Get Mounted Partitions?
cacti version is 0.8.6i
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

what do you mean? it comes with cacti. should be in the associated data templates for a device.
ntanalysis
Posts: 13
Joined: Sun Jan 27, 2008 4:10 pm

SNMP - Get Mounted Partitions

Post by ntanalysis »

dear
i got this message when I Create Graphs for this Host:

Data Query [SNMP - Get Mounted Partitions]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

and when i run data query in debug mode I get this message

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_disk.php r5-h1.go.com.jo 96 1:161:500:sjogsl:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_disk.php r5-h1.go.com.jo 96 1:161:500:sjogsl:::MD5::[None] query index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_disk.php r5-h1.go.com.jo 96 1:161:500:sjogsl:::MD5::[None] query description'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_disk.php r5-h1.go.com.jo 96 1:161:500:sjogsl:::MD5::[None] query sau'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_disk.xml'

Best Regards
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

what operating system runs on the target server ?
[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]
ntanalysis
Posts: 13
Joined: Sun Jan 27, 2008 4:10 pm

Post by ntanalysis »

it is a redhat as 4
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Post an snmpwalk of .1.3.6.1.2.1.25.2.3.1
ntanalysis
Posts: 13
Joined: Sun Jan 27, 2008 4:10 pm

Post by ntanalysis »

community Unknown Object Identifier (Sub-id not found: (top) -> community
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Well there you go. the device doesn't support disk information.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Looks like you might have taken you old resource and scripts folders and overwrote the newer versions when upgrading. For this template, you must maintain the "newer" versions.

Then, repopulate your poller cache.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Moving to Unix/Linux.

Can you try with this minimalistic snmpd.conf

Code: Select all

rocommunity public
disk /
and then use the "ucd/net SNMP" host template ?
[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]
hedenberg
Posts: 4
Joined: Wed Mar 12, 2008 5:23 am
Location: Sweden
Contact:

Post by hedenberg »

I got the same problem. Opened it up on the servers with the fix, so I can now walk with the following command (even from remote)

snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9

giving the result:
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/sda1
UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 100000
UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 18880388
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 16547776
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 1373536
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 8
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 2
UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 0
UCD-SNMP-MIB::dskErrorMsg.1 = STRING:


however, I still get the "Success [0 Items, 0 Rows]" from it in cacti. Perhaps I have messed something up while experimenting.

Using data query: "SNMP - Get Mounted Partitions"
This data query is set to "Get Script Server Data (Indexed)" and the script: "<path_cacti>/resource/script_server/host_disk.xml"

Could use some help in solving this :/
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

the "dsk*" OIDs are meant to be used by the "ucd/net - Get Monitored Partitions" data query, which is part of the "ucd/net SNMP Host" host template.
[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]
hedenberg
Posts: 4
Joined: Wed Mar 12, 2008 5:23 am
Location: Sweden
Contact:

Post by hedenberg »

Ok.

Switched to ucd/net - Get Monitored Partitions

Thats configured as : "Get Script Server Data (Indexed)"
To: <path_cacti>/resource/snmp_queries/net-snmp_disk.xml

Is that correct?
hedenberg
Posts: 4
Joined: Wed Mar 12, 2008 5:23 am
Location: Sweden
Contact:

Post by hedenberg »

Ah, managed to get it working after trying some more. Had changed a couple of settings. Thanks.
hedenberg
Posts: 4
Joined: Wed Mar 12, 2008 5:23 am
Location: Sweden
Contact:

Post by hedenberg »

It might still be problems here...

ucd/net - Get Monitored Partitions - Success [3 Items, 1 Row]

Verbose query result:

+ 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'
+ 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/sda1'] 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'

This shows that stuff is working - but it's not the information I want.

I want the disk space on the partition.

Like ucd/net - Hard Drive Space, but I cant find a way to get that working.

I go to create new graphs, select this server, and ucd/net - Get Monitored Paritions

the / partition is then showed, with its partition name. I select it and clicks create.

On the Graphs page however, it only shows an empty graph, even after some time.

Is there anything else I need to do? You got the snmtwalk text in the previous post, and with the result above it seems that he could get the data, just that he doesn't traverse enough to index it. Help :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests