* Fixed: get_rrdtool_version report str_replace error if rrdtool_version does not exist
Fixed: move global static $phperrors before other error-able function call
Fixed: file_exists report error if path_spine is not configured
* Fix PHP5.4 Error
Co-authored-by: TheWitness <thewitness@cacti.net>
* Adding a new method for use in xml files: value_parse_index
Add a new definition in xml files: value_parse_index
* What introduces the change:
- we add a new definition in xml files: <value_parse_index>
* What do we gain:
- we optimize the list of returned data by the method: "Get SNMP Data"
- we can better match the list in data query with what we want to see
- fewer records in the host_snmp_cache table
- we will increase the speed of returned data:
- get method: for slow devices or a slow connection, a large list of returned data, only a few of which we care about
- walk method: for fast devices and links
* Example:
<interface>
<name>Get SNMP Interfaces - CMTS Upstream</name>
<description>Queries a host for a list of interfaces for CMTS, only Upstreams</description>
<oid_index>.1.3.6.1.2.1.2.2.1.3</oid_index>
<value_index_parse>VALUE/REGEXP:129|205</value_index_parse>
<oid_index_parse>OID/REGEXP:.*\.([0-9]+)$</oid_index_parse>
<index_order>ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<ifIndex>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</ifIndex>
<ifType>
<name>Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.2.2.1.3</oid>
</ifType>
<ifInOctets>
<name>Bytes In</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.10</oid>
</ifInOctets>
</fields>
</interface>
It will only show us a list of upstream interfaces.
You can also like this:
<oid_index>.1.3.6.1.2.1.2.2.1.8</oid_index>
<value_index_parse>VALUE/REGEXP:1</value_index_parse>
It will only show the interfaces in the up status.
The new definition works for the methods: get and walk.
CMTS devices can have many interfaces (e.g. cbr 130,000 interfaces), a user who wants to reduce the number of entries can use this definition.
In my cacti there are over 30 million records in the host_snmp_cache table, this change will reduce that amount.
* ChangeLog Update for pull requests Cacti#5009
Adding a new method for use in xml files: value_parse_index
<value_parse_index>VALUE/REGEXP:</value_parse_index>
- Data Debug Troubleshooter does not pick up invalid RRD_heartbeat settings
- Data Debug Troubleshooter Reports False Positive Issues with Missing Data Sources
* Data Templates that include many Data Sources bug only a few are used, cause RRDfile bloat
* Perform lite PSR on the gradient and business hour functions
* Duration can be less than 24 hours
* Ensure the time range is at least one sample less than the time range
* Run properly at boost end
* Improve logging
TODO: Tracking Errors
So, I had to back out this version of lib/boost.php today due to some sort a new failure, but I have been unable to reproduce in my lab. Still looking into it. This is a minor change that I'm making as a part of my bug hunt.