CereusReporting - PDF Reports - 4.00 for Cacti 1.x out soon!

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Build 46 is up. It addes the missing delete functionality as well as fixes PHP 5.3 incompatibilites.

As usual download it from here: http://redmine.nmid-plugins.de/projects ... epdf/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
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

nmidCreatePDF V1.0 RC1 Corporate Edition is available for testing.

The license will expire on 30 Sep 2010.

Please read the "README_FIRST.txt" file !

http://redmine.nmid-plugins.de/projects ... epdf/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
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

when installing database (running setup) I get this error

Code: Select all

07/23/2010 10:30:24 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1364', SQL:"INSERT INTO plugin_db_changes (plugin, `table`, method) VALUES ('nmidCreatePDF', 'plugin_nmidCreatePDF_Availability_Table', 'create')'  
the sql error is complaning about the column field not having data, what is it

nmidCreatePDF_cover_logo or
nmidCreatePDF_cover_page


Also none of the pages and link related to nmisCreate displays http 500 errors

LA
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

The store the data in the graph_tree table for the template and logo to use when creating reports from within a graph tree.

It should not complain about them not having data, as they can be NULL (empty) ...

Code: Select all

	$data = array();
	$data['name'] = 'nmidCreatePDF_cover_page';
	$data['type'] = 'varchar(1024)';
	$data['NULL'] = true;
	$data['default'] = '';
	api_plugin_db_add_column ('nmidCreatePDF', 'graph_tree', $data);
	
	$data = array();
	$data['name'] = 'nmidCreatePDF_cover_logo';
	$data['type'] = 'varchar(1024)';
	$data['NULL'] = true;
	$data['default'] = '';
	api_plugin_db_add_column ('nmidCreatePDF', 'graph_tree', $data);
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
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

understood but sql complains of missing the data field name `column`



error messsage from SQL when running ths

Code: Select all


INSERT INTO plugin_db_changes (plugin, `table`, method) VALUES ('nmidCreatePDF', 'plugin_nmidCreatePDF_Availability_Table', 'create')


Field 'column' doesn't have a default value

User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

That''s odd.

It's a PIA thing, the 'column' field is in plugin_db_changes and it defaults to "NULL", although it cannot be Null ...

Code: Select all

mysql> describe plugin_db_changes;
+--------+-------------+------+-----+---------+----------------+
| Field  | Type        | Null | Key | Default | Extra          |
+--------+-------------+------+-----+---------+----------------+
| id     | int(10)     | NO   | PRI | NULL    | auto_increment |
| plugin | varchar(16) | NO   | MUL |         |                |
| table  | varchar(64) | NO   |     |         |                |
| column | varchar(64) | NO   |     | NULL    |                |
| method | varchar(16) | NO   | MUL |         |                |
+--------+-------------+------+-----+---------+----------------+
the entries that should go in there are:

Code: Select all

| 202 | nmidCreatePDF | plugin_nmidCreatePDF_Availability_Change_Type  |        | create |
| 201 | nmidCreatePDF | plugin_nmidCreatePDF_Availability_Change_Table |        | create |
| 200 | nmidCreatePDF | plugin_nmidCreatePDF_Availability_Table        |        | create |
| 199 | nmidCreatePDF | plugin_nmidCreatePDF_Graph_Groups              |        | create |
| 198 | nmidCreatePDF | plugin_nmidCreatePDF_Reports_Types             |        | create |
| 197 | nmidCreatePDF | plugin_nmidCreatePDF_DSStatsReports            |        | create |
| 196 | nmidCreatePDF | plugin_nmidCreatePDF_MultiGraphReports         |        | create |
| 195 | nmidCreatePDF | plugin_nmidCreatePDF_GraphReports              |        | create |
| 194 | nmidCreatePDF | plugin_nmidCreatePDF_Archives                  |        | create |
| 193 | nmidCreatePDF | plugin_nmidCreatePDF_Reports                   |        | create |
| 192 | nmidCreatePDF | plugin_nmidCreatePDF_Reports_scheduler         |        | create |
But that is all PIA internals ...

How is this table defined on your windows box ?
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
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

these are mine

Code: Select all


+--------+-------------+------+-----+---------+----------------+
| Field  | Type        | Null | Key | Default | Extra          |
+--------+-------------+------+-----+---------+----------------+
| id     | int(10)     | NO   | PRI | NULL    | auto_increment |
| plugin | varchar(16) | NO   | MUL |         |                |
| table  | varchar(64) | NO   |     |         |                |
| column | varchar(64) | NO   |     | NULL    |                |
| method | varchar(16) | NO   | MUL |         |                |
+--------+-------------+------+-----+---------+----------------+
ovbiously I'm Missing entries that did not get added at install time....

and these are the contents

Code: Select all

+----+---------------+------------+--------------------------+-----------+
| id | plugin        | table      | column                   | method    |
+----+---------------+------------+--------------------------+-----------+
|  3 | nmid          | host       | nwmgmt_settings          | addcolumn |
| 14 | nmidCreatePDF | graph_tree | nmidCreatePDF_cover_logo | addcolumn |
| 13 | nmidCreatePDF | graph_tree | nmidCreatePDF_cover_page | addcolumn |
|  8 | nmidSmokeping | host       | nwmgmt_smokeping_path    | addcolumn |
|  9 | nmidSmokeping | host       | nwmgmt_smokeping_server  | addcolumn |
| 10 | nmidSmokeping | host       | nwmgmt_smokeping_probe   | addcolumn |
+----+---------------+------------+--------------------------+-----------+
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

Are there any incompatibilities on the latest version of Mysql in comparision with previous ones....

a couple off samples:

Code: Select all

Incompatibilities with MySQL Version:MySQL 5.1.46


Engine=MyISAM ann no longer TYPE = MyISAM, 

you cannot specify default ' ' for text fields 
.....`Description` text NOT NULL default ''; 

instead ....`Description` text NOT NULL''; 
 

the above mention did cause errors in my table creation un less I changed them
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Ok, changed the later one ( defaut => '' ), but the engine stuff is PIA based and needs to be adapted/changed in the lib/plugins.php file
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
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Doesn't create graph

Post by xefil »

Hello!

I've updated to 0.85 but I've a little problem. The problem was present with old version too.

Creating a PDF, I open it and it contains:

"Error opening the file : tmp/1280135252-1179-1274864667-1280135067/3004.png"

In error log of apache:

"sh: create_image.php: command not found"

If I try to execute manually a test like this:

[root@cacti nmidCreatePDF]# pwd
/opt/cacti/plugins/nmidCreatePDF
[root@cacti nmidCreatePDF]# php create_image.php 791 0 1237298394 1237384794 100 800 > tmp/791.png
[root@cacti nmidCreatePDF]# ll tmp/
total 32
-rw-r--r-- 1 root root 31002 Jul 26 11:10 791.png

It works and the file contains a graph.

It seems there is a proble creating subfolders or this "command not found"...

permissions set really permissive:

[root@cacti nmidCreatePDF]# ll | grep tmp
drwxrwxrwx 2 apache apache 4096 Jul 26 11:11 tmp

Ideas?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Please try build 50 of v0.85. It has just been uploaded to http://redmine.nmid-plugins.de/projects ... epdf/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
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Same issue, nothing new :(
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

My fault ... a change didn't get thorugh build 50 ...

Try Build 51. That one should hopefully solve the issue.
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
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Now it creates the PDF, but is corrupted.
Looking into tmp directory, now the folders are created. Looking into workerfile, executing the content using create_image.php, it creates the right image. On errorlog:

PHP Fatal error: Call to a member function nmidGetWorkerFile() on a non-object in /opt/cacti/plugins/nmidCreatePDF/functions.php on line 157

PDF empty, still if opened with notepad.

We are closer to a solution :)

Ideas?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Build 52 fixes that. A wrong object reference caused that ....
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest