Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[HOWTO] From snmptable to Graphs (Data Query walkthrough)
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Mon Feb 27, 2006 5:33 am    Post subject: Reply with quote

For the image "graph_image.php.png"
Please click on it and select one of the wrenches to see the full "rrdtool graph" statement and post this.
For the Data Template issues: Please remember, that NONE of the changes of a Data Template will have effect for already created rrds. And the DEBUG shows only the create statements, cacti will use when generating a new rrd. If you want to know how the ACTUAL rrd is defined, you will have to use "rrdtool info" instead.
Reinhard
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Mon Feb 27, 2006 12:57 pm    Post subject: something's not right about this Reply with quote

These numbers are way wrong:

Code:

CACTID: Host[1] DS[178] SNMP: v2: red.paulbeard.org, dsname: Load_15min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.1, value: 3811363840
CACTID: Host[1] DS[178] SNMP: v2: red.paulbeard.org, dsname: Load_5min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.1, value: 3811363840
CACTID: Host[1] DS[178] SNMP: v2: red.paulbeard.org, dsname: Load_1min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.1, value: 3811363840
CACTID: Host[1] DS[179] SNMP: v2: red.paulbeard.org, dsname: Load_1min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.2, value: 2506841088
CACTID: Host[1] DS[179] SNMP: v2: red.paulbeard.org, dsname: Load_5min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.2, value: 2506841088
CACTID: Host[1] DS[179] SNMP: v2: red.paulbeard.org, dsname: Load_15min, oid: .1.3.6.1.4.1.2021.13.15.1.1.3.2, value: 2506841088
CACTID: Host[1] DS[175] SNMP: v2: red.paulbeard.org, dsname: diskIOReads, oid: .1.3.6.1.4.1.2021.13.15.1.1.5.1, value: 12798961
CACTID: Host[1] DS[180] SNMP: v2: red.paulbeard.org, dsname: diskIOReads, oid: .1.3.6.1.4.1.2021.13.15.1.1.5.2, value: 11097029
CACTID: Host[1] DS[175] SNMP: v2: red.paulbeard.org, dsname: diskIOWrites, oid: .1.3.6.1.4.1.2021.13.15.1.1.6.1, value: 10243703
CACTID: Host[1] DS[180] SNMP: v2: red.paulbeard.org, dsname: diskIOWrites, oid: .1.3.6.1.4.1.2021.13.15.1.1.6.2, value: 19375562


First of the OIDs are wrong. As you can see, they don't change even though the data source changes. No sure what's up with that.

The OID for Load_15min is .1.3.6.1.4.1.2021.13.15.1.1.11.x where x is the index value of the spindle. And that's what the xml file has, as well.

Code:
        <diskIOLA1>
            <name>Load Average (1 min)</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.9</oid>
        </diskIOLA1>
        <diskIOLA5>
            <name>Load Average (5 min)</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.10</oid>
        </diskIOLA5>
        <diskIOLA15>
            <name>Load Average (15 min)</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.11</oid>
        </diskIOLA15>

I suppose I can re-import the xml file. is there something else I should be looking into?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Mon Feb 27, 2006 2:33 pm    Post subject: Reply with quote

Please remember to reload the poller cache (there's a nice script out there) or use Clear Poller Cache which in fact reloads the poller cache. You may have a look at the cache to verify, that current XML OIDs are used
Reinhard
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Tue Feb 28, 2006 12:22 am    Post subject: Success! Reply with quote

Finally, I got this to work. alas, some of the data isn't useful (the reads/writes are evidently since boot time, so it's just a slope: I was hoping for transactions per second or something).

But load average per spindle is working.

http://www.paulbeard.org/cacti/graph_160.html
http://www.paulbeard.org/cacti/graph_161.html

Now to see if I can export these and use them somewhere else. Sadly, I think my options are limited: last I looked Linux didn't support these values.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Wed Mar 01, 2006 1:40 pm    Post subject: Re: Success! Reply with quote

paulbeard206 wrote:
Finally, I got this to work. alas, some of the data isn't useful (the reads/writes are evidently since boot time, so it's just a slope: I was hoping for transactions per second or something).

But load average per spindle is working.

http://www.paulbeard.org/cacti/graph_160.html
http://www.paulbeard.org/cacti/graph_161.html

Now to see if I can export these and use them somewhere else. Sadly, I think my options are limited: last I looked Linux didn't support these values.
Fine, but what solved the issue?
For the slope: simply change ds-type from GAUGE to COUNTER and you should be done. You need to change this for the Data Template. All existing rrds would need some rrdtool tune --data-source-type <ds-name>:<ds-type> to reflect this
Reinhard
Back to top
JJX
Cacti User


Joined: 06 Oct 2005
Posts: 171

PostPosted: Thu Mar 02, 2006 5:20 am    Post subject: Reply with quote

When i try to load the xml of the example ("Chapter I: Building raw XML file") i get these errors:

Quote:

Notice: Undefined index: arg_index in /var/www/cacti/lib/data_query.php on line 98

Notice: Undefined index: script_path in /var/www/cacti/lib/data_query.php on line 98

Notice: Undefined index: arg_query in /var/www/cacti/lib/data_query.php on line 109

Notice: Undefined index: query_name in /var/www/cacti/lib/data_query.php on line 109

Notice: Undefined index: script_path in /var/www/cacti/lib/data_query.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/lib/data_query.php:9 in /var/www/cacti/host.php on line 129



any idea?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Thu Mar 02, 2006 12:44 pm    Post subject: Reply with quote

And your interface XML template are fine?
Reinhard
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Thu Mar 02, 2006 12:57 pm    Post subject: related question? Reply with quote

I whacked some rrd files w/o thinking of the consequences and can't recreate the data sources. How can I clear that up so I can redo those graphs for disk reads/writes?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Thu Mar 02, 2006 2:31 pm    Post subject: Re: related question? Reply with quote

paulbeard206 wrote:
I whacked some rrd files w/o thinking of the consequences and can't recreate the data sources. How can I clear that up so I can redo those graphs for disk reads/writes?
Perhaps lack of my understanding of english language, but what exactly is broken? The rrd files or the Data Template? What is left? Any backups in place?
Reinhard
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Thu Mar 02, 2006 3:13 pm    Post subject: not sure how good my english is Reply with quote

Heh. What I meant to say was I removed the RRD files and now I can't re-create the graphs: the data sources are shown as already in use. How can I clean that up?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Thu Mar 02, 2006 3:20 pm    Post subject: Reply with quote

As all data is gone, please remove the according Graphs from Graph Management and recreate from the Devices by Create Graphs for this Host
Reinhard
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Thu Mar 02, 2006 3:58 pm    Post subject: can't do that Reply with quote

lvm wrote:
As all data is gone, please remove the according Graphs from Graph Management and recreate from the Devices by Create Graphs for this Host
Reinhard


The data items I want to graphs are greyed out, as though they are already being graphed.
Back to top
nahun
Cacti User


Joined: 15 Feb 2006
Posts: 92
Location: Idaho

PostPosted: Thu Mar 02, 2006 9:49 pm    Post subject: Re: can't do that Reply with quote

paulbeard206 wrote:
lvm wrote:
As all data is gone, please remove the according Graphs from Graph Management and recreate from the Devices by Create Graphs for this Host
Reinhard


The data items I want to graphs are greyed out, as though they are already being graphed.


I think you need to delete the data sources then try to create the graphs again.
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Thu Mar 02, 2006 9:53 pm    Post subject: been there, done that Reply with quote

<strike>I have done that. It appears I'll have to do something in the database: I just don't know what.</strike>

Looks like this is OK now. I just recreated the graphs after find thme *not* greyed out.
Back to top
paulbeard206
Cacti User


Joined: 30 Jul 2005
Posts: 106

PostPosted: Thu Mar 02, 2006 10:44 pm    Post subject: still finding some mismatched data Reply with quote

These OIDs should be .1.3.6.1.4.1.2021.13.15.1.1.5.x and .1.3.6.1.4.1.2021.13.15.1.1.6.x.

Quote:
Data Source: Reads/Writes for ad1
RRD: /usr/local/share/cacti/rra/red_diskiowrites_188.rrd
Action: 0, OID: .1.3.6.1.4.1.2021.13.15.1.1.3.2 (Host: red.paulbeard.org, Community: paulbeard.org)
Data Source: Reads/Writes for ad1
RRD: /usr/local/share/cacti/rra/red_diskiowrites_188.rrd
Action: 0, OID: .1.3.6.1.4.1.2021.13.15.1.1.3.2 (Host: red.paulbeard.org, Community: paulbeard.org)
Data Source: Reads/Writes for ad0
RRD: /usr/local/share/cacti/rra/red_diskiowrites_187.rrd
Action: 0, OID: .1.3.6.1.4.1.2021.13.15.1.1.3.1 (Host: red.paulbeard.org, Community: paulbeard.org)
Data Source: Reads/Writes for ad0
RRD: /usr/local/share/cacti/rra/red_diskiowrites_187.rrd
Action: 0, OID: .1.3.6.1.4.1.2021.13.15.1.1.3.1 (Host: red.paulbeard.org, Community: paulbeard.org)



Code:

        <diskIONRead>
            <name>Read (Bytes)</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.3</oid>
        </diskIONRead>
        <diskIONWritten>
            <name>Written (Bytes)</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.4</oid>
        </diskIONWritten>
        <diskIOReads>
            <name>Reads</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.5</oid>
        </diskIOReads>
        <diskIOWrites>
            <name>Writes</name>
            <method>walk</method>
            <source>value</source>
            <direction>output</direction>
            <oid>.1.3.6.1.4.1.2021.13.15.1.1.6</oid>
        </diskIOWrites>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group