auto8m not create graph

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

auto8m not create graph

Post by L0gRuS »

Hi!
today i'm installed auto8m, but it doens't work and i understand why.

1. download from http://docs.cacti.net/plugin:autom8 file, untar, rename and install from PA
2. check docs When using Plugin Architecture 2.9 there's no need for patching. great!
3. enable in misc, turn on debug level
4. create rule (attach1) and check from devices.
5. go to devices, select one device and apply autom8 rule
6. nothing. whight screen http://xxx/cacti/host.php
7 check log
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[205], graph: 35
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[205], sql: SELECT graph_templates.id, graph_templates.name FROM (graph_templates,host_graph) WHERE graph_templates.id=host_graph.graph_template_id AND host_graph.host_id=205 AND graph_templates.id NOT IN (SELECT graph_local.graph_template_id FROM graph_local WHERE host_id=205)
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[205]
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute, items: a:1:{i:0;s:3:\"205\";}
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called, action: plugin_autom8_device
01/24/2011 10:09:38 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called
01/24/2011 10:09:36 PM - AUTOM8 TRACE: Poller[0] autom8_device_action_prepare called
whats wrong?

8. go to device and check, maybe graphs are created. nothing
lighttpd error is empty
Attachments
auto8m.png
auto8m.png (26.58 KiB) Viewed 3494 times
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

Did you enable "SHow matching Graphs"?
R.
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

yes.
*Show Matching Hosts.
*Don't Show Matching Graphs.
and
Data Query [SNMP - Interface Statistics]
<< Previous Showing Rows 1 to 540 of 540 [1] Next >>
Hostname Host Status Index Status Description Name (IF-MIB) Alias (IF-MIB) Type Speed Hardware Address IP Address
xxx Up 10 Up Serial0/0/0:0 Se0/0/0:0 1-th E1 to xxx (NEW) propPointToPointSerial(22) 1984000 172.21.52.18
xxx Up 11 Up Serial0/0/1:0 Se0/0/1:0 2-th E1 to xxx5 (NEW) propPointToPointSerial(22) 1984000 172.21.52.22
xxx Up 12 Up Serial0/1/0:0 Se0/1/0:0 3-th E1 to xxx (NEW) propPointToPointSerial(22) 1984000 172.21.52.26
xxx Up 6 Up Serial0/0/0:0 Se0/0/0:0 1-th E1 to xxx(NEW) propPointToPointSerial(22) 1984000 172.29.0.2
xxx Up 6 Up Serial0/0/0:0 Se0/0/0:0 1-th E1 to xxx (NEW) propPointToPointSerial(22) 1984000 172.21.84.2
xxx Up 6 Up Serial0/0/0:0 Se0/0/0:0 1-th E1 to xxx (NEW) propPointToPointSerial(22) 1984000 172.22.68.
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

Please investigate, which number represents "propPointtoPointSerial". Replace the string by that number and retry. This is one of the problems when working with string representations ...
R.
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

i changed to 22 and (22)
and removed item 3

Rule Items => Create Graph Add
Item Sequence Operation Field Operator Pattern
Item#1 1 ifOperStatus contains Up
Item#2 2 AND ifIP is not empty
Item#3 3 AND ifType contains (22)
some error

0
1/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394], graph: 35
01/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394], sql: SELECT graph_templates.id, graph_templates.name FROM (graph_templates,host_graph) WHERE graph_templates.id=host_graph.graph_template_id AND host_graph.host_id=394 AND graph_templates.id NOT IN (SELECT graph_local.graph_template_id FROM graph_local WHERE host_id=394)
01/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394]
01/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute, items: a:1:{i:0;s:3:\"394\";}
01/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called, action: plugin_autom8_device
01/26/2011 12:16:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called


maybe i need patch any files?


p.s. now i try example graphs rule. it don't work too.
but tree rule works fine.
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

(22) is wrong. Omit the parenthesis, please. Then, please show a complete trace grepping AUTOM8 statements out of the log
R.
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

Rule Items => Eligible Hosts Add
Item Sequence Operation Field Operator Pattern
Item#1 1 host.description is not unknown

Rule Items => Create Graph Add
Item Sequence Operation Field Operator Pattern
Item#1 1 ifOperStatus contains Up
Item#2 2 AND ifIP is not empty
Item#3 3 AND ifType contains 22


log
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394], graph: 35
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394], sql: SELECT graph_templates.id, graph_templates.name FROM (graph_templates,host_graph) WHERE graph_templates.id=host_graph.graph_template_id AND host_graph.host_id=394 AND graph_templates.id NOT IN (SELECT graph_local.graph_template_id FROM graph_local WHERE host_id=394)
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute Host[394]
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute, items: a:1:{i:0;s:3:\"394\";}
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called, action: plugin_autom8_device
01/26/2011 12:51:22 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_execute called
01/26/2011 12:51:03 AM - AUTOM8 TRACE: Poller[0] autom8_device_action_prepare called
01/26/2011 12:50:38 AM - AUTOM8 TRACE: Poller[0] get_field_names called: 1
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter returns: a.ifOperStatus LIKE '%Up%' AND a.ifIP NOT LIKE '' AND a.ifType LIKE '%22%'
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter called: a:3:{i:0;a:7:{s:2:"id";s:1:"7";s:7:"rule_id";s:1:"4";s:8:"sequence";s:1:"1";s:9:"operation";s:1:"0";s:5:"field";s:12:"ifOperStatus";s:8:"operator";s:1:"1";s:7:"pattern";s:2:"Up";}i:1;a:7:{s:2:"id";s:1:"8";s:7:"rule_id";s:1:"4";s:8:"sequence";s:1:"2";s:9:"operation";s:1:"1";s:5:"field";s:4:"ifIP";s:8:"operator";s:2:"16";s:7:"pattern";s:0:"";}i:2;a:7:{s:2:"id";s:2:"10";s:7:"rule_id";s:1:"4";s:8:"sequence";s:1:"3";s:9:"operation";s:1:"1";s:5:"field";s:6:"ifType";s:8:"operator";s:1:"1";s:7:"pattern";s:2:"22";}}, prefix: a.
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_data_query_sql returns: SELECT host.hostname AS autom8_host, host_id, host.disabled, host.status, snmp_query_id, snmp_index , MAX(CASE WHEN field_name='ifAlias' THEN field_value ELSE NULL END) AS 'ifAlias', MAX(CASE WHEN field_name='ifDescr' THEN field_value ELSE NULL END) AS 'ifDescr', MAX(CASE WHEN field_name='ifHwAddr' THEN field_value ELSE NULL END) AS 'ifHwAddr', MAX(CASE WHEN field_name='ifIndex' THEN field_value ELSE NULL END) AS 'ifIndex', MAX(CASE WHEN field_name='ifIP' THEN field_value ELSE NULL END) AS 'ifIP', MAX(CASE WHEN field_name='ifName' THEN field_value ELSE NULL END) AS 'ifName', MAX(CASE WHEN field_name='ifOperStatus' THEN field_value ELSE NULL END) AS 'ifOperStatus', MAX(CASE WHEN field_name='ifSpeed' THEN field_value ELSE NULL END) AS 'ifSpeed', MAX(CASE WHEN field_name='ifType' THEN field_value ELSE NULL END) AS 'ifType' FROM host_snmp_cache LEFT JOIN host ON (host_snmp_cache.host_id=host.id) LEFT JOIN host_template ON (host.host_template_id=host_template.id) WHERE snmp_query_id=1 AND ( host.description IS NOT NULL ) GROUP BY host_id, snmp_query_id, snmp_index
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_matching_objects_filter returns: host.description IS NOT NULL
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter returns: host.description IS NOT NULL
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter called: a:1:{i:0;a:8:{s:2:"id";s:1:"8";s:7:"rule_id";s:1:"4";s:9:"rule_type";s:1:"1";s:8:"sequence";s:1:"1";s:9:"operation";s:1:"0";s:5:"field";s:16:"host.description";s:8:"operator";s:2:"14";s:7:"pattern";s:0:"";}}, prefix:
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_matching_objects_filter called rule id: 4
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] get_field_names called: 1
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_data_query_sql called: a:5:{s:2:"id";s:1:"4";s:4:"name";s:9:"serail up";s:13:"snmp_query_id";s:1:"1";s:13:"graph_type_id";s:2:"13";s:7:"enabled";s:2:"on";}
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_sort_order returns: ORDER BY autom8_host, CAST(snmp_index AS unsigned)
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_sort_order called: numeric/autom8_host
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_matching_objects_filter returns: host.description IS NOT NULL
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter returns: host.description IS NOT NULL
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_rule_item_filter called: a:1:{i:0;a:8:{s:2:"id";s:1:"8";s:7:"rule_id";s:1:"4";s:9:"rule_type";s:1:"1";s:8:"sequence";s:1:"1";s:9:"operation";s:1:"0";s:5:"field";s:16:"host.description";s:8:"operator";s:2:"14";s:7:"pattern";s:0:"";}}, prefix:
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] build_matching_objects_filter called rule id: 4
01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] get_created_graphs called: a:5:{s:2:"id";s:1:"4";s:4:"name";s:9:"serail up";s:13:"snmp_query_id";s:1:"1";s:13:"graph_type_id";s:2:"13";s:7:"enabled";s:2:"on";}
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

L0gRuS wrote:01/26/2011 12:50:25 AM - AUTOM8 TRACE: Poller[0] get_created_graphs called: a:5:{s:2:"id";s:1:"4";s:4:"name";s:9:"serail up";s:13:"snmp_query_id";s:1:"1";s:13:"graph_type_id";s:2:"13";s:7:"enabled";s:2:"on";}
[/quote]This was an exact copy? I wonder what "serail up" would mean ...
R.
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

I created a lot of rules to test where I could make a mistake. serail up - the last rule
Attachments
11111.PNG
11111.PNG (58.13 KiB) Viewed 3466 times
Cacti v.087g + PAv2.9
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

how i can run plugin rule "create graph" from cli?
Cacti v.087g + PAv2.9
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

very strange.
i install new copy of cacti with 0.87g and PA2.9 and check create graphs. all works. Then i dumped my old base from pruduction server and add to test cacti. graphs not works. Maybe errors in mysql database? how i can check errors in it?

I now localized the problem a bit.
I found in mysql table graph_templates
if you remove all entries except for the standard, then autom8 starts.


all rows
2 Interface - Traffic (bits/sec)
3 ucd/net - Available Disk Space
4 ucd/net - CPU Usage
5 Karlnet - Wireless Levels
6 Karlnet - Wireless Transmissions
7 Unix - Ping Latency
8 Unix - Processes
9 Unix - Load Average
10 Unix - Logged in Users
11 ucd/net - Load Average
12 Linux - Memory Usage
13 ucd/net - Memory Usage
14 Netware - File System Cache
15 Netware - CPU Utilization
16 Netware - File System Activity
17 Netware - Logged In Users
19 Netware - Volume Information
20 Netware - Directory Information
21 Unix - Available Disk Space
22 Interface - Errors/Discards
23 Interface - Unicast Packets
24 Interface - Non-Unicast Packets
25 Interface - Traffic (bytes/sec)
26 Host MIB - Available Disk Space
27 Host MIB - CPU Utilization
28 Host MIB - Logged in Users
29 Host MIB - Processes
30 Netware - Open Files
31 Interface - Traffic (bits/sec, 95th Percentile)
32 Interface - Traffic (bits/sec, Total Bandwidth)
33 Interface - Traffic (bytes/sec, Total Bandwidth)
34 SNMP - Generic OID Template
35 Cisco - CPU Utilization 5Sec 1Min 5Min
36 Cisco - Router Free Memory
37 Cisco - ProcMem Usage
38 Cisco CSS 11500 - CPU Usage
39 Cisco FWSM Total Connections
40 Cisco ASA - Active VPN Tunnels
41 Cisco ASA - IKE Dropped Packets
42 Cisco ASA - IKE Traffic (bits/sec)
43 Cisco ASA - RAS Sessions
44 Cisco ASA - Total Sessions
45 Cisco ASA - Memory Usage
46 Cisco ASA - 5 Minute CPU Usage
47 Cisco - FWSM Utilization 5Sec 1Min 5Min
48 Cisco Aironet - Dot11 Client Rate Distribution
49 Cisco Aironet - Dot11 Associated Clients
50 CSS Content Rule Hits
51 CSS Content Rule Traffic
52 CSS Service Connections
53 CSS Service Stats
54 Cisco CSS 11500 - DOS Attacks
55 Cisco CSS 11500 - Memory Usage
56 Local - Boost Poller Peak Memory
57 Local - Boost Server Time Statistics
58 Local - Cacti Boost Statistics
59 Local - Cacti Poller Item Statistics
60 Local - Cacti Poller Statistics - Objects
61 Local - Cacti Poller Statistics - Runtime
62 Local - Cacti Recache Statistics

i deleted next rows
35 Cisco - CPU Utilization 5Sec 1Min 5Min
36 Cisco - Router Free Memory
37 Cisco - ProcMem Usage
38 Cisco CSS 11500 - CPU Usage
39 Cisco FWSM Total Connections
40 Cisco ASA - Active VPN Tunnels
41 Cisco ASA - IKE Dropped Packets
42 Cisco ASA - IKE Traffic (bits/sec)
43 Cisco ASA - RAS Sessions
44 Cisco ASA - Total Sessions
45 Cisco ASA - Memory Usage
46 Cisco ASA - 5 Minute CPU Usage
47 Cisco - FWSM Utilization 5Sec 1Min 5Min
48 Cisco Aironet - Dot11 Client Rate Distribution
49 Cisco Aironet - Dot11 Associated Clients
50 CSS Content Rule Hits
51 CSS Content Rule Traffic
52 CSS Service Connections
53 CSS Service Stats
54 Cisco CSS 11500 - DOS Attacks
55 Cisco CSS 11500 - Memory Usage
56 Local - Boost Poller Peak Memory
57 Local - Boost Server Time Statistics
58 Local - Cacti Boost Statistics
59 Local - Cacti Poller Item Statistics
60 Local - Cacti Poller Statistics - Objects
61 Local - Cacti Poller Statistics - Runtime
62 Local - Cacti Recache Statistics
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

Can you please pm a gzipped mysqldump of your database
R.
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

sent
Cacti v.087g + PAv2.9
L0gRuS
Cacti User
Posts: 127
Joined: Thu Nov 06, 2008 7:57 am

Re: auto8m not create graph

Post by L0gRuS »

gandalf wrote:Can you please pm a gzipped mysqldump of your database
R.
Gandalf, can you find problem in a dump?
Cacti v.087g + PAv2.9
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: auto8m not create graph

Post by gandalf »

no time for investigating yet
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest