Poller cache missing information after data template change

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
AdrianBan
Posts: 4
Joined: Wed Feb 05, 2014 8:46 am

Poller cache missing information after data template change

Post by AdrianBan »

Hi,

I got a big problem with my Cacti 0.8.8b installed on a Debian Sid.

The problem appear after I changed few things in template in the Interface Statistics : Interface - (64-bit) Traffic
This is a additional template based on standard Interface - Traffic

After this change all graphs have NaN value and poller cache is missing the information for those Data Sources.

What I found after a deep debugging in the libs/utility.php:

On line which function update_poller_cache is querying the $outputs array:


if (strlen($field["output_type"])) {
$output_type_sql = "and snmp_query_graph_rrd.snmp_query_graph_id=" . $cnn_id->qstr($field["output_type"
]);
}else{
$output_type_sql = "";
}

$outputs = db_fetch_assoc("select
snmp_query_graph_rrd.snmp_field_name,
data_template_rrd.id as data_template_rrd_id
from (snmp_query_graph_rrd,data_template_rrd)
where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id
$output_type_sql
and snmp_query_graph_rrd.data_template_id=" . $data_input["data_template_id"] . "
and data_template_rrd.local_data_id=$local_data_id
order by data_template_rrd.id");

I found this:

Code: Select all

mysql> select * from snmp_query_graph_rrd where snmp_field_name like "ifHC%Octets";
+---------------------+------------------+----------------------+-----------------+
| snmp_query_graph_id | data_template_id | data_template_rrd_id | snmp_field_name |
+---------------------+------------------+----------------------+-----------------+
|                   9 |               41 |                   55 | ifHCOutOctets   |
|                   9 |               41 |                   54 | ifHCInOctets    |
|                  14 |               49 |                   98 | ifHCInOctets    |
|                  49 |               49 |                   99 | ifHCOutOctets   |
|                  49 |               49 |                   98 | ifHCInOctets    |
|                  14 |               49 |                   99 | ifHCOutOctets   |
+---------------------+------------------+----------------------+-----------------+
6 rows in set (0.00 sec)
And this:

Code: Select all

mysql> select snmp_query_graph_rrd.snmp_field_name, snmp_query_graph_rrd.snmp_query_graph_id, data_template_rrd.id as data_template_rrd_id, data_template_rrd.local_data_id FROM (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id=9;
+-----------------+---------------------+----------------------+---------------+
| snmp_field_name | snmp_query_graph_id | data_template_rrd_id | local_data_id |
+-----------------+---------------------+----------------------+---------------+
| ifHCInOctets    |                   9 |                 3644 |          1349 |
| ifHCInOctets    |                   9 |                 3743 |          1404 |
| ifHCInOctets    |                   9 |                 4050 |          1541 |
| ifHCInOctets    |                   9 |                 3926 |          1488 |
| ifHCInOctets    |                   9 |                 3924 |          1487 |
| ifHCInOctets    |                   9 |                 3217 |          1200 |
| ifHCInOctets    |                   9 |                 3219 |          1201 |
| ifHCInOctets    |                   9 |                 3221 |          1202 |
| ifHCInOctets    |                   9 |                 3223 |          1203 |
| ifHCInOctets    |                   9 |                 3225 |          1204 |
| ifHCInOctets    |                   9 |                 3227 |          1205 |
| ifHCInOctets    |                   9 |                 3229 |          1206 |
| ifHCInOctets    |                   9 |                 3231 |          1207 |
| ifHCInOctets    |                   9 |                 3233 |          1208 |
| ifHCInOctets    |                   9 |                 3235 |          1209 |
| ifHCInOctets    |                   9 |                 3237 |          1210 |
| ifHCInOctets    |                   9 |                 3239 |          1211 |
| ifHCInOctets    |                   9 |                 3077 |          1154 |
| ifHCInOctets    |                   9 |                 3075 |          1153 |
| ifHCInOctets    |                   9 |                 4550 |          1750 |
| ifHCInOctets    |                   9 |                 4552 |          1751 |
| ifHCInOctets    |                   9 |                 4554 |          1752 |
| ifHCInOctets    |                   9 |                 4850 |          1889 |
| ifHCInOctets    |                   9 |                 4210 |          1602 |
| ifHCInOctets    |                   9 |                 4221 |          1606 |
| ifHCInOctets    |                   9 |                 4223 |          1607 |
| ifHCInOctets    |                   9 |                 4119 |          1568 |
| ifHCInOctets    |                   9 |                 4121 |          1569 |
| ifHCInOctets    |                   9 |                 3862 |          1468 |
| ifHCInOctets    |                   9 |                 3860 |          1467 |
| ifHCInOctets    |                   9 |                 3858 |          1466 |
| ifHCInOctets    |                   9 |                 3856 |          1465 |
| ifHCInOctets    |                   9 |                 4198 |          1596 |
| ifHCInOctets    |                   9 |                 4200 |          1597 |
| ifHCInOctets    |                   9 |                 3852 |          1463 |
| ifHCInOctets    |                   9 |                 3854 |          1464 |
| ifHCInOctets    |                   9 |                 4446 |          1683 |
| ifHCInOctets    |                   9 |                 3725 |          1395 |
| ifHCInOctets    |                   9 |                 3727 |          1396 |
| ifHCInOctets    |                   9 |                 3729 |          1397 |
| ifHCInOctets    |                   9 |                 3754 |          1408 |
| ifHCInOctets    |                   9 |                 2375 |           839 |
| ifHCInOctets    |                   9 |                 2373 |           838 |
| ifHCInOctets    |                   9 |                 2367 |           835 |
| ifHCInOctets    |                   9 |                 2369 |           836 |
| ifHCInOctets    |                   9 |                 2371 |           837 |
| ifHCInOctets    |                   9 |                 3864 |          1469 |
| ifHCInOctets    |                   9 |                 3866 |          1470 |
| ifHCInOctets    |                   9 |                 4548 |          1749 |
| ifHCInOctets    |                   9 |                 4546 |          1748 |
| ifHCInOctets    |                   9 |                 3956 |          1500 |
| ifHCInOctets    |                   9 |                 3952 |          1498 |
| ifHCInOctets    |                   9 |                 3954 |          1499 |
| ifHCInOctets    |                   9 |                 3950 |          1497 |
| ifHCInOctets    |                   9 |                 2377 |           840 |
| ifHCInOctets    |                   9 |                 2379 |           841 |
| ifHCInOctets    |                   9 |                 2381 |           842 |
| ifHCInOctets    |                   9 |                 2383 |           843 |
| ifHCInOctets    |                   9 |                 3774 |          1418 |
| ifHCInOctets    |                   9 |                 3772 |          1417 |
| ifHCInOctets    |                   9 |                 3348 |          1249 |
| ifHCInOctets    |                   9 |                 3346 |          1248 |
| ifHCInOctets    |                   9 |                 3344 |          1247 |
| ifHCInOctets    |                   9 |                 3342 |          1246 |
| ifHCInOctets    |                   9 |                 3340 |          1245 |
| ifHCInOctets    |                   9 |                 3338 |          1244 |
| ifHCInOctets    |                   9 |                 3336 |          1243 |
| ifHCInOctets    |                   9 |                 3334 |          1242 |
| ifHCInOctets    |                   9 |                 3332 |          1241 |
| ifHCInOctets    |                   9 |                 3330 |          1240 |
| ifHCInOctets    |                   9 |                 3328 |          1239 |
| ifHCInOctets    |                   9 |                 3326 |          1238 |
| ifHCInOctets    |                   9 |                 3324 |          1237 |
| ifHCInOctets    |                   9 |                 3322 |          1236 |
| ifHCInOctets    |                   9 |                 3320 |          1235 |
| ifHCInOctets    |                   9 |                 3318 |          1234 |
| ifHCInOctets    |                   9 |                 3316 |          1233 |
| ifHCInOctets    |                   9 |                 3314 |          1232 |
| ifHCInOctets    |                   9 |                 3312 |          1231 |
| ifHCInOctets    |                   9 |                 3310 |          1230 |
| ifHCInOctets    |                   9 |                 3308 |          1229 |
| ifHCInOctets    |                   9 |                 3306 |          1228 |
| ifHCInOctets    |                   9 |                 3304 |          1227 |
| ifHCInOctets    |                   9 |                 3298 |          1224 |
| ifHCInOctets    |                   9 |                 3300 |          1225 |
| ifHCInOctets    |                   9 |                 3302 |          1226 |
| ifHCInOctets    |                   9 |                 4163 |          1580 |
| ifHCInOctets    |                   9 |                 4154 |          1577 |
| ifHCInOctets    |                   9 |                 5673 |          2245 |
| ifHCInOctets    |                   9 |                 4058 |          1545 |
| ifHCInOctets    |                   9 |                 4060 |          1546 |
| ifHCInOctets    |                   9 |                 3073 |          1152 |
| ifHCInOctets    |                   9 |                 2448 |           862 |
| ifHCInOctets    |                   9 |                 3621 |          1333 |
| ifHCInOctets    |                   9 |                 3532 |          1302 |
| ifHCInOctets    |                   9 |                 5669 |          2243 |
| ifHCInOctets    |                   9 |                 4056 |          1544 |
| ifHCInOctets    |                   9 |                 4054 |          1543 |
| ifHCInOctets    |                   9 |                 3071 |          1151 |
| ifHCInOctets    |                   9 |                 3069 |          1150 |
| ifHCInOctets    |                   9 |                 3067 |          1149 |
| ifHCInOctets    |                   9 |                 3065 |          1148 |
| ifHCInOctets    |                   9 |                 3063 |          1147 |
| ifHCInOctets    |                   9 |                 3061 |          1146 |
| ifHCInOctets    |                   9 |                 3059 |          1145 |
| ifHCInOctets    |                   9 |                 3057 |          1144 |
| ifHCInOctets    |                   9 |                 3055 |          1143 |
| ifHCInOctets    |                   9 |                 3053 |          1142 |
| ifHCInOctets    |                   9 |                 3051 |          1141 |
| ifHCInOctets    |                   9 |                 3049 |          1140 |
| ifHCInOctets    |                   9 |                 3047 |          1139 |
| ifHCInOctets    |                   9 |                 2824 |          1053 |
| ifHCInOctets    |                   9 |                 2826 |          1054 |
| ifHCInOctets    |                   9 |                 2828 |          1055 |
| ifHCInOctets    |                   9 |                 2830 |          1056 |
| ifHCInOctets    |                   9 |                 2832 |          1057 |
| ifHCInOctets    |                   9 |                 2834 |          1058 |
| ifHCInOctets    |                   9 |                 2878 |          1071 |
| ifHCInOctets    |                   9 |                 2880 |          1072 |
| ifHCInOctets    |                   9 |                 2890 |          1077 |
| ifHCInOctets    |                   9 |                 2892 |          1078 |
| ifHCInOctets    |                   9 |                 2894 |          1079 |
| ifHCInOctets    |                   9 |                 2896 |          1080 |
| ifHCInOctets    |                   9 |                 2898 |          1081 |
| ifHCInOctets    |                   9 |                 2935 |          1092 |
| ifHCInOctets    |                   9 |                 4560 |          1755 |
| ifHCInOctets    |                   9 |                 2939 |          1094 |
| ifHCInOctets    |                   9 |                 2941 |          1095 |
| ifHCInOctets    |                   9 |                 2943 |          1096 |
| ifHCInOctets    |                   9 |                 2945 |          1097 |
| ifHCInOctets    |                   9 |                 4848 |          1888 |
| ifHCInOctets    |                   9 |                 4558 |          1754 |
| ifHCInOctets    |                   9 |                 3003 |          1117 |
| ifHCInOctets    |                   9 |                 3005 |          1118 |
| ifHCInOctets    |                   9 |                 3007 |          1119 |
| ifHCInOctets    |                   9 |                 3009 |          1120 |
| ifHCInOctets    |                   9 |                 3011 |          1121 |
| ifHCInOctets    |                   9 |                 3013 |          1122 |
| ifHCInOctets    |                   9 |                 3015 |          1123 |
| ifHCInOctets    |                   9 |                 4556 |          1753 |
| ifHCInOctets    |                   9 |                 3033 |          1132 |
| ifHCInOctets    |                   9 |                 3035 |          1133 |
| ifHCInOctets    |                   9 |                 3037 |          1134 |
| ifHCInOctets    |                   9 |                 3043 |          1137 |
| ifHCInOctets    |                   9 |                 3045 |          1138 |
| ifHCInOctets    |                   9 |                 3778 |          1420 |
| ifHCInOctets    |                   9 |                 3776 |          1419 |
| ifHCInOctets    |                   9 |                 3766 |          1414 |
| ifHCInOctets    |                   9 |                 3764 |          1413 |
| ifHCInOctets    |                   9 |                 3617 |          1331 |
| ifHCInOctets    |                   9 |                 3619 |          1332 |
| ifHCInOctets    |                   9 |                 4307 |          1643 |
| ifHCInOctets    |                   9 |                 4316 |          1646 |
| ifHCInOctets    |                   9 |                 4318 |          1647 |
| ifHCInOctets    |                   9 |                 4320 |          1648 |
| ifHCInOctets    |                   9 |                 4322 |          1649 |
| ifHCInOctets    |                   9 |                 4324 |          1650 |
| ifHCInOctets    |                   9 |                 4326 |          1651 |
| ifHCInOctets    |                   9 |                 4328 |          1652 |
| ifHCInOctets    |                   9 |                 4448 |          1684 |
| ifHCInOctets    |                   9 |                 4468 |          1691 |
| ifHCInOctets    |                   9 |                 4502 |          1717 |
| ifHCInOctets    |                   9 |                 4504 |          1718 |
| ifHCInOctets    |                   9 |                 4562 |          1756 |
| ifHCInOctets    |                   9 |                 4564 |          1757 |
| ifHCInOctets    |                   9 |                 4566 |          1758 |
| ifHCInOctets    |                   9 |                 4613 |          1781 |
| ifHCInOctets    |                   9 |                 4622 |          1784 |
| ifHCInOctets    |                   9 |                 4626 |          1786 |
| ifHCInOctets    |                   9 |                 4635 |          1789 |
| ifHCInOctets    |                   9 |                 4642 |          1791 |
| ifHCInOctets    |                   9 |                 4644 |          1792 |
| ifHCInOctets    |                   9 |                 4646 |          1793 |
| ifHCInOctets    |                   9 |                 4648 |          1794 |
| ifHCInOctets    |                   9 |                 4650 |          1795 |
| ifHCInOctets    |                   9 |                 4652 |          1796 |
| ifHCInOctets    |                   9 |                 4654 |          1797 |
| ifHCInOctets    |                   9 |                 4656 |          1798 |
| ifHCInOctets    |                   9 |                 5137 |          2015 |
| ifHCInOctets    |                   9 |                 5634 |          2230 |
| ifHCInOctets    |                   9 |                 5120 |          2008 |
| ifHCInOctets    |                   9 |                 4718 |          1817 |
| ifHCInOctets    |                   9 |                 4720 |          1818 |
| ifHCInOctets    |                   9 |                 4743 |          1839 |
| ifHCInOctets    |                   9 |                 4788 |          1867 |
| ifHCInOctets    |                   9 |                 4802 |          1871 |
| ifHCInOctets    |                   9 |                 4811 |          1874 |
| ifHCInOctets    |                   9 |                 4813 |          1875 |
| ifHCInOctets    |                   9 |                 4831 |          1881 |
| ifHCInOctets    |                   9 |                 4856 |          1892 |
| ifHCInOctets    |                   9 |                 4858 |          1893 |
| ifHCInOctets    |                   9 |                 4884 |          1900 |
| ifHCInOctets    |                   9 |                 4886 |          1901 |
| ifHCInOctets    |                   9 |                 4888 |          1902 |
| ifHCInOctets    |                   9 |                 4901 |          1907 |
| ifHCInOctets    |                   9 |                 4905 |          1909 |
| ifHCInOctets    |                   9 |                 4934 |          1932 |
| ifHCInOctets    |                   9 |                 4936 |          1933 |
| ifHCInOctets    |                   9 |                 4938 |          1934 |
| ifHCInOctets    |                   9 |                 4940 |          1935 |
| ifHCInOctets    |                   9 |                 4942 |          1936 |
| ifHCInOctets    |                   9 |                 4989 |          1952 |
| ifHCInOctets    |                   9 |                 4998 |          1955 |
| ifHCInOctets    |                   9 |                 5002 |          1957 |
| ifHCInOctets    |                   9 |                 5056 |          1978 |
| ifHCInOctets    |                   9 |                 5072 |          1986 |
| ifHCInOctets    |                   9 |                 5070 |          1985 |
| ifHCInOctets    |                   9 |                 5102 |          2002 |
| ifHCInOctets    |                   9 |                 5118 |          2007 |
| ifHCInOctets    |                   9 |                 5047 |          1975 |
| ifHCInOctets    |                   9 |                 5671 |          2244 |
| ifHCInOctets    |                   9 |                 5148 |          2019 |
| ifHCInOctets    |                   9 |                 5157 |          2022 |
| ifHCInOctets    |                   9 |                 5159 |          2023 |
| ifHCInOctets    |                   9 |                 5161 |          2024 |
| ifHCInOctets    |                   9 |                 5163 |          2025 |
| ifHCInOctets    |                   9 |                 5165 |          2026 |
| ifHCInOctets    |                   9 |                 5182 |          2033 |
| ifHCInOctets    |                   9 |                 5191 |          2036 |
| ifHCInOctets    |                   9 |                 5193 |          2037 |
| ifHCInOctets    |                   9 |                 5195 |          2038 |
| ifHCInOctets    |                   9 |                 5204 |          2041 |
| ifHCInOctets    |                   9 |                 5206 |          2042 |
| ifHCInOctets    |                   9 |                 5208 |          2043 |
| ifHCInOctets    |                   9 |                 5210 |          2044 |
| ifHCInOctets    |                   9 |                 5212 |          2045 |
| ifHCInOctets    |                   9 |                 5214 |          2046 |
| ifHCInOctets    |                   9 |                 5223 |          2049 |
| ifHCInOctets    |                   9 |                 5238 |          2055 |
| ifHCInOctets    |                   9 |                 5242 |          2057 |
| ifHCInOctets    |                   9 |                 5265 |          2067 |
| ifHCInOctets    |                   9 |                 5267 |          2068 |
| ifHCInOctets    |                   9 |                 5271 |          2070 |
| ifHCInOctets    |                   9 |                 5282 |          2074 |
| ifHCInOctets    |                   9 |                 5293 |          2078 |
| ifHCInOctets    |                   9 |                 5295 |          2079 |
| ifHCInOctets    |                   9 |                 5297 |          2080 |
| ifHCInOctets    |                   9 |                 5326 |          2090 |
| ifHCInOctets    |                   9 |                 5337 |          2094 |
| ifHCInOctets    |                   9 |                 5339 |          2095 |
| ifHCInOctets    |                   9 |                 5341 |          2096 |
| ifHCInOctets    |                   9 |                 5343 |          2097 |
| ifHCInOctets    |                   9 |                 5345 |          2098 |
| ifHCInOctets    |                   9 |                 5347 |          2099 |
| ifHCInOctets    |                   9 |                 5349 |          2100 |
| ifHCInOctets    |                   9 |                 5351 |          2101 |
| ifHCInOctets    |                   9 |                 5353 |          2102 |
| ifHCInOctets    |                   9 |                 5355 |          2103 |
| ifHCInOctets    |                   9 |                 5385 |          2117 |
| ifHCInOctets    |                   9 |                 5494 |          2173 |
| ifHCInOctets    |                   9 |                 5496 |          2174 |
| ifHCInOctets    |                   9 |                 5498 |          2175 |
| ifHCInOctets    |                   9 |                 5500 |          2176 |
| ifHCInOctets    |                   9 |                 5502 |          2177 |
| ifHCInOctets    |                   9 |                 5504 |          2178 |
| ifHCInOctets    |                   9 |                 5506 |          2179 |
| ifHCInOctets    |                   9 |                 5610 |          2215 |
| ifHCInOctets    |                   9 |                 5612 |          2216 |
| ifHCInOctets    |                   9 |                 5608 |          2214 |
| ifHCInOctets    |                   9 |                 5618 |          2219 |
| ifHCInOctets    |                   9 |                 5616 |          2218 |
| ifHCInOctets    |                   9 |                 5614 |          2217 |
| ifHCInOctets    |                   9 |                 5675 |          2246 |
| ifHCInOctets    |                   9 |                 5647 |          2235 |
| ifHCInOctets    |                   9 |                 5649 |          2236 |
| ifHCInOctets    |                   9 |                 5677 |          2247 |
| ifHCInOctets    |                   9 |                 5699 |          2258 |
| ifHCInOctets    |                   9 |                 5701 |          2259 |
| ifHCInOctets    |                   9 |                 5703 |          2260 |
| ifHCInOctets    |                   9 |                 5705 |          2261 |
| ifHCInOctets    |                   9 |                 5707 |          2262 |
| ifHCOutOctets   |                   9 |                 3533 |          1302 |
| ifHCOutOctets   |                   9 |                 3645 |          1349 |
| ifHCOutOctets   |                   9 |                 3744 |          1404 |
| ifHCOutOctets   |                   9 |                 4051 |          1541 |
| ifHCOutOctets   |                   9 |                 3927 |          1488 |
| ifHCOutOctets   |                   9 |                 3925 |          1487 |
| ifHCOutOctets   |                   9 |                 3218 |          1200 |
| ifHCOutOctets   |                   9 |                 3220 |          1201 |
| ifHCOutOctets   |                   9 |                 3222 |          1202 |
| ifHCOutOctets   |                   9 |                 3224 |          1203 |
| ifHCOutOctets   |                   9 |                 3226 |          1204 |
| ifHCOutOctets   |                   9 |                 3228 |          1205 |
| ifHCOutOctets   |                   9 |                 3230 |          1206 |
| ifHCOutOctets   |                   9 |                 3232 |          1207 |
| ifHCOutOctets   |                   9 |                 3234 |          1208 |
| ifHCOutOctets   |                   9 |                 3236 |          1209 |
| ifHCOutOctets   |                   9 |                 3238 |          1210 |
| ifHCOutOctets   |                   9 |                 3240 |          1211 |
| ifHCOutOctets   |                   9 |                 3078 |          1154 |
| ifHCOutOctets   |                   9 |                 3076 |          1153 |
| ifHCOutOctets   |                   9 |                 4551 |          1750 |
| ifHCOutOctets   |                   9 |                 4553 |          1751 |
| ifHCOutOctets   |                   9 |                 4224 |          1607 |
| ifHCOutOctets   |                   9 |                 4851 |          1889 |
| ifHCOutOctets   |                   9 |                 4211 |          1602 |
| ifHCOutOctets   |                   9 |                 4222 |          1606 |
| ifHCOutOctets   |                   9 |                 4120 |          1568 |
| ifHCOutOctets   |                   9 |                 4122 |          1569 |
| ifHCOutOctets   |                   9 |                 3863 |          1468 |
| ifHCOutOctets   |                   9 |                 3861 |          1467 |
| ifHCOutOctets   |                   9 |                 3859 |          1466 |
| ifHCOutOctets   |                   9 |                 3855 |          1464 |
| ifHCOutOctets   |                   9 |                 3857 |          1465 |
| ifHCOutOctets   |                   9 |                 4201 |          1597 |
| ifHCOutOctets   |                   9 |                 4199 |          1596 |
| ifHCOutOctets   |                   9 |                 3853 |          1463 |
| ifHCOutOctets   |                   9 |                 3726 |          1395 |
| ifHCOutOctets   |                   9 |                 3728 |          1396 |
| ifHCOutOctets   |                   9 |                 3730 |          1397 |
| ifHCOutOctets   |                   9 |                 3755 |          1408 |
| ifHCOutOctets   |                   9 |                 2374 |           838 |
| ifHCOutOctets   |                   9 |                 2372 |           837 |
| ifHCOutOctets   |                   9 |                 2368 |           835 |
| ifHCOutOctets   |                   9 |                 2370 |           836 |
| ifHCOutOctets   |                   9 |                 3865 |          1469 |
| ifHCOutOctets   |                   9 |                 3867 |          1470 |
| ifHCOutOctets   |                   9 |                 4549 |          1749 |
| ifHCOutOctets   |                   9 |                 4547 |          1748 |
| ifHCOutOctets   |                   9 |                 3953 |          1498 |
| ifHCOutOctets   |                   9 |                 3955 |          1499 |
| ifHCOutOctets   |                   9 |                 3951 |          1497 |
| ifHCOutOctets   |                   9 |                 2376 |           839 |
| ifHCOutOctets   |                   9 |                 2378 |           840 |
| ifHCOutOctets   |                   9 |                 2382 |           842 |
| ifHCOutOctets   |                   9 |                 2380 |           841 |
| ifHCOutOctets   |                   9 |                 2384 |           843 |
| ifHCOutOctets   |                   9 |                 3773 |          1417 |
| ifHCOutOctets   |                   9 |                 3767 |          1414 |
| ifHCOutOctets   |                   9 |                 4447 |          1683 |
| ifHCOutOctets   |                   9 |                 3349 |          1249 |
| ifHCOutOctets   |                   9 |                 3347 |          1248 |
| ifHCOutOctets   |                   9 |                 3345 |          1247 |
| ifHCOutOctets   |                   9 |                 3343 |          1246 |
| ifHCOutOctets   |                   9 |                 3341 |          1245 |
| ifHCOutOctets   |                   9 |                 3339 |          1244 |
| ifHCOutOctets   |                   9 |                 3337 |          1243 |
| ifHCOutOctets   |                   9 |                 3335 |          1242 |
| ifHCOutOctets   |                   9 |                 3333 |          1241 |
| ifHCOutOctets   |                   9 |                 3331 |          1240 |
| ifHCOutOctets   |                   9 |                 3329 |          1239 |
| ifHCOutOctets   |                   9 |                 3327 |          1238 |
| ifHCOutOctets   |                   9 |                 3325 |          1237 |
| ifHCOutOctets   |                   9 |                 3323 |          1236 |
| ifHCOutOctets   |                   9 |                 3321 |          1235 |
| ifHCOutOctets   |                   9 |                 3319 |          1234 |
| ifHCOutOctets   |                   9 |                 3317 |          1233 |
| ifHCOutOctets   |                   9 |                 3315 |          1232 |
| ifHCOutOctets   |                   9 |                 3313 |          1231 |
| ifHCOutOctets   |                   9 |                 3311 |          1230 |
| ifHCOutOctets   |                   9 |                 3309 |          1229 |
| ifHCOutOctets   |                   9 |                 3307 |          1228 |
| ifHCOutOctets   |                   9 |                 3305 |          1227 |
| ifHCOutOctets   |                   9 |                 3303 |          1226 |
| ifHCOutOctets   |                   9 |                 3299 |          1224 |
| ifHCOutOctets   |                   9 |                 3301 |          1225 |
| ifHCOutOctets   |                   9 |                 5670 |          2243 |
| ifHCOutOctets   |                   9 |                 4164 |          1580 |
| ifHCOutOctets   |                   9 |                 3957 |          1500 |
| ifHCOutOctets   |                   9 |                 4155 |          1577 |
| ifHCOutOctets   |                   9 |                 5672 |          2244 |
| ifHCOutOctets   |                   9 |                 4059 |          1545 |
| ifHCOutOctets   |                   9 |                 4061 |          1546 |
| ifHCOutOctets   |                   9 |                 3074 |          1152 |
| ifHCOutOctets   |                   9 |                 2449 |           862 |
| ifHCOutOctets   |                   9 |                 3622 |          1333 |
| ifHCOutOctets   |                   9 |                 4057 |          1544 |
| ifHCOutOctets   |                   9 |                 4055 |          1543 |
| ifHCOutOctets   |                   9 |                 3072 |          1151 |
| ifHCOutOctets   |                   9 |                 3070 |          1150 |
| ifHCOutOctets   |                   9 |                 3068 |          1149 |
| ifHCOutOctets   |                   9 |                 3066 |          1148 |
| ifHCOutOctets   |                   9 |                 3064 |          1147 |
| ifHCOutOctets   |                   9 |                 3062 |          1146 |
| ifHCOutOctets   |                   9 |                 3060 |          1145 |
| ifHCOutOctets   |                   9 |                 3058 |          1144 |
| ifHCOutOctets   |                   9 |                 3056 |          1143 |
| ifHCOutOctets   |                   9 |                 3054 |          1142 |
| ifHCOutOctets   |                   9 |                 3052 |          1141 |
| ifHCOutOctets   |                   9 |                 3050 |          1140 |
| ifHCOutOctets   |                   9 |                 3048 |          1139 |
| ifHCOutOctets   |                   9 |                 2825 |          1053 |
| ifHCOutOctets   |                   9 |                 2827 |          1054 |
| ifHCOutOctets   |                   9 |                 2829 |          1055 |
| ifHCOutOctets   |                   9 |                 2831 |          1056 |
| ifHCOutOctets   |                   9 |                 2833 |          1057 |
| ifHCOutOctets   |                   9 |                 2835 |          1058 |
| ifHCOutOctets   |                   9 |                 2879 |          1071 |
| ifHCOutOctets   |                   9 |                 2881 |          1072 |
| ifHCOutOctets   |                   9 |                 2891 |          1077 |
| ifHCOutOctets   |                   9 |                 2893 |          1078 |
| ifHCOutOctets   |                   9 |                 2895 |          1079 |
| ifHCOutOctets   |                   9 |                 2897 |          1080 |
| ifHCOutOctets   |                   9 |                 2899 |          1081 |
| ifHCOutOctets   |                   9 |                 2936 |          1092 |
| ifHCOutOctets   |                   9 |                 4559 |          1754 |
| ifHCOutOctets   |                   9 |                 2940 |          1094 |
| ifHCOutOctets   |                   9 |                 2942 |          1095 |
| ifHCOutOctets   |                   9 |                 2944 |          1096 |
| ifHCOutOctets   |                   9 |                 2946 |          1097 |
| ifHCOutOctets   |                   9 |                 4849 |          1888 |
| ifHCOutOctets   |                   9 |                 4557 |          1753 |
| ifHCOutOctets   |                   9 |                 3004 |          1117 |
| ifHCOutOctets   |                   9 |                 3006 |          1118 |
| ifHCOutOctets   |                   9 |                 3008 |          1119 |
| ifHCOutOctets   |                   9 |                 3010 |          1120 |
| ifHCOutOctets   |                   9 |                 3012 |          1121 |
| ifHCOutOctets   |                   9 |                 3014 |          1122 |
| ifHCOutOctets   |                   9 |                 3016 |          1123 |
| ifHCOutOctets   |                   9 |                 4555 |          1752 |
| ifHCOutOctets   |                   9 |                 3034 |          1132 |
| ifHCOutOctets   |                   9 |                 3036 |          1133 |
| ifHCOutOctets   |                   9 |                 3038 |          1134 |
| ifHCOutOctets   |                   9 |                 3044 |          1137 |
| ifHCOutOctets   |                   9 |                 3046 |          1138 |
| ifHCOutOctets   |                   9 |                 3779 |          1420 |
| ifHCOutOctets   |                   9 |                 3777 |          1419 |
| ifHCOutOctets   |                   9 |                 3775 |          1418 |
| ifHCOutOctets   |                   9 |                 3765 |          1413 |
| ifHCOutOctets   |                   9 |                 3618 |          1331 |
| ifHCOutOctets   |                   9 |                 3620 |          1332 |
| ifHCOutOctets   |                   9 |                 4308 |          1643 |
| ifHCOutOctets   |                   9 |                 4317 |          1646 |
| ifHCOutOctets   |                   9 |                 4319 |          1647 |
| ifHCOutOctets   |                   9 |                 4321 |          1648 |
| ifHCOutOctets   |                   9 |                 4323 |          1649 |
| ifHCOutOctets   |                   9 |                 4325 |          1650 |
| ifHCOutOctets   |                   9 |                 4327 |          1651 |
| ifHCOutOctets   |                   9 |                 4329 |          1652 |
| ifHCOutOctets   |                   9 |                 4449 |          1684 |
| ifHCOutOctets   |                   9 |                 4469 |          1691 |
| ifHCOutOctets   |                   9 |                 4503 |          1717 |
| ifHCOutOctets   |                   9 |                 4505 |          1718 |
| ifHCOutOctets   |                   9 |                 4561 |          1755 |
| ifHCOutOctets   |                   9 |                 4563 |          1756 |
| ifHCOutOctets   |                   9 |                 4565 |          1757 |
| ifHCOutOctets   |                   9 |                 4567 |          1758 |
| ifHCOutOctets   |                   9 |                 4614 |          1781 |
| ifHCOutOctets   |                   9 |                 4623 |          1784 |
| ifHCOutOctets   |                   9 |                 4627 |          1786 |
| ifHCOutOctets   |                   9 |                 4636 |          1789 |
| ifHCOutOctets   |                   9 |                 4643 |          1791 |
| ifHCOutOctets   |                   9 |                 4645 |          1792 |
| ifHCOutOctets   |                   9 |                 4647 |          1793 |
| ifHCOutOctets   |                   9 |                 4649 |          1794 |
| ifHCOutOctets   |                   9 |                 4651 |          1795 |
| ifHCOutOctets   |                   9 |                 4653 |          1796 |
| ifHCOutOctets   |                   9 |                 4655 |          1797 |
| ifHCOutOctets   |                   9 |                 4657 |          1798 |
| ifHCOutOctets   |                   9 |                 5138 |          2015 |
| ifHCOutOctets   |                   9 |                 5121 |          2008 |
| ifHCOutOctets   |                   9 |                 4719 |          1817 |
| ifHCOutOctets   |                   9 |                 4721 |          1818 |
| ifHCOutOctets   |                   9 |                 4744 |          1839 |
| ifHCOutOctets   |                   9 |                 4789 |          1867 |
| ifHCOutOctets   |                   9 |                 4803 |          1871 |
| ifHCOutOctets   |                   9 |                 4812 |          1874 |
| ifHCOutOctets   |                   9 |                 4814 |          1875 |
| ifHCOutOctets   |                   9 |                 4832 |          1881 |
| ifHCOutOctets   |                   9 |                 5674 |          2245 |
| ifHCOutOctets   |                   9 |                 4857 |          1892 |
| ifHCOutOctets   |                   9 |                 4859 |          1893 |
| ifHCOutOctets   |                   9 |                 4885 |          1900 |
| ifHCOutOctets   |                   9 |                 4887 |          1901 |
| ifHCOutOctets   |                   9 |                 4889 |          1902 |
| ifHCOutOctets   |                   9 |                 4902 |          1907 |
| ifHCOutOctets   |                   9 |                 4906 |          1909 |
| ifHCOutOctets   |                   9 |                 4935 |          1932 |
| ifHCOutOctets   |                   9 |                 4937 |          1933 |
| ifHCOutOctets   |                   9 |                 4939 |          1934 |
| ifHCOutOctets   |                   9 |                 4941 |          1935 |
| ifHCOutOctets   |                   9 |                 4943 |          1936 |
| ifHCOutOctets   |                   9 |                 4990 |          1952 |
| ifHCOutOctets   |                   9 |                 4999 |          1955 |
| ifHCOutOctets   |                   9 |                 5003 |          1957 |
| ifHCOutOctets   |                   9 |                 5057 |          1978 |
| ifHCOutOctets   |                   9 |                 5073 |          1986 |
| ifHCOutOctets   |                   9 |                 5071 |          1985 |
| ifHCOutOctets   |                   9 |                 5103 |          2002 |
| ifHCOutOctets   |                   9 |                 5119 |          2007 |
| ifHCOutOctets   |                   9 |                 5048 |          1975 |
| ifHCOutOctets   |                   9 |                 5149 |          2019 |
| ifHCOutOctets   |                   9 |                 5158 |          2022 |
| ifHCOutOctets   |                   9 |                 5160 |          2023 |
| ifHCOutOctets   |                   9 |                 5162 |          2024 |
| ifHCOutOctets   |                   9 |                 5164 |          2025 |
| ifHCOutOctets   |                   9 |                 5166 |          2026 |
| ifHCOutOctets   |                   9 |                 5183 |          2033 |
| ifHCOutOctets   |                   9 |                 5192 |          2036 |
| ifHCOutOctets   |                   9 |                 5194 |          2037 |
| ifHCOutOctets   |                   9 |                 5196 |          2038 |
| ifHCOutOctets   |                   9 |                 5205 |          2041 |
| ifHCOutOctets   |                   9 |                 5207 |          2042 |
| ifHCOutOctets   |                   9 |                 5209 |          2043 |
| ifHCOutOctets   |                   9 |                 5211 |          2044 |
| ifHCOutOctets   |                   9 |                 5213 |          2045 |
| ifHCOutOctets   |                   9 |                 5215 |          2046 |
| ifHCOutOctets   |                   9 |                 5224 |          2049 |
| ifHCOutOctets   |                   9 |                 5239 |          2055 |
| ifHCOutOctets   |                   9 |                 5243 |          2057 |
| ifHCOutOctets   |                   9 |                 5266 |          2067 |
| ifHCOutOctets   |                   9 |                 5268 |          2068 |
| ifHCOutOctets   |                   9 |                 5272 |          2070 |
| ifHCOutOctets   |                   9 |                 5283 |          2074 |
| ifHCOutOctets   |                   9 |                 5294 |          2078 |
| ifHCOutOctets   |                   9 |                 5296 |          2079 |
| ifHCOutOctets   |                   9 |                 5298 |          2080 |
| ifHCOutOctets   |                   9 |                 5327 |          2090 |
| ifHCOutOctets   |                   9 |                 5338 |          2094 |
| ifHCOutOctets   |                   9 |                 5340 |          2095 |
| ifHCOutOctets   |                   9 |                 5342 |          2096 |
| ifHCOutOctets   |                   9 |                 5344 |          2097 |
| ifHCOutOctets   |                   9 |                 5346 |          2098 |
| ifHCOutOctets   |                   9 |                 5348 |          2099 |
| ifHCOutOctets   |                   9 |                 5350 |          2100 |
| ifHCOutOctets   |                   9 |                 5352 |          2101 |
| ifHCOutOctets   |                   9 |                 5354 |          2102 |
| ifHCOutOctets   |                   9 |                 5356 |          2103 |
| ifHCOutOctets   |                   9 |                 5386 |          2117 |
| ifHCOutOctets   |                   9 |                 5495 |          2173 |
| ifHCOutOctets   |                   9 |                 5497 |          2174 |
| ifHCOutOctets   |                   9 |                 5499 |          2175 |
| ifHCOutOctets   |                   9 |                 5501 |          2176 |
| ifHCOutOctets   |                   9 |                 5503 |          2177 |
| ifHCOutOctets   |                   9 |                 5505 |          2178 |
| ifHCOutOctets   |                   9 |                 5507 |          2179 |
| ifHCOutOctets   |                   9 |                 5609 |          2214 |
| ifHCOutOctets   |                   9 |                 5611 |          2215 |
| ifHCOutOctets   |                   9 |                 5613 |          2216 |
| ifHCOutOctets   |                   9 |                 5619 |          2219 |
| ifHCOutOctets   |                   9 |                 5617 |          2218 |
| ifHCOutOctets   |                   9 |                 5615 |          2217 |
| ifHCOutOctets   |                   9 |                 5635 |          2230 |
| ifHCOutOctets   |                   9 |                 5676 |          2246 |
| ifHCOutOctets   |                   9 |                 5648 |          2235 |
| ifHCOutOctets   |                   9 |                 5650 |          2236 |
| ifHCOutOctets   |                   9 |                 5678 |          2247 |
| ifHCOutOctets   |                   9 |                 5700 |          2258 |
| ifHCOutOctets   |                   9 |                 5702 |          2259 |
| ifHCOutOctets   |                   9 |                 5704 |          2260 |
| ifHCOutOctets   |                   9 |                 5706 |          2261 |
| ifHCOutOctets   |                   9 |                 5708 |          2262 |
+-----------------+---------------------+----------------------+---------------+
542 rows in set (0.00 sec)

mysql> select snmp_query_graph_rrd.snmp_field_name, snmp_query_graph_rrd.snmp_query_graph_id, data_template_rrd.id as data_template_rrd_id, data_template_rrd.local_data_id FROM (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id=14;
+-----------------+---------------------+----------------------+---------------+
| snmp_field_name | snmp_query_graph_id | data_template_rrd_id | local_data_id |
+-----------------+---------------------+----------------------+---------------+
| ifHCInOctets    |                  14 |                 5713 |          2265 |
| ifHCInOctets    |                  14 |                 5715 |          2266 |
| ifHCInOctets    |                  14 |                 5717 |          2267 |
| ifHCInOctets    |                  14 |                 5719 |          2268 |
| ifHCInOctets    |                  14 |                 5721 |          2269 |
| ifHCInOctets    |                  14 |                 5723 |          2270 |
| ifHCInOctets    |                  14 |                 5725 |          2271 |
| ifHCInOctets    |                  14 |                 5709 |          2263 |
| ifHCInOctets    |                  14 |                 5711 |          2264 |
| ifHCInOctets    |                  14 |                 5727 |          2272 |
| ifHCOutOctets   |                  14 |                 5718 |          2267 |
| ifHCOutOctets   |                  14 |                 5712 |          2264 |
| ifHCOutOctets   |                  14 |                 5714 |          2265 |
| ifHCOutOctets   |                  14 |                 5716 |          2266 |
| ifHCOutOctets   |                  14 |                 5720 |          2268 |
| ifHCOutOctets   |                  14 |                 5722 |          2269 |
| ifHCOutOctets   |                  14 |                 5724 |          2270 |
| ifHCOutOctets   |                  14 |                 5710 |          2263 |
| ifHCOutOctets   |                  14 |                 5726 |          2271 |
| ifHCOutOctets   |                  14 |                 5728 |          2272 |
+-----------------+---------------------+----------------------+---------------+
20 rows in set (0.00 sec)

mysql> select snmp_query_graph_rrd.snmp_field_name, snmp_query_graph_rrd.snmp_query_graph_id, data_template_rrd.id as data_template_rrd_id, data_template_rrd.local_data_id FROM (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id=49;
+-----------------+---------------------+----------------------+---------------+
| snmp_field_name | snmp_query_graph_id | data_template_rrd_id | local_data_id |
+-----------------+---------------------+----------------------+---------------+
| ifHCInOctets    |                  49 |                 5713 |          2265 |
| ifHCInOctets    |                  49 |                 5715 |          2266 |
| ifHCInOctets    |                  49 |                 5717 |          2267 |
| ifHCInOctets    |                  49 |                 5719 |          2268 |
| ifHCInOctets    |                  49 |                 5721 |          2269 |
| ifHCInOctets    |                  49 |                 5723 |          2270 |
| ifHCInOctets    |                  49 |                 5725 |          2271 |
| ifHCInOctets    |                  49 |                 5709 |          2263 |
| ifHCInOctets    |                  49 |                 5711 |          2264 |
| ifHCInOctets    |                  49 |                 5727 |          2272 |
| ifHCOutOctets   |                  49 |                 5718 |          2267 |
| ifHCOutOctets   |                  49 |                 5712 |          2264 |
| ifHCOutOctets   |                  49 |                 5714 |          2265 |
| ifHCOutOctets   |                  49 |                 5716 |          2266 |
| ifHCOutOctets   |                  49 |                 5720 |          2268 |
| ifHCOutOctets   |                  49 |                 5722 |          2269 |
| ifHCOutOctets   |                  49 |                 5724 |          2270 |
| ifHCOutOctets   |                  49 |                 5710 |          2263 |
| ifHCOutOctets   |                  49 |                 5726 |          2271 |
| ifHCOutOctets   |                  49 |                 5728 |          2272 |
+-----------------+---------------------+----------------------+---------------+
20 rows in set (0.00 sec)

mysql>
My question is: why is happen this? Why I got multiple lines with the same entry?

This line

Code: Select all

                        $output_type_sql = "and snmp_query_graph_rrd.snmp_query_graph_id=" . $cnn_id->qstr($field["output_type"]);
always returns in my case 14 and obviously in the query the $local_data_id 1095 for example is not found and the poller cache doesn't update the table correctly.

How can I correct this without DELETE all graphs that are not getting data and recreate them?

I don't know if this is the correct flow for Cacti, but I got the same problem over the time until today when I did this debug.
AdrianBan
Posts: 4
Joined: Wed Feb 05, 2014 8:46 am

Re: Poller cache missing information after data template cha

Post by AdrianBan »

I think there is a strange bug when the graphic and data sources are changed from one template to another template.

Code: Select all

mysql> SELECT `id`,`local_data_template_rrd_id`,`local_data_id`,`data_template_id` FROM `data_template_rrd` WHERE `local_data_id` = 2022 ORDER BY `local_data_template_rrd_id` ASC;
+------+----------------------------+---------------+------------------+
| id   | local_data_template_rrd_id | local_data_id | data_template_id |
+------+----------------------------+---------------+------------------+
| 5157 |                         54 |          2022 |               41 |
| 5158 |                         55 |          2022 |               41 |
+------+----------------------------+---------------+------------------+
2 rows in set (0.00 sec)
After changing the template the local_data_template_rrd_id isn't changed at all:

Code: Select all

mysql> SELECT `id`,`local_data_template_rrd_id`,`local_data_id`,`data_template_id` FROM `data_template_rrd` WHERE `local_data_id` = 2022 ORDER BY `local_data_template_rrd_id` ASC;
+------+----------------------------+---------------+------------------+
| id   | local_data_template_rrd_id | local_data_id | data_template_id |
+------+----------------------------+---------------+------------------+
| 5157 |                         54 |          2022 |               49 |
| 5158 |                         55 |          2022 |               49 |
+------+----------------------------+---------------+------------------+
2 rows in set (0.00 sec)
And in this query in line 95 of lib/utility.php:

Code: Select all

SELECT snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id AS data_template_rrd_id FROM (snmp_query_graph_rrd,data_template_rrd) WHERE snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id AND snmp_query_graph_rrd.snmp_query_graph_id='14' AND snmp_query_graph_rrd.data_templ
ate_id=49 AND data_template_rrd.local_data_id=2022 ORDER BY data_template_rrd.id
The result will be none because of this condition:

Code: Select all

snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id
Here is the snmp_query_graph.rrd table:

Code: Select all

mysql> select * from snmp_query_graph_rrd where snmp_field_name like "if%Octets";                                                                            +---------------------+------------------+----------------------+-----------------+
| snmp_query_graph_id | data_template_id | data_template_rrd_id | snmp_field_name |
+---------------------+------------------+----------------------+-----------------+
|                  13 |               41 |                   54 | ifInOctets      |
|                  14 |               49 |                   99 | ifHCOutOctets   |
|                  14 |               49 |                   98 | ifHCInOctets    |
|                  13 |               41 |                   55 | ifOutOctets     |
+---------------------+------------------+----------------------+-----------------+
4 rows in set (0.00 sec)
As can you see the data_template_rrd_id is 98 and 99 for snmp_query_graph_id 14 which is not valid value in `data_template_rrd` table anymore.

How can I fix this issue?

Best regards,
Adrian
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest