BGP Data Query, very easy to use

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Author
Message
m.arteta
Posts: 5
Joined: Fri Mar 26, 2010 4:17 am

Re: BGP Data Query, very easy to use

#16 Post by m.arteta » Wed Dec 22, 2010 6:28 am

scottevil wrote:When you do a verbose query for the data query under the device, you should see something like this. I just did this on clean install of 0.8.7e, so it should work in 0.8.7g also. I tested on both version a few months back when I reposted this and it should still work ;-) If you don't see data coming back from your router then you might have an snmp version problem or a community string mismatch. When in those situations, I usually use tcpdump to sniff the traffic.
The attachment bgp.png is no longer available
Thank for the reply.
For testing, I installed an version 0.8.7e.
Attached, the Import Templates, I have no duplication with the version of mcutting.

Debug data-query:

1) Generic - eBGP/iBGP Monitor (Verbose Query) Uptime Goes Backwards Success [10 Items, 10 Rows]

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/data/www/cacti-int/cacti-0.8.7e/resource/snmp_queries/ebgp_ibgp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.15.3.1.5'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5XXXXXXXX' value: '0.0.0.0'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.XXXXXXXX' value: 'XXXXXXXXXXXX'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.XXXXXXXX' value: 'XXXXXXXX'
....
....
+ Located input field 'bgpIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.15.3.1.5'
+ Found item [bgpIndex='0.0.0.0'] index:XXXXXXXXX [from value]
+ Found item [bgpIndex='3XXXXX'] index:XXXXXXXXX [from value]
+ Found item [bgpIndex='XXXXXX'] index: XXXXXXXXX [from value]




12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecached:0')"
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT COUNT(*) FROM poller_command"
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:1.1120 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0')"
12/22/2010 11:50:01 AM - SYSTEM STATS: Time:1.1120 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) "
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
12/22/2010 11:50:00 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 0 AND host_id <= 2)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 0 AND host_id <= 2)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 0 AND host_id <= 2 AND rrd_next_step <= 0)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT * FROM poller_item WHERE (host_id >= 0 AND host_id <= 2 AND rrd_next_step <= 0) ORDER by host_id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 0 AND id <= 2) ORDER by id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('date',NOW())"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT local_data_id, rrd_name FROM poller_output"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "TRUNCATE TABLE poller_time"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('path_webroot','/data/www/cacti-int/cacti-0.8.7e')"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT id FROM host WHERE disabled = '' ORDER BY id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('poller_lastrun',1293015000)"
12/22/2010 11:50:00 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT host_id, COUNT(*) AS data_sources FROM poller_item WHERE rrd_next_step<=0 GROUP BY host_id ORDER BY host_id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT COUNT(*) FROM poller_item WHERE rrd_next_step<=0"
Attachments
cacti5.png
cacti5.png (38.43 KiB) Viewed 4777 times
cacti4.png
cacti4.png (27.48 KiB) Viewed 4777 times
cacti3_version_scottevil.png
cacti3_version_scottevil.png (23.73 KiB) Viewed 4777 times
cacti2.png
cacti2.png (24.87 KiB) Viewed 4777 times
cacti_version_scottevil.png
cacti_version_scottevil.png (28.92 KiB) Viewed 4777 times

scottevil
Posts: 24
Joined: Tue Nov 28, 2006 6:44 am
Location: Akron
Contact:

Re: BGP Data Query, very easy to use

#17 Post by scottevil » Wed Dec 22, 2010 10:05 am

m.arteta wrote:
scottevil wrote:When you do a verbose query for the data query under the device, you should see something like this. I just did this on clean install of 0.8.7e, so it should work in 0.8.7g also. I tested on both version a few months back when I reposted this and it should still work ;-) If you don't see data coming back from your router then you might have an snmp version problem or a community string mismatch. When in those situations, I usually use tcpdump to sniff the traffic.
bgp.png
Thank for the reply.
For testing, I installed an version 0.8.7e.
Attached, the Import Templates, I have no duplication with the version of mcutting.

Debug data-query:

1) Generic - eBGP/iBGP Monitor (Verbose Query) Uptime Goes Backwards Success [10 Items, 10 Rows]

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/data/www/cacti-int/cacti-0.8.7e/resource/snmp_queries/ebgp_ibgp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.15.3.1.5'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5XXXXXXXX' value: '0.0.0.0'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.XXXXXXXX' value: 'XXXXXXXXXXXX'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.XXXXXXXX' value: 'XXXXXXXX'
....
....
+ Located input field 'bgpIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.15.3.1.5'
+ Found item [bgpIndex='0.0.0.0'] index:XXXXXXXXX [from value]
+ Found item [bgpIndex='3XXXXX'] index:XXXXXXXXX [from value]
+ Found item [bgpIndex='XXXXXX'] index: XXXXXXXXX [from value]




12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecached:0')"
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT COUNT(*) FROM poller_command"
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:1.1120 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0')"
12/22/2010 11:50:01 AM - SYSTEM STATS: Time:1.1120 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) "
12/22/2010 11:50:01 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
12/22/2010 11:50:00 AM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 0 AND host_id <= 2)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 0 AND host_id <= 2)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 0 AND host_id <= 2 AND rrd_next_step <= 0)"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT * FROM poller_item WHERE (host_id >= 0 AND host_id <= 2 AND rrd_next_step <= 0) ORDER by host_id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 0 AND id <= 2) ORDER by id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('date',NOW())"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT local_data_id, rrd_name FROM poller_output"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "TRUNCATE TABLE poller_time"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('path_webroot','/data/www/cacti-int/cacti-0.8.7e')"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT id FROM host WHERE disabled = '' ORDER BY id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO settings (name,value) VALUES ('poller_lastrun',1293015000)"
12/22/2010 11:50:00 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT host_id, COUNT(*) AS data_sources FROM poller_item WHERE rrd_next_step<=0 GROUP BY host_id ORDER BY host_id"
12/22/2010 11:50:00 AM - CMDPHP: Poller[0] DEVEL: SQL Cell: "SELECT COUNT(*) FROM poller_item WHERE rrd_next_step<=0"

Did you type those XXXXXXXXXXXX in the data query above? If you didn't then your router must use a different OID than mine. To test your router run a command similar to the following.

Code: Select all

 snmpwalk -Os -c public -v 1 router.example.com .1.3.6.1.2.1.15.3.1.2
This will at least tell you if your router supports this. Is it a Cisco Router? If so, what kind?
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com

m.arteta
Posts: 5
Joined: Fri Mar 26, 2010 4:17 am

Re: BGP Data Query, very easy to use

#18 Post by m.arteta » Wed Dec 22, 2010 11:49 am

Did you type those XXXXXXXXXXXX in the data query above? If you didn't then your router must use a different OID than mine. To test your router run a command similar to the following.

Code: Select all

 snmpwalk -Os -c public -v 1 router.example.com .1.3.6.1.2.1.15.3.1.2
This will at least tell you if your router supports this. Is it a Cisco Router? If so, what kind?
Yes, a cisco 6500.

[[email protected]]# snmpwalk -v2c -XXXX 212.XXXXXXXX .1.3.6.1.2.1.15.3.1.2
SNMPv2-SMI::mib-2.15.3.1.2.32.1.XX.96 = INTEGER: 1
SNMPv2-SMI::mib-2.15.3.1.2.32.1.XX.0 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.42.0.XX.152 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.1 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.2 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.6 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.8 = INTEGER: 6
....
....

I do not think it comes from the SNMP request, but most of the template or data-source.


Guillaume.

scottevil
Posts: 24
Joined: Tue Nov 28, 2006 6:44 am
Location: Akron
Contact:

Re: BGP Data Query, very easy to use

#19 Post by scottevil » Wed Dec 22, 2010 12:29 pm

m.arteta wrote:
Did you type those XXXXXXXXXXXX in the data query above? If you didn't then your router must use a different OID than mine. To test your router run a command similar to the following.

Code: Select all

 snmpwalk -Os -c public -v 1 router.example.com .1.3.6.1.2.1.15.3.1.2
This will at least tell you if your router supports this. Is it a Cisco Router? If so, what kind?
Yes, a cisco 6500.

[[email protected]]# snmpwalk -v2c -XXXX 212.XXXXXXXX .1.3.6.1.2.1.15.3.1.2
SNMPv2-SMI::mib-2.15.3.1.2.32.1.XX.96 = INTEGER: 1
SNMPv2-SMI::mib-2.15.3.1.2.32.1.XX.0 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.42.0.XX.152 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.1 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.2 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.6 = INTEGER: 6
SNMPv2-SMI::mib-2.15.3.1.2.62.35.XX.8 = INTEGER: 6
....
....

I do not think it comes from the SNMP request, but most of the template or data-source.


Guillaume.
Next, check permissions on the rrd files because they won't be able to read/write if they are wrong? I am not sure other than that because my default cacti install works. I can show you my script if that helps.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com

m.arteta
Posts: 5
Joined: Fri Mar 26, 2010 4:17 am

Re: BGP Data Query, very easy to use

#20 Post by m.arteta » Thu Dec 23, 2010 9:35 am

scottevil wrote:Next, check permissions on the rrd files because they won't be able to read/write if they are wrong? I am not sure other than that because my default cacti install works. I can show you my script if that helps.
Hello,
Rra folder is 777 for the test.
I just tested on a version 0.8.7g, same result, no problem with importing files mcutting, but no creation of data-sources, Can you tell me if the debug of the data-source is the same at home:

/usr/local/bin/rrdtool create \
/data/www/cacti-int/cacti-0.8.7g/rra/test_sent_15.rrd \
--step 300 \
DS:sent:COUNTER:600:0:1000000 \
DS:prefixes:GAUGE:600:0:1000000 \
DS:received:COUNTER:600:0:2000000 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \


12/23/2010 03:30:01 PM - SYSTEM STATS: Time:1.1114 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
12/23/2010 03:25:02 PM - SYSTEM STATS: Time:1.1114 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0

m.arteta
Posts: 5
Joined: Fri Mar 26, 2010 4:17 am

Re: BGP Data Query, very easy to use

#21 Post by m.arteta » Fri Dec 24, 2010 5:36 am

I have advanced.

Reading this topic:
=> http://forums.cacti.net/about30924.html

I added it to the file ebgp_ibgp.xml:

Code: Select all

<query>
        <name>eBGP/iBGP Monitor</name>
        <description>Queries a host for a list of BGP neighbors</description>
        <oid_index>.1.3.6.1.2.1.15.3.1.5</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)$</oid_index_parse>

        <fields>
                <bgpIndex>
                        <name>bgpIndex</name>
                        <method>walk</method>
++                       <source>OID/REGEXP:.*\.([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)$</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.2.1.15.3.1.5</oid>
                </bgpIndex>
                <bgpPrefixes>
                        <name>prefixes</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.9.9.187.1.2.4.1.1</oid>
                        <oid_suffix>1.1</oid_suffix>
                </bgpPrefixes>
                <bgpRX>
                        <name>received</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.2.1.15.3.1.12</oid>
                </bgpRX>
                <bgpTX>
                        <name>sent</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.2.1.15.3.1.13</oid>
                </bgpTX>
                <bgpTXX>
                        <name>txx</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.2.1.15.3.1.13</oid>
                </bgpTXX>
        </fields>
</query>
Log spine:

12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] NOTE: There are '9' Polling Items for this Host
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[9] SNMP: v2: 212.XXXXXXXXX, dsname: prefixes, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.100.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[9] SNMP: v2: 212.XXXXXXXXXX, dsname: received, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.100.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[8] SNMP: v2: 212.XXXXXXXXX, dsname: sent, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.10.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[8] SNMP: v2: 212.XXXXXXXXX, dsname: prefixes, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.10.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[8] SNMP: v2: 212.XXXXXXXXX, dsname: received, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.10.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[9] SNMP: v2: 212.XXXXXXXXX, dsname: sent, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.100.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[10] SNMP: v2: 212.XXXXXXXXX, dsname: received, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.62.36.254.102.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[10] SNMP: v2: 212.XXXXXXXXX, dsname: prefixes, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.102.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Host[2] TH[1] DS[10] SNMP: v2: 212.XXXXXXXXX, dsname: sent, oid: 1.3.6.1.4.1.9.9.187.1.2.4.1.1.61.36.254.102.1.1, value: U
12/24/2010 11:15:01 AM - SPINE: Poller[0] Time: 0.3876 s, Threads: 1, Hosts: 2
12/24/2010 11:15:02 AM - SYSTEM STATS: Time:1.2969 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:3


I tested on multiple devices, I do not oid 1.3.6.1.4.1.9.9.187.1.2.4.1.1 (http://tools.cisco.com/Support/SNMP/do/ ... edPrefixes) , but others oids (bgpRX, bgpTX) are ok, cacti but only queries (DSNAME: prefixes / DSNAME: RECEIVED / DSNAME: feels) as oid 1.3.6.1.4.1.9.9.187.1.2.4.1.1 ?

scottevil
Posts: 24
Joined: Tue Nov 28, 2006 6:44 am
Location: Akron
Contact:

Re: BGP Data Query, very easy to use

#22 Post by scottevil » Tue Jan 04, 2011 5:04 pm

Could someone confirm that this is working for them now?
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#23 Post by bkbristlin » Fri Jan 28, 2011 6:31 pm

I have gone through this a few times and can't seem to get it to work. I can confirm the same error as the previous guy.

RRDTool Command:

D:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="NE_LNK_OFF_7606 - eBGP/iBGP Monitor |query_bgpIndex|" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Thousands of Prefixes" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="D\:/Apache2/htdocs/cacti/rra/5/701.rrd":prefixes:AVERAGE \
DEF:b="D\:/Apache2/htdocs/cacti/rra/5/701.rrd":received:AVERAGE \
DEF:c="D\:/Apache2/htdocs/cacti/rra/5/701.rrd":sent:AVERAGE \
CDEF:cdefa=a,1024,/ \
CDEF:cdefe=b,300,* \
CDEF:cdefi=c,300,* \
LINE1:cdefa#0C5ECEFF:"Prefixes\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefe#FF4C4CFF:"Msg Rx\:" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
LINE1:cdefi#B84CB8FF:"Msg Tx\:" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Max\:%8.2lf %s\n" RRDTool Says:

ERROR: opening 'D:/Apache2/htdocs/cacti/rra/5/701.rrd': No such file or directory


I went to the rra dirctory on the server. Sure enough in folder 5 there is no 701.rrd. What would keep it from making this? The permissions looked the same as they did for everything else but I don't know what they should be.
Brian
CCNA, MCDST, MCP, A+

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#24 Post by bkbristlin » Fri Jan 28, 2011 7:02 pm

Ok I figured out what was going on. Not sure what it has to do with creating the graph but it does work now. You have to edit the value field of the ebgp_ibgp.xml file.

- <interface>
<name>eBGP/iBGP Monitor</name>
<description>Queries a host for a list of BGP neighbors</description>
<oid_index>.1.3.6.1.2.1.15.3.1.5</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)$</oid_index_parse>
- <fields>
- <bgpIndex>
<name>bgpIndex</name>
<method>walk</method>
<source>OID/REGEXP:.*\.([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)$</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.15.3.1.5</oid>
</bgpIndex>
- <bgpPrefixes>
<name>prefixes</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.4.1.9.9.187.1.2.4.1.1</oid>
<oid_suffix>1.1</oid_suffix>
</bgpPrefixes>
- <bgpRX>
<name>received</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.15.3.1.12</oid>
</bgpRX>
- <bgpTX>
<name>sent</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.15.3.1.13</oid>
</bgpTX>
- <bgpTXX>
<name>txx</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.15.3.1.13</oid>
</bgpTXX>
</fields>
</interface>

The line above in bold needs to be changed from value to what it is. It is taken from the value above.
Brian
CCNA, MCDST, MCP, A+

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#25 Post by bkbristlin » Mon Jan 31, 2011 10:29 am

So some more on this...If you change that line in my previous post the graph creates as I staed. However it never pulls any data. I'm going to look into this today.
Brian
CCNA, MCDST, MCP, A+

scottevil
Posts: 24
Joined: Tue Nov 28, 2006 6:44 am
Location: Akron
Contact:

Re: BGP Data Query, very easy to use

#26 Post by scottevil » Mon Jan 31, 2011 10:41 am

Yes, I can confirm this, I just tested the patch and it isn't pulling any data. The template "as is" (committed version) works for me on two different Cisco 2851 routers. I am wondering what is different about your set up?

Gracias
Scott M
bkbristlin wrote:So some more on this...If you change that line in my previous post the graph creates as I staed. However it never pulls any data. I'm going to look into this today.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#27 Post by bkbristlin » Mon Jan 31, 2011 11:00 am

The only thing custom I have done is modify the XML files in question. They are back to original now. We have an issue with our VMware server over the weekend so I lost 5 days of data. So I am starting over on my BGP graphs now. So I have all the templates re-imported and the file in the snmp queries folder. RRD says it can't create the graph again. Wondering if there is something that is different on my routers. The one I am testing with is a 7606S, everything else is 7000 or 12000 series.
Brian
CCNA, MCDST, MCP, A+

scottevil
Posts: 24
Joined: Tue Nov 28, 2006 6:44 am
Location: Akron
Contact:

Re: BGP Data Query, very easy to use

#28 Post by scottevil » Mon Jan 31, 2011 11:16 am

bkbristlin wrote:The only thing custom I have done is modify the XML files in question. They are back to original now. We have an issue with our VMware server over the weekend so I lost 5 days of data. So I am starting over on my BGP graphs now. So I have all the templates re-imported and the file in the snmp queries folder. RRD says it can't create the graph again. Wondering if there is something that is different on my routers. The one I am testing with is a 7606S, everything else is 7000 or 12000 series.
I wish I had that hardware to test with. I have heard that the 7000/12000 serious can still be emulated with GNS3, is there anything else/better out there?
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#29 Post by bkbristlin » Mon Jan 31, 2011 11:38 am

There's dynamips and dynagen I think. I don't use sims much, usually hear about GNS3 when I do hear of one.

I have also noticed something else. If I modify that file as I posted earlier and add the data query to a device Cacti comes to a crawl. If I add or remove it withouth the mod Cacit has no issues. My whole deal with this...I used another BGP one that worked fine. It didn't do prefixes though. So I'm not sure what the difference is but I assume that since the other worked that the snmp part of BGP on my router is good.
Brian
CCNA, MCDST, MCP, A+

User avatar
bkbristlin
Cacti User
Posts: 79
Joined: Fri Jan 14, 2011 3:28 pm
Location: Lincoln, NE

Re: BGP Data Query, very easy to use

#30 Post by bkbristlin » Mon Jan 31, 2011 3:43 pm

bkbristlin wrote:I have also noticed something else. If I modify that file as I posted earlier and add the data query to a device Cacti comes to a crawl. If I add or remove it withouth the mod Cacit has no issues. My whole deal with this...I used another BGP one that worked fine. It didn't do prefixes though. So I'm not sure what the difference is but I assume that since the other worked that the snmp part of BGP on my router is good.
Reaqlized why the crawl. I was manipulating the OID and not the source. Better now. I'm back to where I was Friday. Graph will create just no data. All the values in the graph show "-1.#J". Still working on it but I can't seem to find out why. BGP is setup for snmp, everything seems right.
Brian
CCNA, MCDST, MCP, A+

Post Reply