CereusReporting - PDF Reports - 4.00 for Cacti 1.x out soon!
Moderators: Developers, Moderators
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
obsolete
Last edited by phalek on Sun Aug 29, 2010 2:26 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
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
yep.phalek wrote:I'm using curl to get some of the images, maybe your php installation is missing it ...
http://de.php.net/curl
download php_curl.dll and move to \php\ext and modified php.ini
now pdf is downloaded but empty, without graphs
Cacti v.087g + PAv2.9
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
are there any files/images created in the plugins/nmidCreatePDF/tmp directory ?
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
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
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Ha,
seems like I forgot half of the requirements.
Do you have php_gd2.dll installed and enabled ?
seems like I forgot half of the requirements.
Do you have php_gd2.dll installed and enabled ?
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
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
yes. i have this file and it workphalek wrote:Ha,
seems like I forgot half of the requirements.
Do you have php_gd2.dll installed and enabled ?
my php.ini
extension=php_mysql.dll
[PHP_SNMP]
extension=php_snmp.dll
[PHP_SOCKETS]
extension=php_sockets.dll
extension=php_gd2.dll
extension=php_curl.dll
tech view on cacti
curl
--------------------------------------------------------------------------------
cURL support enabled
cURL Information libcurl/7.16.0 OpenSSL/0.9.8i zlib/1.2.3
gd
--------------------------------------------------------------------------------
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Cacti v.087g + PAv2.9
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
can you access the cacti webpage using localhost ?
e.g
http://127.0.0.1/ or http://127.0.0.1/cacti/
?
e.g
http://127.0.0.1/ or http://127.0.0.1/cacti/
?
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
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
http://127.0.0.1/cacti/phalek wrote:can you access the cacti webpage using localhost ?
e.g
http://127.0.0.1/ or http://127.0.0.1/cacti/
?
Cacti v.087g + PAv2.9
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
hm, ok.
Now do the following, open the doPDFReport.php file and add the following lines to line 94:
so the code block looks
then try to create a pdf report. it will give you the following errors (probably a bit different to the one here)
If you add the URL to http://127.0.0.1 it should give you a graph image back.
the Image says, where it stores the image file, and what name it uses.
Now do the following, open the doPDFReport.php file and add the following lines to line 94:
Code: Select all
print "URL: ".$hit[1]." <br>";
print "Image: $imageFile <br><hr>";
so the code block looks
Code: Select all
if ( preg_match("/(.*src=').*(' border.*)/",$line,$lineMatch ) ) {
#$line = $lineMatch[1].'tmp/image-'.$match[1].'.jpg'.$lineMatch[2];
$imageFile = "plugins/nmidCreatePDF/tmp/image-".$match[1].".png";
print "URL: ".$hit[1]." <br>";
print "Image: $imageFile <br><hr>";
list($width, $height, $type, $attr) = getimagesize($imageFile); # 160, 60
Code: Select all
URL: /cacti/graph_image.php?local_graph_id=222&rra_id=0&view_type=tree&graph_start=1229350319&graph_end=1229436719
Image: plugins/nmidCreatePDF/tmp/image-222.png
--------------------------------------------------------------------------------
TCPDF error: Some data has already been output, can't send PDF file
the Image says, where it stores the image file, and what name it uses.
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
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
Code: Select all
if ( preg_match("/graph_image.php/",$hit[1] ) ) {
if ( preg_match("/local_graph_id=(\d+)/",$hit[1],$match ) ) {
if ( preg_match("/(.*src=').*(' border.*)/",$line,$lineMatch ) ) {
#$line = $lineMatch[1].'tmp/image-'.$match[1].'.jpg'.$lineMatch[2];
$imageFile = "plugins/nmidCreatePDF/tmp/image-".$match[1].".png";
print "URL: ".$hit[1]." <br>";
print "Image: $imageFile <br><hr>";
list($width, $height, $type, $attr) = getimagesize($imageFile); # 160, 60
if ( ( $usedPageUnits + intval ( ( $height / 10) * 2 ) + 10 ) > $pageUnits ) {
Cacti v.087g + PAv2.9
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
hm.
We're getting close,
You're using windows, so maybe the following line in the doPDFCreate.php file is the problem ( line 73 )
change that to
We're getting close,
You're using windows, so maybe the following line in the doPDFCreate.php file is the problem ( line 73 )
Code: Select all
$dataArray = explode ("\n", $output);
Code: Select all
$dataArray = explode ("\n\r", $output);
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
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
phalek wrote:hm.
We're getting close,
You're using windows, so maybe the following line in the doPDFCreate.php file is the problem ( line 73 )change that toCode: Select all
$dataArray = explode ("\n", $output);
Code: Select all
$dataArray = explode ("\n\r", $output);
Code: Select all
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
$dataArray = explode ("\n\r", $output);
Cacti v.087g + PAv2.9
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
ok,
i'm going to setup a windows cacti version to test that ...
i'm going to setup a windows cacti version to test 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
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
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Ok, found the error.
FIrst of all, you will need to have anonymous access to view the graphs...
I couldn't figure out how to get the images otherweise right now ...
Next,
in the setup.php at line 56, remove the following part from that big if section:
so the whole function looks like
FIrst of all, you will need to have anonymous access to view the graphs...
I couldn't figure out how to get the images otherweise right now ...
Next,
in the setup.php at line 56, remove the following part from that big if section:
Code: Select all
&& PHP_OS!='WINNT'
Code: Select all
function nmidCreatePDF_graph_set_options($opt) {
#//do not cache graphs being edited or zoomed
if ( !(isset($_REQUEST['action']) && in_array($_REQUEST['action'],array('zoom','properties','edit'))) && !(isset($opt['output_flag']) && $opt['output_flag']==RRDTOOL_OUTPUT_STDERR) )
$opt['output_flag']=RRDTOOL_OUTPUT_STDOUT;
return $opt;
}
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
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
i change code in file, but i not understand thisphalek wrote:Ok, found the error.
FIrst of all, you will need to have anonymous access to view the graphs...
I couldn't figure out how to get the images otherweise right now ...
Next,
in the setup.php at line 56, remove the following part from that big if section:so the whole function looks likeCode: Select all
&& PHP_OS!='WINNT'
Code: Select all
function nmidCreatePDF_graph_set_options($opt) { #//do not cache graphs being edited or zoomed if ( !(isset($_REQUEST['action']) && in_array($_REQUEST['action'],array('zoom','properties','edit'))) && !(isset($opt['output_flag']) && $opt['output_flag']==RRDTOOL_OUTPUT_STDERR) ) $opt['output_flag']=RRDTOOL_OUTPUT_STDOUT; return $opt; }
guest account or graph? graphs are generated...FIrst of all, you will need to have anonymous access to view the graphs...
or you say about anonymous on ntfs permission?
Cacti v.087g + PAv2.9
Who is online
Users browsing this forum: No registered users and 1 guest