I've upgraded my cacti from 0.8.8b to 1.2.19 and (after some fixes) it seems to be working fine. Except for the AUTOM8 section (used to have the automate plugin, but now the functionality is builtin). The rules have been imported and look ok. Here's an example rule: https://imgur.com/a/iuRXvU9
If, for a specific rule I do "Show Matching Devices." or "Show Matching Objects" I do get a long list of devices/interfaces, so I expect that the rule matches my data correctly.
But when I do "Apply automation rules" on a newly added device, it does not create new graphs for those interfaces.
I enabled debugging in poller_automation.php and redid my steps. I was able to get this debug output:
Code: Select all
2022-01-17 14:10:35 - AUTOM8 TRACE form_actions called, action: 6
2022-01-17 14:10:35 - AUTOM8 TRACE form_actions, items: a:1:{i:0;s:4:"5334";}
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_update_device() Device[5334]
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_update_device() Device[5334], sql: SELECT gt.* FROM graph_templates AS gt INNER JOIN host_graph AS hg ON gt.id=hg.graph_template_id WHERE hg.host_id=5334 AND gt.id NOT IN ( SELECT gl.graph_template_id FROM graph_local AS gl WHERE host_id=5334 )
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_update_device() Found DQ[10] for Device[5334]
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - start - data query: 10
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - sql: SELECT agr.id, agr.name, agr.snmp_query_id, agr.graph_type_id FROM automation_graph_rules AS agr INNER JOIN host_snmp_query AS hsq ON agr.snmp_query_id = hsq.snmp_query_id WHERE agr.snmp_query_id = ? AND hsq.host_id = ? AND enabled="on" - found: 4
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - rule=9 name: 01. SNMP - Interface Statistics - In/Out Bits (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() called rule id: 9
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"27","rule_id":"9","rule_type":"1","sequence":"1","operation":"0","field":"h.description","operator":"14","pattern":""},{"id":"28","rule_id":"9","rule_type":"1","sequence":"2","operation":"1","field":"h.snmp_version","operator":"12","pattern":"2"},{"id":"29","rule_id":"9","rule_type":"1","sequence":"3","operation":"1","field":"h.status","operator":"14","pattern":""},{"id":"30","rule_id":"9","rule_type":"1","sequence":"4","operation":"1","field":"h.disabled","operator":"10","pattern":"0"}], prefix:
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - create sql: SELECT h.id AS host_id, h.hostname, h.description, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON h.host_template_id = ht.id WHERE ( `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0') AND h.id=5334 AND h.deleted = "" matches: 1
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] create_dq_graphs() Device[5334] - snmp query: 10 - rule: 01. SNMP - Interface Statistics - In/Out Bits (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"33","rule_id":"9","sequence":"1","operation":"0","field":"ifOperStatus","operator":"7","pattern":"Up"},{"id":"34","rule_id":"9","sequence":"2","operation":"1","field":"ifHwAddr","operator":"16","pattern":""},{"id":"35","rule_id":"9","sequence":"3","operation":"1","field":"ifHwAddr","operator":"8","pattern":"00:00:00:00:00:00"},{"id":"54","rule_id":"9","sequence":"7","operation":"1","field":"","operator":"0","pattern":""},{"id":"53","rule_id":"9","sequence":"8","operation":"3","field":"","operator":"0","pattern":""},{"id":"37","rule_id":"9","sequence":"9","operation":"0","field":"ifType","operator":"1","pattern":"thernet"},{"id":"55","rule_id":"9","sequence":"10","operation":"2","field":"ifType","operator":"1","pattern":"Lag"},{"id":"56","rule_id":"9","sequence":"11","operation":"4","field":"","operator":"0","pattern":""}], prefix: a.
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: a.`ifOperStatus` <=> 'Up' AND a.`ifHwAddr` NOT LIKE '' AND a.`ifHwAddr` <> '00:00:00:00:00:00' AND ( a.`ifType` LIKE '%thernet%' OR a.`ifType` LIKE '%Lag%' )
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - rule=10 name: 02. SNMP - Interface Statistics - MBU Pachets in (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() called rule id: 10
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"31","rule_id":"10","rule_type":"1","sequence":"1","operation":"0","field":"h.description","operator":"14","pattern":""},{"id":"32","rule_id":"10","rule_type":"1","sequence":"2","operation":"1","field":"h.snmp_version","operator":"12","pattern":"2"},{"id":"33","rule_id":"10","rule_type":"1","sequence":"3","operation":"1","field":"h.status","operator":"14","pattern":""},{"id":"34","rule_id":"10","rule_type":"1","sequence":"4","operation":"1","field":"h.disabled","operator":"10","pattern":"0"}], prefix:
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - create sql: SELECT h.id AS host_id, h.hostname, h.description, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON h.host_template_id = ht.id WHERE ( `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0') AND h.id=5334 AND h.deleted = "" matches: 1
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] create_dq_graphs() Device[5334] - snmp query: 10 - rule: 02. SNMP - Interface Statistics - MBU Pachets in (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"38","rule_id":"10","sequence":"1","operation":"0","field":"ifOperStatus","operator":"7","pattern":"Up"},{"id":"39","rule_id":"10","sequence":"2","operation":"1","field":"ifHwAddr","operator":"16","pattern":""},{"id":"40","rule_id":"10","sequence":"3","operation":"1","field":"ifHwAddr","operator":"8","pattern":"00:00:00:00:00:00"},{"id":"42","rule_id":"10","sequence":"7","operation":"1","field":"ifType","operator":"1","pattern":"thernet"}], prefix: a.
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: a.`ifOperStatus` <=> 'Up' AND a.`ifHwAddr` NOT LIKE '' AND a.`ifHwAddr` <> '00:00:00:00:00:00' AND a.`ifType` LIKE '%thernet%'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - rule=11 name: 03. SNMP - Interface Statistics - MBU Pachets out (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() called rule id: 11
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"35","rule_id":"11","rule_type":"1","sequence":"1","operation":"0","field":"h.description","operator":"14","pattern":""},{"id":"36","rule_id":"11","rule_type":"1","sequence":"2","operation":"1","field":"h.snmp_version","operator":"12","pattern":"2"},{"id":"37","rule_id":"11","rule_type":"1","sequence":"3","operation":"1","field":"h.status","operator":"14","pattern":""},{"id":"38","rule_id":"11","rule_type":"1","sequence":"4","operation":"1","field":"h.disabled","operator":"10","pattern":"0"}], prefix:
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - create sql: SELECT h.id AS host_id, h.hostname, h.description, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON h.host_template_id = ht.id WHERE ( `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0') AND h.id=5334 AND h.deleted = "" matches: 1
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] create_dq_graphs() Device[5334] - snmp query: 10 - rule: 03. SNMP - Interface Statistics - MBU Pachets out (64-bit Counters) - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"43","rule_id":"11","sequence":"1","operation":"0","field":"ifOperStatus","operator":"7","pattern":"Up"},{"id":"44","rule_id":"11","sequence":"2","operation":"1","field":"ifHwAddr","operator":"16","pattern":""},{"id":"45","rule_id":"11","sequence":"3","operation":"1","field":"ifHwAddr","operator":"8","pattern":"00:00:00:00:00:00"},{"id":"47","rule_id":"11","sequence":"7","operation":"1","field":"ifType","operator":"1","pattern":"thernet"}], prefix: a.
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: a.`ifOperStatus` <=> 'Up' AND a.`ifHwAddr` NOT LIKE '' AND a.`ifHwAddr` <> '00:00:00:00:00:00' AND a.`ifType` LIKE '%thernet%'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - rule=12 name: 04. SNMP - Interface Statistics - Errors - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() called rule id: 12
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"39","rule_id":"12","rule_type":"1","sequence":"1","operation":"0","field":"h.description","operator":"14","pattern":""},{"id":"40","rule_id":"12","rule_type":"1","sequence":"2","operation":"1","field":"h.snmp_version","operator":"12","pattern":"2"},{"id":"41","rule_id":"12","rule_type":"1","sequence":"3","operation":"1","field":"h.status","operator":"14","pattern":""},{"id":"42","rule_id":"12","rule_type":"1","sequence":"4","operation":"1","field":"h.disabled","operator":"10","pattern":"0"}], prefix:
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_matching_objects_filter() returns: `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_data_query() Device[5334] - create sql: SELECT h.id AS host_id, h.hostname, h.description, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON h.host_template_id = ht.id WHERE ( `h`.`description` IS NOT NULL AND `h`.`snmp_version` >= '2' AND `h`.`status` IS NOT NULL AND `h`.`disabled` <= '0') AND h.id=5334 AND h.deleted = "" matches: 1
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] create_dq_graphs() Device[5334] - snmp query: 10 - rule: 04. SNMP - Interface Statistics - Errors - SAS
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() called: [{"id":"48","rule_id":"12","sequence":"1","operation":"0","field":"ifOperStatus","operator":"7","pattern":"Up"},{"id":"49","rule_id":"12","sequence":"2","operation":"1","field":"ifHwAddr","operator":"16","pattern":""},{"id":"50","rule_id":"12","sequence":"3","operation":"1","field":"ifHwAddr","operator":"8","pattern":"00:00:00:00:00:00"},{"id":"52","rule_id":"12","sequence":"7","operation":"1","field":"ifType","operator":"1","pattern":"thernet"}], prefix: a.
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] build_rule_item_filter() returns: a.`ifOperStatus` <=> 'Up' AND a.`ifHwAddr` NOT LIKE '' AND a.`ifHwAddr` <> '00:00:00:00:00:00' AND a.`ifType` LIKE '%thernet%'
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_update_device() Create Tree for Device[5334]
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_device_create_tree() Device[5334] called
2022-01-17 14:10:35 - AUTOM8 TRACE [PID: 1530] automation_execute_device_create_tree() Device[5334], matching rule sql: SELECT atr.id, atr.name, atr.tree_id, atr.tree_item_id, atr.leaf_type, atr.host_grouping_type FROM automation_tree_rules AS atr WHERE enabled='on' AND leaf_type=3 matches: 0
Could you tell me what to check further?
Here's the technical support summary for my cacti instance:
Code: Select all
Technical Support [Summary]
General Information
Date Mon, 17 Jan 2022 15:22:57 +0200
Cacti Version 1.2.19
Cacti OS unix
RSA Fingerprint 38:e7:45:d5:c2:46:09:6b:48:d8:88:b1:74:b0:d4:c9
NET-SNMP Version NET-SNMP version: 5.8
RRDtool Version Configured 1.7.0+
RRDtool Version Found 1.7.0
Devices 3,015
Graphs 138,877
Data Sources SNMP Get: 3,177
SNMP Query: 269,819
Total: 272,996
Poller Information
Interval 300
Type SPINE 1.2.19 Copyright 2004-2021 by The Cacti Group
Items Action[0]: 440,899
Total: 440,899
Concurrent Processes Name: Main Poller, Procs: 10
Max Threads Name: Main Poller, Threads: 10
PHP Servers 10
Minimum Connections: Current: 4096, Min Required: 300
Assumes 100 spare connections for Web page users and other various connections.
The minimum required can vary greatly if there is heavy user Graph viewing activity.
Each browser tab can use upto 10 connections depending on the browser.
Script Timeout 25
Max OID 20
Last Run Statistics Time:44.4079 Method:spine Processes:10 Threads:10 Hosts:2890 HostsPerProcess:289 DataSources:440899 RRDsProcessed:0
System Memory
MemTotal 32,725,716,000
MemFree 3,746,276,000
MemAvailable 20,766,772,000
Buffers 371,320,000
Cached 16,477,092,000
Active 20,331,356,000
Inactive 7,210,324,000
SwapTotal 1,047,548,000
SwapFree 44,000
PHP Information
PHP Version 7.2.24
PHP OS Linux
PHP uname Linux cacti_alu_rocky 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 20:49:28 UTC 2021 x86_64
PHP SNMP Installed. Note: If you are planning on using SNMPv3, you must remove php-snmp and use the Net-SNMP toolset.
max_execution_time 300
memory_limit 1024M