Problems with created data query

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

Moderators: Developers, Moderators

Post Reply
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Problems with created data query

Post by ispavailability »

Hi all,

I've created a data query to get the Disk Inodes from a server trough snmp.
I've created the Data query XML file, the data template and graph template.
When adding the data query to the host i get all the nice data out of it:

Code: Select all

+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/opt/cacti/resource/snmp_queries/host_diskinodes.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.9.1.1' Index Count: 13
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.1' value: '1'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.2' value: '2'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.3' value: '3'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.4' value: '4'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.5' value: '5'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.6' value: '6'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.7' value: '7'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.8' value: '8'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.9' value: '9'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.10' value: '10'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.11' value: '11'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.12' value: '12'
+ Index found at OID: '1.3.6.1.4.1.2021.9.1.1.13' value: '13'
+ Located input field 'hrDiskInodeIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.9.1.1'
+ Found item [hrDiskInodeIndex='1'] index: 1 [from value]
+ Found item [hrDiskInodeIndex='2'] index: 2 [from value]
+ Found item [hrDiskInodeIndex='3'] index: 3 [from value]
+ Found item [hrDiskInodeIndex='4'] index: 4 [from value]
+ Found item [hrDiskInodeIndex='5'] index: 5 [from value]
+ Found item [hrDiskInodeIndex='6'] index: 6 [from value]
+ Found item [hrDiskInodeIndex='7'] index: 7 [from value]
+ Found item [hrDiskInodeIndex='8'] index: 8 [from value]
+ Found item [hrDiskInodeIndex='9'] index: 9 [from value]
+ Found item [hrDiskInodeIndex='10'] index: 10 [from value]
+ Found item [hrDiskInodeIndex='11'] index: 11 [from value]
+ Found item [hrDiskInodeIndex='12'] index: 12 [from value]
+ Found item [hrDiskInodeIndex='13'] index: 13 [from value]
+ Located input field 'hrDiskInodeDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.9.1.2'
+ Found item [hrDiskInodeDescr='/'] index: 1 [from value]
+ Found item [hrDiskInodeDescr='/lib/init/rw'] index: 2 [from value]
+ Found item [hrDiskInodeDescr='/proc'] index: 3 [from value]
+ Found item [hrDiskInodeDescr='/sys'] index: 4 [from value]
+ Found item [hrDiskInodeDescr='/dev'] index: 5 [from value]
+ Found item [hrDiskInodeDescr='/dev/shm'] index: 6 [from value]
+ Found item [hrDiskInodeDescr='/dev/pts'] index: 7 [from value]
+ Found item [hrDiskInodeDescr='/opt'] index: 8 [from value]
+ Found item [hrDiskInodeDescr='/tmp'] index: 9 [from value]
+ Found item [hrDiskInodeDescr='/usr'] index: 10 [from value]
+ Found item [hrDiskInodeDescr='/var'] index: 11 [from value]
+ Found item [hrDiskInodeDescr='/opt/cacti'] index: 12 [from value]
+ Found item [hrDiskInodeDescr='/var/lib/mysql'] index: 13 [from value]
So that all looks good.

When going to "Create graphs for this host" I can create all the graphs and they will get the correct naming.
But... the graphs are not being shown ( even after a while waiting )
So been checking it out further, and it seems that the RRD files aren't being created.
After doing some debugging with Spine even on verbose level 10 it seems that the Data sources are not being processed at all.

Already been looking trough http://docs.cacti.net/manual:087:4_help ... #debugging but still no luck in finding out what's going on :-(
I hope someone can help me.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems with created data query

Post by gandalf »

It seems to me (at least when the output posted is complete), that there are no <direction>output</direction> elements in the data query XML. Please post that file for debugging
R.
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

gandalf wrote:It seems to me (at least when the output posted is complete), that there are no <direction>output</direction> elements in the data query XML. Please post that file for debugging
R.
Out of my head im pretty sure i got the output part in it also.
But i'll post the xml file when im in the office in a couple hours.

Thanks in advance :-)
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

This is the xml file:

Code: Select all

<interface>
        <name>Get Disk Inodes Information</name>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.2021.9.1.1</oid_index>

        <fields>
                <hrDiskInodeIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.9.1.1</oid>
                </hrDiskInodeIndex>
                <hrDiskInodeDescr>
                        <name>Description</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.9.1.2</oid>
                </hrDiskInodeDescr>
                <hrDiskInodeUsed>
                        <name>Percentage of Inodes used</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2021.9.1.10</oid>
                </hrDiskInodeUsed>
        </fields>
</interface>
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

Some extra info ( see attachments )
Attachments
Graph template
Graph template
Screenshot-Console -> Graph Templates .png (153.45 KiB) Viewed 2236 times
Data template
Data template
Screenshot-Console -> Data Templates.png (157.64 KiB) Viewed 2236 times
Data query
Data query
Screenshot-Console -> Data Queries -> (Edit) -> Associated Graph Templates.png (58.31 KiB) Viewed 2236 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems with created data query

Post by gandalf »

It works for me. I'm using your snmp_query XML file.
Find templates and stuff attached
R.
Attachments
cacti087i_data_query_disk_inodes.xml
Data Query XML exported from Cacti 087i
(13.6 KiB) Downloaded 211 times
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

gandalf wrote:It works for me. I'm using your snmp_query XML file.
Find templates and stuff attached
R.
Okay, that's strange :-)
I will test it out firday when at work again.
btw, can i convert the file to the 0.8.7h version? ( need to upgrade to the i version but that will be done in the new year )

Thanks in advance for trying it out :-)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems with created data query

Post by gandalf »

No, you can't convert the XML
R.
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

gandalf wrote:No, you can't convert the XML
R.
I mean the exported xml file you did. because if i remember correctly the HASH value is different between the H and I version?
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Problems with created data query

Post by noname »

Replaced hash code for 087g:
cacti087g_data_query_disk_inodes.xml
hash_xx0023 to hash_xx0021
(13.6 KiB) Downloaded 170 times
Import Results:
Image

But I've never tested that.
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

noname wrote:Replaced hash code for 087g:
cacti087g_data_query_disk_inodes.xml
Import Results:
Image

But I've never tested that.
Thanks.
I'll give it a try on friday when im back in the office.
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

It works as expected. thank you very much :-)

Would it be usefull to put this all under the http://docs.cacti.net/scripts or http://docs.cacti.net/templates part so i can share it with other people?

cheers.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems with created data query

Post by gandalf »

The latter link is the recommended. And yes, we do appreciate those contributions
R.
ispavailability
Posts: 25
Joined: Sun Nov 20, 2011 8:45 pm

Re: Problems with created data query

Post by ispavailability »

gandalf wrote:The latter link is the recommended. And yes, we do appreciate those contributions
R.
Thanks, i will post it on there as soon as i can :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests