Uptime plugin installation assistance

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Uptime plugin installation assistance

Post by arvenz1962 »

Hi there,

I have installed uptime plugin v 0.4 and it seams that it is not working.

I can not see the uptime tab, I went to mysql and it is not creating the tables or adding the uptime field in host, etc.

I run check-uptime.php and gives me:
01/09/2009 11:09:38 AM - UPTIME: Poller[0] Checking uptime

There is an entry in the cacti log for the check-uptime.php and reads:

01/09/2009 11:09:38 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT * FROM host where uptime = 'on' and disabled <> 'on'"
01/09/2009 11:09:38 AM - UPTIME: Poller[0] Checking uptime

I am using:
- cacti 0.8.7b
- php 5.8.2
- openSUSE 11.1
- mysql 5.0.67
- RRDTool 1.3.4
- PA v. 2.1

I have added others plugins and they are working fine:
- weathermap 0.95b
- monitor 0.8.2
- reportit v061
- thold 0.3.9
- settings 0.5

uptime version 0.4 is the one I am trying to install. I unzip the files into the plugins directory, add the entry to global.php and that's it right? it should go and add the entrys in the database?

I will appreciate any help here thanks,

Arvenz
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

In the plugins directory, the uptime plugin folder needs to be called "uptime" - is this the case ? Also, have you granted permission for the account you are using to use this plugin ?

Hope this is of some use.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Post by arvenz1962 »

Yes ... the subdirectory is 'uptime' the same as in the plugins array in global.php.

Permission ?? it does not have the fields yet so it does not show up on Realm Permissions yet.

It is not creating the new tables and the new fields ... is like it is not running or it is having an error before creating the new tables... I will increase the logging to details to see if there is any errors there ...

Arvenz
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Perhaps another plugin is using the same realm number. Does it show up if you select your username from user management ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Post by arvenz1962 »

nop ... it does not show up at all. and again, I reviewed the database and it is not creating the new tables...
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Post by arvenz1962 »

I set the log to debug and I am having some errors but not sure what they mean...

01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select value from settings where name='logging_header'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'draw_navigation_text'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'draw_navigation_text'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show columns from reportit_cache_variables"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show columns from reportit_templates"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show columns from reportit_reports"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables from cacti"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='802'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null;"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "show tables"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='43'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'top_header_tabs'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'top_header_tabs'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'page_head'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'page_head'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'page_title'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'page_title'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'top_header'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'top_header'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='15'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='0'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'auth_alternate_realms'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'auth_alternate_realms'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_form'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_form'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'valid_host_fields'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'valid_host_fields'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_settings'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_settings'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
01/09/2009 03:12:44 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT name, file, function FROM plugin_hooks WHERE status = 1 AND hook = 'config_arrays'"
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Post by arvenz1962 »

I discovered that the uptime plugin "setup.php" does not have a "plugin_uptime_init" function and instead it has a "plugin_uptime_install" function to register the hook.

As my installation is from scratch it may be that the problem ... I am not sure if this is the problem but the rest of the plugins have that "plugin_XXXX_init" function...

Arvenz
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Looks like a PIA problem. What version do you have ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
arvenz1962
Posts: 6
Joined: Fri Jan 09, 2009 10:37 am
Location: London - Ontario - Canada

Post by arvenz1962 »

The latest PA V 2.1
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Search the forums for PIA2.2beta. PIA2.1 had bugs when it was released.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests