[SOLVED] autom8 not creating graphs

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Okay thanks a lot..

Can you also help me with the bug of the white screen and resulting from it that autom8 isn't working?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

All plugins using the hook device_action_prepare like thold_device_action_prepare MUST return $save (the parameter passed to that function) unchanged in any case. This is required so the next plugin can interpret the data.
R.
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

gandalf wrote:All plugins using the hook device_action_prepare like thold_device_action_prepare MUST return $save (the parameter passed to that function) unchanged in any case. This is required so the next plugin can interpret the data.
R.
Mhm, this is a nice technical information - But how can I change something, that autom 8 is working?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You will have to edit e.g. thold modules (or different plugins), because not AUTOM8 is broken but those different plugins.
Search e.g. for device_action_prepare in thold's setup.php. There, you'll find the function name that has to be verified. Post the first 10 lines of that function and I'll tell you what to change
R.
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

I just do not use the plugin thold. As my signature says just these: aggregate 0.74, autom8 0.33, loginmod 1.0 and nmidweb2 0.3

I didn't found the pattern device_action_prepare in aggregate, nmid oder loginmod files.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Bad. This always matched in the past.
So please increase logging level to MEDIUM and grep cacti.log for "AUTOM8 TRACE". That should tell me a story.
R.
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Nothing!

I gave up on this.

But today I tried to apply the autom8 rules on a different cacti system - Same thing! Autom8 worked before the freebsd-portupgrade e5 (which just ruined all plugins..)

Will have a look if I can fix it - if not, I think cacti is not usable together with FreeBSD Ports, because the PIA is unfortunately not included in the FreeBSD Port :x :x :x :x
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

why don't you just grab the tgz file and install cacti on FreeBSD yourself ? I found that to be the easiest method to get cacti up and running on *NIX systems.

The package maintainer seem to fiddle around with the cacti source way too much, sometimes even messing arround with the config files ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

phalek wrote:why don't you just grab the tgz file and install cacti on FreeBSD yourself ? I found that to be the easiest method to get cacti up and running on *NIX systems.

The package maintainer seem to fiddle around with the cacti source way too much, sometimes even messing arround with the config files ...
I would love to - But I am not the boss here ;-)
My boss believes hardly in FreeBSD-Ports.
So no chance for me not to use the ports-version. :(

Also the port-version crashed some of the cacti-config files..
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

I reinstalled in steps...

1) Reinstalled Plugins -> Didn't work
2) Reinstalled PIA - > Didn't work
3) Copied the .tgz from the HP to the /cacti/ dir -> Didn't work
4) Reimported cacti.sql and ca.sql in MySQL database -> Works

...But all my configuration is lost. This is just not a satisifying. :-?
There must be somewhere an issue with the mysql-database and autom8...

Update: Interessting behavour: It worked. After clicking "Apply autom8 rules" once, the graphs were created - but after clicking it again - same issue with the blank screen again? :cry:
Last edited by Sirup on Tue May 11, 2010 10:14 am, edited 1 time in total.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

This is the table plugin_hooks from the Cacti instance, where autom8 is not working:

Code: Select all

+----+----------+-------------------------------------+----------------------+--------------------------------+--------+
| id | name     | hook                                | file                 | function                       | status |
+----+----------+-------------------------------------+----------------------+--------------------------------+--------+
|  1 | internal | config_arrays                       |                      | plugin_config_arrays           |      1 |
|  2 | internal | draw_navigation_text                |                      | plugin_draw_navigation_text    |      1 |
| 29 | autom8   | graphs_action_prepare               | autom8_actions.php   | autom8_graph_action_prepare    |      1 |
| 28 | autom8   | graphs_action_array                 | autom8_actions.php   | autom8_graph_action_array      |      1 |
| 27 | autom8   | device_action_execute               | autom8_actions.php   | autom8_device_action_execute   |      1 |
| 26 | autom8   | device_action_prepare               | autom8_actions.php   | autom8_device_action_prepare   |      1 |
| 25 | autom8   | device_action_array                 | autom8_actions.php   | autom8_device_action_array     |      1 |
| 24 | autom8   | create_complete_graph_from_template | autom8_functions.php | autom8_hook_graph_create_tree  |      1 |
| 23 | autom8   | api_device_new                      | autom8_functions.php | autom8_hook_device_create_tree |      1 |
| 22 | autom8   | add_graph_template_to_host          | autom8_functions.php | autom8_hook_graph_template     |      1 |
| 21 | autom8   | run_data_query                      | autom8_functions.php | autom8_hook_data_query         |      1 |
| 17 | autom8   | config_arrays                       | setup.php            | autom8_config_arrays           |      1 |
| 18 | autom8   | config_form                         | setup.php            | autom8_config_form             |      1 |
| 19 | autom8   | config_settings                     | setup.php            | autom8_config_settings         |      1 |
| 20 | autom8   | draw_navigation_text                | setup.php            | autom8_draw_navigation_text    |      1 |
| 30 | autom8   | graphs_action_execute               | autom8_actions.php   | autom8_graph_action_execute    |      1 |
+----+----------+-------------------------------------+----------------------+--------------------------------+--------+
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

This both do not work:

Code: Select all

    
      php <cactipath>\cli\repair_database.php
      mysqlcheck --auto-repair --databases cacti
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

And another test....

Inside mysql:

Code: Select all

drop database cactiio;
create database cactiio;
From bash:

Code: Select all

#Import default cacti.sql
mysql cactiio < cacti.sql --password
Import LIA sql
mysql cactiio <pa.sql --password
From /cli/:

Code: Select all

Script to import all devices
Script to import all Tree Items
Granted Permissions to Plugin Management, Installed and enabled autom8.

Made an Autom8 rule by hand - Clicked Show Matching Hosts/Devices -> Showed me the correct graphs.

Clicked "Apply Autom8 Rules" -> WHITE SCREEN again.
Same thing happens, when I add some devices manually by hand and not by script.

There must be somewhere a mistake in autom8 ;(
Last edited by Sirup on Wed May 12, 2010 4:07 am, edited 1 time in total.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

did you enable php debuggin in the php.ini file and send the log either to syslog or a file ? That may provide an error message ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

I'll try instantly (after lunch :lol: ) - Thanks a lot!
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests