Installation nmidSmokeping PLUGIN

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
katrokk
Posts: 7
Joined: Fri Mar 09, 2012 4:36 am

Re: Installation nmidSmokeping PLUGIN

Post by katrokk »

Hi all,

I have the same issue with the earlier topic, the image preview's not shown while the link detail beside the image is working.

Image

when i copy the image url and turn debug on:

Code: Select all

http://my.host.net/cacti/plugins/nmidSmokeping/getSmokePingImage.php?start=1351512128&end=1351598528&target=other.INTERNET.BBC&server=nmid_spserver1&graphtype=detail&debug=1
i found that the image url is wrong. the url is :

Code: Select all

http://my.host.net/smokeping//cache/__navcache/135159876710442_1351598226_1351511826.png
it should be :

Code: Select all

http://my.host.net/cache/__navcache/135159876710442_1351598226_1351511826.png
is there anyway to fix this missconfig?

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

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

Could you send me the complete output of that debug ? Please sent it to support@urban-software.de
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:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

Please download version 1.10.

Get the files here: http://redmine.nmid-plugins.de/projects ... ping/files
Ger commercial support here: http://blog.network-outsourcing.de/supp ... s-support/
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

I have:

cat /etc/debian_version
6.0.6
uname -r
2.6.32-5-686

About Cacti: Version 0.8.7g
Plugins:
Cycle Cycle Graphs General Active 2.3
Settings Global Plugin Settings System Active 0.71
NmidSmokeping NMID SmokePing Plugin General Active 1.10
NmidWebService NMID WebService Plugin General Active 2.08

Smokeping daemon works ok an colecting data and shows it in https://10.0.206.25/cgi-bin/smokeping.cgi?target=HQ.NOC

2908 ? Ss 0:00 /usr/sbin/smokeping [FPing]
2929 ? Ss 0:00 /usr/bin/speedy_backend -w /usr/lib/cgi-bin/smokeping.cgi
2930 ? S 0:01 \_ /usr/bin/speedy_backend -w /usr/lib/cgi-bin/smokeping.cgi

Cacti it ok colecting and displaying data about NOC swtich device added to cacti tree under HQ leaf

My problem is the same as everybody else with NmidSmokeping plugin witch doesn't diplay image in cacti with getSmokePingImage.php from latest version from developer website.
Within Cacti Graph view the link refered to the image is
https://10.0.206.25/cacti/plugins/nmidS ... ype=detail

When i click on Magnifier glass that points to the https://10.0.206.25/cgi-bin/smokeping.cgi?target=HQ.NOC ..the graph displays on Smokeping site ok

HOW CAN I DEBUG THIS ? CAN ANYONE HELP ME ?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

add a debug=1 to the url:

Code: Select all

https://10.0.206.25/cacti/plugins/nmidSmokeping/getSmokePingImage.php?start=1352108528&end=1352194928&target=HQ.NOC&server=nmid_spserver1&graphtype=detail&debug=1
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

I've tried that but nothing happens

What i saw is that with this setting in "NMID - Smokeping - General Smokeping Graph Type Detail Graph

i got nothing with " tail -f /var/log/apache2/error.log " when i hit F5 refresh on :

https://10.0.206.25/cacti/plugins/nmidS ... il&debug=1

and with Smokeping Graph Type overview

https://10.0.206.25/cacti/plugins/nmidS ... ew&debug=1

i get with tail -f /var/log/apache2/error.log :

[Tue Nov 06 12:25:43 2012] [error] [client 10.0.200.101] PHP Warning: preg_match(): Unknown modifier 'N' in /usr/share/cacti/site/plugins/nmidSmokeping/getSmokePingImage.php on line 90, referer: https://10.0.206.25/cacti/graph_view.ph ... =10&page=2
[Tue Nov 06 12:25:43 2012] [error] [client 10.0.200.101] PHP Warning: preg_match(): Unknown modifier 'N' in /usr/share/cacti/site/plugins/nmidSmokeping/getSmokePingImage.php on line 92, referer: https://10.0.206.25/cacti/graph_view.ph ... =10&page=2



I both cases still no image !
I'm looking in the wrong place in log apache error? Where is the output of &debug=1 on that link ?


Somthing else can i modify in getSmokePingImage.php
I've take a look into it and i found that bellow lines are commented:

//if ( preg_match("/(http:.*)\/cgi-bin\/smokeping\.cgi.*/i",$url,$matches) ) {
// $mainServer = $matches[1];
//} elseif ( preg_match("/(http:.*)\/smokeping\.cgi.*/i",$url,$matches) ) {
// $mainServer = $matches[1];
//} elseif ( preg_match("/(http:.*)\/cgi-bin\/smokeping\.fcgi.*/i",$url,$matches) ) {
// $mainServer = $matches[1];
//} elseif ( preg_match("/(http:.*)\/smokeping\.fcgi.*/i",$url,$matches) ) {
// $mainServer = $matches[1];
//}

I've uncommented but nothing.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

It is displayed as a website.

Doy you have the CURL module installed ? check with "php -m"
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

is i have curl installed
php -m | grep curl
curl

What do you mean it's displayed like a website ?
Attachments
openIMG.jpg
openIMG.jpg (125.83 KiB) Viewed 3624 times
withinCacti.jpg
withinCacti.jpg (227.13 KiB) Viewed 3624 times
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

It displays a webpage with html code showing some debug info.

What happens if you do a

Code: Select all

php getSmokePingImage.php
on the command line ?
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

phalek wrote:It displays a webpage with html code showing some debug info.

What happens if you do a

Code: Select all

php getSmokePingImage.php
on the command line ?

/usr/share/cacti/site/plugins/nmidSmokeping# php getSmokePingImage.php


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Login to Cacti</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<STYLE TYPE="text/css">
<!--
BODY, TABLE, TR, TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
A {text-decoration: none;}
A:active { text-decoration: none;}
A:hover {text-decoration: underline; color: #333333;}
A:visited {color: Blue;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" onload="document.login.login_username.focus()">
<form name="login" method="post" action="getSmokePingImage.php">
<input type="hidden" name="action" value="login">
<table align="center">
<tr>
<td colspan="2"><center><img src="/cacti/images/auth_login.gif" border="0" alt=""></center></td>
</tr>

<tr style="height:10px;"><td></td></tr>
<tr>
<td colspan="2">Please enter your Cacti user name and password below:</td>
</tr>
<tr style="height:10px;"><td></td></tr>
<tr>
<td>User Name:</td>
<td><input type="text" name="login_username" size="40" style="width: 295px;" value=""></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="login_password" size="40" style="width: 295px;"></td>
</tr>
<tr style="height:10px;"><td></td></tr>
<tr>
<td><input type="submit" value="Login"></td>
</tr>
</table>
</form>
</body>
</html>
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

hm .. can you run a

Code: Select all

dos2unix getSmokePingImage.php 
and retry with the debug=1 url ?
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

phalek wrote:hm .. can you run a

Code: Select all

dos2unix getSmokePingImage.php 
and retry with the debug=1 url ?

dos2unix getSmokePingImage.php
dos2unix: converting file getSmokePingImage.php to UNIX format ...

And with debug=1 i got this:


<h3>Main Server</h3>https://10.0.206.25/
<hr>
<h3>SP URL</h3>https://10.0.206.25/cgi-bin/smokeping.cgi
<hr>
<h3>Response Str</h3>
<hr>
<h3>File Part</h3>1352206019_1352119619.png<hr><h3>Image URL</h3>https://10.0.206.25/cache/1352206019_13 ... ut</h3><hr>
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

Does anything show up when you open https://10.0.206.25/cache/1352206019_1352119619.png ?
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
adigigi
Posts: 9
Joined: Tue Nov 06, 2012 4:23 am

Re: Installation nmidSmokeping PLUGIN

Post by adigigi »

Doesn't show anything.

i've try to locate this folder/file: "cache/1352206019_1352119619.png" but i didn't find it.

What i found si this:
/var/cache/smokeping/images ls -la
total 40
drwxr-xr-x 7 www-data root 4096 Nov 2 17:15 .
drwxr-xr-x 3 root root 4096 Oct 26 16:46 ..
drwxr-xr-x 2 www-data www-data 4096 Nov 2 17:11 __chartscache
drwxr-xr-x 2 www-data www-data 4096 Nov 6 12:40 HQ
drwxr-xr-x 2 www-data www-data 4096 Nov 2 12:35 Local
drwxr-xr-x 2 www-data www-data 4096 Nov 5 14:45 __navcache
-rw-r--r-- 1 www-data www-data 3908 Oct 26 16:47 rrdtool.png
-rw-r--r-- 1 www-data www-data 4382 Oct 26 16:47 smokeping.png

and
/var/cache/smokeping/images/HQ# ls -la
total 148
drwxr-xr-x 2 www-data www-data 4096 Nov 6 12:40 .
drwxr-xr-x 6 www-data root 4096 Nov 7 01:04 ..
-rw-r--r-- 1 www-data www-data 30013 Nov 6 16:14 NOC_last_108000.png
-rw-r--r-- 1 www-data www-data 30901 Nov 6 16:14 NOC_last_10800.png
-rw-r--r-- 1 www-data www-data 26793 Nov 6 16:14 NOC_last_34560000.png
-rw-r--r-- 1 www-data www-data 30350 Nov 6 16:14 NOC_last_864000.png
-rw-r--r-- 1 www-data www-data 56 Nov 6 16:14 NOC.maxheight
-rw-r--r-- 1 www-data www-data 12000 Nov 6 16:13 NOC_mini.png

and only png that looks like that is under folder __navcache

/var/cache/smokeping/images/__navcache# ls -la
total 40
drwxr-xr-x 2 www-data www-data 4096 Nov 5 14:45 .
drwxr-xr-x 6 www-data root 4096 Nov 7 01:04 ..
-rw-r--r-- 1 www-data www-data 29830 Nov 5 14:45 135211955229594_1352119552_1352108700.png
root@linuxmonitorizare:/var/cache/smokeping/images/__navcache#
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Installation nmidSmokeping PLUGIN

Post by phalek »

Ok,

Can you send me the source code of the html page with the debug=1 to support@urban-software.de ?

Also, did you reverse the changes you did to the getSmokePingImage.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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests