/** * snmpagent_cache_setup() * Generates a SNMP caching tables reflecting all objects of the Cacti MIB * @return */ function snmpagent_cache_install() { global $config; /* drop everything */ db_execute("TRUNCATE `snmpagent_cache`"); db_execute("TRUNCATE `snmpagent_mibs`;"); db_execute("TRUNCATE `snmpagent_cache_notifications`;"); db_execute("TRUNCATE `snmpagent_cache_textual_conventions`;"); $mc = new MibCache(); $mc->install($config["base_path"] . '/mibs/CACTI-MIB'); $mc->install($config["base_path"] . '/mibs/CACTI-SNMPAGENT-MIB'); $mc->install($config["base_path"] . '/mibs/CACTI-BOOST-MIB'); snmpagent_cache_init(); /* call install routine of plugins supporting the SNMPagent */ do_hook('snmpagent_cache_install'); }
function thold_snmpagent_cache_install() { global $config; if (class_exists('MibCache')) { $mc = new MibCache('CACTI-THOLD-MIB'); $mc->install($config['base_path'] . '/plugins/thold/CACTI-THOLD-MIB', true); } }