spine breaks on an indexed snmp query while cmd.php is fine

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

Moderators: Developers, Moderators

Post Reply
svet
Posts: 6
Joined: Mon Nov 08, 2010 7:34 pm

spine breaks on an indexed snmp query while cmd.php is fine

Post by svet »

Hi
i've created a new snmp data query, that has two references in the index:

snmpwalk ---- 1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2
SNMPv2-SMI::enterprises.10923.1.1.1.1.7.1.11.1.2.26.5 = STRING: "PCRF-gy"
SNMPv2-SMI::enterprises.10923.1.1.1.1.7.1.11.1.2.31.1 = STRING: "Apollo-OCS"
.....
so the index is 26.5, or 31.1, etc...

here's the data query xml (incomplete):

Code: Select all

<interface>
        <name>CC-AS Statistics</name>
        <description>listing the service-based charging (FBC) CC-AS statistics for each APN.</description>   
        <oid_index>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid_index>
        <oid_index_parse>OID/REGEXP:^.{37}(.*)</oid_index_parse>
        <index_order>ccasIndex</index_order>
        <index_order_type>alphabetic</index_order_type>

        <fields>
                <ccasIndex>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </ccasIndex>
                <ccasName>
                        <name>CC AS Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid>
                </ccasName>
                <apnName>
                        <name>APN Name</name>
                        <method>walk</method>
                        <source>OID/REGEXP:^.{38}(.*)\.[0-9]{1,3}$</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid>
                </apnName>
                <ccasStartReq>
                        <name>Start Requests</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.3</oid>
                </ccasStartReq>
......

the query looks fine in verbose mode in the host view,
data source looks ok too, with the index values populated,
graphs are created - but the rrd file does not exist.

if i switch back to the cmd.php poller, the rdd gets created and updates fine.
switching back to spine - the rrd is no longer updated....

running spine from command line for the host yields (incomplete):
02/02/2011 05:05:29 PM - SPINE: Poller[0] Host[25] TH[1] RECACHE: Processing 13 items in the auto reindex cache for '10.32.10.9'
No log handling enabled - turning on stderr logging
snmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failure02/02/2011 05:05:29 PM - SPINE: Poller[0] Host[25] TH[1] NOTE: There are '555' Polling Items for this Host
02/02/2011 05:05:29 PM - SPINE: Poller[0] Host[25] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function

graphs for other hosts dont suffer with spine - so this is not an across the board issue with snmp

cmd.php show same errors, but it doesn't seen to affect it:
# php -q /var/www/cacti/cmd.php 25 25
No log handling enabled - turning on stderr logging
snmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failure


it seems like there is something spine doesn't like about that indexed query in particular, that cmd.php copes with...
this is the only multi index data query i have, so maybe the regexps aren't right?

i tried the debugging walk through, cache clearing, etc...

both spine and cacti are patched and running 0.8.7.g
SNMP Version NET-SNMP version: 5.3.2.2

thank you in advance for your help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: spine breaks on an indexed snmp query while cmd.php is f

Post by gandalf »

Code: Select all

<oid_index_parse>OID/REGEXP:^.{37}(.*)</oid_index_parse>
Instead of counting chars, I'd place the numeric OID in there.
R.
svet
Posts: 6
Joined: Mon Nov 08, 2010 7:34 pm

Re: spine breaks on an indexed snmp query while cmd.php is f

Post by svet »

Hi, thanks for taking a look.

it still doesn't work, please see post bellow:
Last edited by svet on Thu Feb 10, 2011 8:18 am, edited 1 time in total.
svet
Posts: 6
Joined: Mon Nov 08, 2010 7:34 pm

Re: spine breaks on an indexed snmp query while cmd.php is f

Post by svet »

this still isn't working.....
really confused...

so this is the data xml now:

Code: Select all

<interface>
        <name>CC-AS Statistics</name>
        <description>listing the service-based charging (FBC) CC-AS statistics for each APN.</description>
        <oid_index>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid_index>
        <oid_index_parse>OID/REGEXP:^[.]*1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.(.*)</oid_index_parse>
        <index_order>ccasIndex</index_order>
        <index_order_type>alphabetic</index_order_type>

        <fields>
                <ccasIndex>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </ccasIndex>
                <ccasName>
                        <name>CC AS Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid>
                </ccasName>
                <apnName>
                        <name>APN Name</name>
                        <method>walk</method>
                        <source>OID/REGEXP:^[.]*1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.(.*)\.[0-9]{1,3}$</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2</oid>
                </apnName>
....
                <ccasUserUnknown>
                        <name>User Unknown</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.10</oid>
                </ccasUserUnknown>
        </fields>
</interface>
verbose query looks fine:
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/ggsnCcas.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.26.5' value: 'P-gy'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.31.1' value: 'A-OCS'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.32.3' value: 'A-OCS-EMM_DAS'
...
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.26.5' results: '26.5'
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.31.1' results: '31.1'
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.32.3' results: '32.3'
...
+ Inserting index data for field 'ccasIndex' [value='26.5']
+ Inserting index data for field 'ccasIndex' [value='31.1']
+ Inserting index data for field 'ccasIndex' [value='32.3']
...
+ Located input field 'ccasName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Found item [ccasName='P-gy'] index: 26.5 [from value]
+ Found item [ccasName='A-OCS'] index: 31.1 [from value]
+ Found item [ccasName='A-OCS-EMM_DAS'] index: 32.3 [from value]
...
+ Located input field 'apnName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Found item [apnName='26'] index: 26.5 [from regexp oid parse]
+ Found item [apnName='31'] index: 31.1 [from regexp oid parse]
+ Found item [apnName='32'] index: 32.3 [from regexp oid parse]
...
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/ggsnCcas.xml'


graph is created ok, and the data source looks fine with the correct index....

HOWEVER - if spine is the poller the rrd file doesn not get created...
cmd. php creates the rrd file and collects the data, but running either one from comand line, yields:

02/09/2011 05:47:33 PM - SPINE: Poller[0] Host[40] TH[1] RECACHE: Processing 149 items in the auto reindex cache for '10.x.x.x'
No log handling enabled - turning on stderr logging
snmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failure02/09/2011 05:47:35 PM - SPINE: Poller[0] Host[40] TH[1] NOTE: There are '8' Polling Items for this Host
02/09/2011 05:47:35 PM - SPINE: Poller[0] Host[40] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function

or

php -q /var/www/cacti/cmd.php 40 40
No log handling enabled - turning on stderr logging
snmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failuresnmp_build: unknown failure

while cmd is polling, data is collected.
if i turn spine on - no more collection

unless i change the data query by modifyng the xml so it includes the leading . in the index:
Running data query [11].
Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/ggsnCcas.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.26.5' value: 'P-gy'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.31.1' value: 'A-OCS'
+ Index found at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.32.3' value: 'A-OCS-EMM_DAS'
...
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.26.5' results: '.26.5'
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.31.1' results: '.31.1'
+ index_parse at OID: '1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2.32.3' results: '.32.3'
...
+ Inserting index data for field 'ccasIndex' [value='.26.5']
+ Inserting index data for field 'ccasIndex' [value='.31.1']
+ Inserting index data for field 'ccasIndex' [value='.32.3']
...
+ Located input field 'ccasName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Found item [ccasName='P-gy'] index: .26.5 [from value]
+ Found item [ccasName='A-OCS'] index: .31.1 [from value]
+ Found item [ccasName='A-OCS-EMM_DAS'] index: .32.3 [from value]
...
+ Located input field 'apnName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.2'
+ Found item [apnName='.26'] index: .26.5 [from regexp oid parse]
+ Found item [apnName='.31'] index: .31.1 [from regexp oid parse]
+ Found item [apnName='.32'] index: .32.3 [from regexp oid parse]
...

now spine is happy:
02/09/2011 06:08:54 PM - SPINE: Poller[0] Host[40] TH[1] NOTE: There are '8' Polling Items for this Host

02/09/2011 06:08:54 PM - SPINE: Poller[0] Host[40] TH[1] DS[8562] SNMP: v2: x.x.x.x, dsname: snmp_oid, oid: .1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.10.33.2, value: 0
02/09/2011 06:08:54 PM - SPINE: Poller[0] Host[40] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
02/09/2011 06:08:54 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
02/09/2011 06:08:54 PM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete

but newly created graphs dont work as the index value starts with a '.'

02/09/2011 06:15:22 PM - SPINE: Poller[0] Host[40] TH[1] DS[8562] SNMP: v2: x.x.x.x, dsname: snmp_oid, oid: .1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.10.33.2, value: 0
02/09/2011 06:15:22 PM - SPINE: Poller[0] Host[40] TH[1] DS[8563] SNMP: v2: x.x.x.x, dsname: snmp_oid, oid: .1.3.6.1.4.1.10923.1.1.1.1.7.1.11.1.10..33.2, value: U

what is the official possition on the leading . when index values are parsed out of the oid with regular expressions?
why doesn't spine work on what seems to be correct data queries, while cmd.php does?

please help, any assistance greately appreciated
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests