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

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Advanced Ping 1.3...

but with the first createPDF.cgi version it was all functioning, also the ping graphs

that's frustrating... :x
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

it's not frustrating, just fascinating ... :-)

I'll have a look later on and i'm sure i can find a solution to this problem :-).

It's a good thing to have the code in subversion .... :lol:
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 »

try 0.2b
Last edited by phalek on Wed Mar 18, 2009 12:49 am, edited 1 time in total.
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
optimus
Posts: 1
Joined: Tue Mar 17, 2009 4:46 pm

Post by optimus »

Hello! First post. Long term Cacti user.

This is a great plugin!

I have installed in my server, everything its working nice. But! I have 2 problems.

1. In firefox the pdf is created in some way that firefox just doesnt open the file in adobe, just show the characters from the pdf file. In IE its normal opening adobe/foxit when i do click on the pdf icon.

2. The logo is not working. The apache error log is:

[Tue Mar 17 16:55:21 2009] [error] [client X] Argument "default_logo.png" isn't numeric in numeric lt (<) at createPDFReport.pl line 80., referer: https://X/cacti/graph_view.php?action=t ... leaf_id=67

Can you help me phalek?

Thanks a lot.

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

Post by phalek »

uploaded a new version 0.2b adressing both of your issues
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
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Hi Phalek,
seems that I'm the only one to have this problem... :cry:

The browser keeps saying he cannot download createPDF.cgi from server... I start thinking it could be something related with the install/uninstall process of the various versions... but in fact I've always used the PluginManagement tab for this and removed the nmidCreatePDF folder from cacti's plugin direcdtory...

Just for debug... when i launch createPDF from command line providing the same parametere passed to the script via browser I got this output:

xyz@cactisrv:/srv/www/htdocs/cacti-0.8.7d/plugins/nmidCreatePDF> ./createPDFReport.cgi?leaf_id=110&starttime=1237285971&endtime=1237372371
[1] 10962
[2] 10963

xyz@cactisrv:/srv/www/htdocs/cacti-0.8.7d/plugins/nmidCreatePDF> -bash: ./createPDFReport.cgi?leaf_id=110: No such file or directory

[1]- Exit 127 ./createPDFReport.cgi?leaf_id=110
[2]+ Done starttime=1237285971


Thanks in advance for your suggestions :)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Maybe there are some permission errors ?

did you try to do a:

Code: Select all

chown -R apache.apache nmidCreatePDF
from the plugins dir ?

Can you actually call the create_image.php file from the browser ?

Unfortunately CGI parameters cannot be passed to the cli, the errors you see are from the shell, the ? and especially the & chars are special chars for it.
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
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Hi Phalek,
that's the output i receive if i call the create_image.php from IE:

#!/usr/bin/php -q
Notice: Undefined index: argv in /srv/www/htdocs/cacti-0.8.7d/plugins/nmidCreatePDF/create_image.php on line 37

Warning: array_shift() [function.array-shift]: The argument should be an array in /srv/www/htdocs/cacti-0.8.7d/plugins/nmidCreatePDF/create_image.php on line 38
GRAPH ACCESS DENIED

The last line GRAPH ACCESS DENIED drives me to a problem related to the guest account access... but I've set the permissions like you explained in this thread...

And I've changed the ownership of the directory, giving also to the directory a "debug" access right to 777...

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

Post by phalek »

cool, the browser is able to at least find THAT file :-)

That php script is supposed to run in the cli, but it was a good test to see if the browser is able to find it in the plugin dir.

The parameters you need to give to it are:

Code: Select all

$local_graph_id = $parms[0];
$rra_id = $parms[1];
$graph_start = $parms[2];
$graph_end = $parms[3];
$graph_height = $parms[4];
$graph_width = $parms[5];
so

Code: Select all

cli>php create_image.php <local_graph_id> 0 1237298394 1237384794 100 800 > image.png
should create the image.png image. Replace <local_graph_id> with a valid id
Last edited by phalek on Wed Mar 18, 2009 9:25 am, edited 1 time in total.
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
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

create_image.php works flawlessly with your parameters and the image is created 8)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

cool, another step further into solving the problem ...

still can't imagine how the browser isn't able to call the cgi and apache not even logging it. It sounds to me that the URL to the script is wrong ...

Can you manually call the cgi script in the browser ? maybe with tailing the error_log file from apache ?
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
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Solved!
You were right, the apache error log was disabled by config... :lol:

and in the error log I've seen the offending error

install_driver(mysql) failed: DBD::mysql object version 3.0002 does not match bootstrap parameter 4.010 at /</srv/www/htdocs/cacti-0.8.7d/plugins/nmidCreatePDF/createPDFReport.cgi>DynaLoader.pm line 237

so I created the sub-folder

/{path_to_cacti}/plugins/nmidCreatePDF/auto/DBD/mysql/

and I copied into the mysql.so version 4.010; since then the plugin works like a charm! :P :P :P

Really thanks Phalek, great plugin + support :)

And I'm convinced that you HAVE to contact the ReportIt people... that's definitively a good idea that can drive to a big improvement in Cacti reporting!
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

ehm...
you didn't read the forum lately, have a look here:

http://forums.cacti.net/viewtopic.php?t=31699

Nevertheless, you do not need to have the mysql files copied over. please try removing the files you copied. They are included in the CGI itself ... It should still run perfectly :-)
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
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

phalek wrote:ehm...
you didn't read the forum lately, have a look here:

http://forums.cacti.net/viewtopic.php?t=31699
ops... :oops:

Thanks in advance for your future efforts you will spend in it :)

phalek wrote: Nevertheless, you do not need to have the mysql files copied over. please try removing the files you copied. They are included in the CGI itself ... It should still run perfectly :-)


Mmh... if I remove the file mysql.so it reverts to the prior situation in wich the browser cannot download createPDF.cgi... strange, if the library is already included... :roll:
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

hm.. that's true. Especially as it works in my Centos 5.2 installation ...
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 0 guests